Mantid
|
Instances of this class represent information about reduced cell types including the transformation required to transform the reduced cell to a conventional cell. More...
#include <ReducedCell.h>
Public Types | |
enum | { NUM_CELL_TYPES = 44 } |
Public Member Functions | |
std::string | GetCellType () const |
Get the cell type of this form. More... | |
std::string | GetCentering () const |
Get centering assigned to this form. More... | |
size_t | GetFormNum () const |
Get the form number used to construct this form. More... | |
Kernel::DblMatrix | GetTransformation () |
Return the transformation to map the reduced cell to the conventional cell, as listed in Table 2, if the form number is between 1 and 44. More... | |
ReducedCell (size_t form_num=0, double a=1, double b=1, double c=1, double alpha=90, double beta=90, double gamma=90) | |
Construct a ReducedCell object representing the specified row of Table 2 for a reduced cell with the specified lattice parameters, if the form number is between 1 and 44 inclusive. More... | |
double | WeightedDistance (const ReducedCell &other) const |
Get the maximum absolute weighted difference between the scalars for the specifed ReducedCellInfo object and this ReducedCellInfo. More... | |
Static Public Member Functions | |
static const std::string | C_CENTERED () |
static const std::string | CUBIC () |
static const std::string | F_CENTERED () |
static const std::string | HEXAGONAL () |
static const std::string | I_CENTERED () |
static const std::string | MONOCLINIC () |
static const std::string | NONE () |
static const std::string | ORTHORHOMBIC () |
static const std::string | P_CENTERED () |
static const std::string | R_CENTERED () |
static const std::string | RHOMBOHEDRAL () |
static const std::string | TETRAGONAL () |
static const std::string | TRICLINIC () |
Private Member Functions | |
void | foot_note_b (double a_a, double a_c) |
Adjust tranform and centering according to foot note b of the paper. More... | |
void | foot_note_c (double b_b, double b_c) |
Adjust tranform and centering according to foot note c of the paper. More... | |
void | foot_note_d (double c_c, double b_c) |
Adjust tranform and centering according to foot note d of the paper. More... | |
void | foot_note_e (double a_a, double c_c, double a_c) |
Adjust tranform and centering according to foot note e of the paper. More... | |
void | foot_note_f (double b_b, double c_c, double b_c) |
Adjust tranform and centering according to foot note f of the paper. More... | |
void | init (size_t f_num, double a_a, double b_b, double c_c, double b_c, double a_c, double a_b) |
Initialize all private data to represent one row of Table 2, for the row specified by the form number and for the given lattice parameters. More... | |
std::vector< double > | norm_vals (const ReducedCell &info) const |
Get list of six values, related to the six scalars, but adjusted so that changes in these values represent changes of positions of the lattice corners of approximately the same magnitude. More... | |
void | premultiply (size_t index) |
Adjust the tranformation for this reduced cell by premultiplying by modification transform 0 or 1. More... | |
Private Attributes | |
std::string | cell_type |
std::string | centering |
size_t | form_num |
double | scalars [6] |
Kernel::DblMatrix | transform |
Instances of this class represent information about reduced cell types including the transformation required to transform the reduced cell to a conventional cell.
Essentially, each instance of this class represents one row of information from Table 2 in the paper: "Lattice Symmetry and Identification -- The Fundamental Role of Reduced Cells in Materials Characterization", Alan D. Mighell, Vol. 106, Number 6, Nov-Dec 2001, Journal of Research of the National Institute of Standards and Technology. This class is a direct port of the ISAW class ReducedCellInfo.
Definition at line 32 of file ReducedCell.h.
anonymous enum |
Enumerator | |
---|---|
NUM_CELL_TYPES |
Definition at line 48 of file ReducedCell.h.
Mantid::Geometry::ReducedCell::ReducedCell | ( | size_t | form_num = 0 , |
double | a = 1 , |
||
double | b = 1 , |
||
double | c = 1 , |
||
double | alpha = 90 , |
||
double | beta = 90 , |
||
double | gamma = 90 |
||
) |
Construct a ReducedCell object representing the specified row of Table 2 for a reduced cell with the specified lattice parameters, if the form number is between 1 and 44 inclusive.
If the form number is specified to be zero, the scalar values will be calculated according to the column headers for Table 2, for comparison purposes.
form_num | The row number from Table 2, that specifies the reduced form number. |
a | Real space unit cell length "a". |
b | Real space unit cell length "b". |
c | Real space unit cell length "c". |
alpha | Resl space unit cell angle "alpha", in degrees. |
beta | Resl space unit cell angle "beta", in degrees. |
gamma | Resl space unit cell angle "gamma", in degrees. |
Definition at line 220 of file ReducedCell.cpp.
|
inlinestatic |
Definition at line 63 of file ReducedCell.h.
Referenced by foot_note_e(), foot_note_f(), and Mantid::Crystal::SelectCellOfType::init().
|
inlinestatic |
Definition at line 52 of file ReducedCell.h.
Referenced by Mantid::Crystal::OptimizeLatticeForCellType::init(), and Mantid::Crystal::SelectCellOfType::init().
|
inlinestatic |
Definition at line 61 of file ReducedCell.h.
Referenced by Mantid::Crystal::SelectCellOfType::init().
|
private |
Adjust tranform and centering according to foot note b of the paper.
Definition at line 537 of file ReducedCell.cpp.
References centering, fabs, I_CENTERED(), and premultiply().
Referenced by init().
|
private |
Adjust tranform and centering according to foot note c of the paper.
Definition at line 548 of file ReducedCell.cpp.
References centering, fabs, I_CENTERED(), and premultiply().
Referenced by init().
|
private |
Adjust tranform and centering according to foot note d of the paper.
Definition at line 559 of file ReducedCell.cpp.
References centering, fabs, I_CENTERED(), and premultiply().
Referenced by init().
|
private |
Adjust tranform and centering according to foot note e of the paper.
Definition at line 570 of file ReducedCell.cpp.
References C_CENTERED(), centering, fabs, and premultiply().
Referenced by init().
|
private |
Adjust tranform and centering according to foot note f of the paper.
Definition at line 581 of file ReducedCell.cpp.
References C_CENTERED(), centering, fabs, and premultiply().
Referenced by init().
std::string Mantid::Geometry::ReducedCell::GetCellType | ( | ) | const |
Get the cell type of this form.
Definition at line 610 of file ReducedCell.cpp.
References cell_type.
Referenced by Mantid::Geometry::ScalarUtils::GetCellsUBOnly(), and Mantid::Geometry::ConventionalCell::init().
std::string Mantid::Geometry::ReducedCell::GetCentering | ( | ) | const |
Get centering assigned to this form.
NOTE: This might be different from the requested cell type, since sometimes the centering is changed. See the foot notes to Table 2 in the paper for details.
Definition at line 617 of file ReducedCell.cpp.
References centering.
Referenced by Mantid::Geometry::ScalarUtils::GetCellsUBOnly(), and Mantid::Geometry::ConventionalCell::init().
size_t Mantid::Geometry::ReducedCell::GetFormNum | ( | ) | const |
Get the form number used to construct this form.
Definition at line 605 of file ReducedCell.cpp.
References form_num.
Kernel::DblMatrix Mantid::Geometry::ReducedCell::GetTransformation | ( | ) |
Return the transformation to map the reduced cell to the conventional cell, as listed in Table 2, if the form number is between 1 and 44.
If the form number is 0, this returns the identity transformation.
Definition at line 680 of file ReducedCell.cpp.
References transform.
Referenced by Mantid::Geometry::ConventionalCell::init().
|
inlinestatic |
Definition at line 53 of file ReducedCell.h.
Referenced by Mantid::Crystal::OptimizeLatticeForCellType::init(), Mantid::Crystal::SelectCellOfType::init(), and Mantid::Geometry::ConventionalCell::init().
|
inlinestatic |
Definition at line 62 of file ReducedCell.h.
Referenced by foot_note_b(), foot_note_c(), foot_note_d(), and Mantid::Crystal::SelectCellOfType::init().
|
private |
Initialize all private data to represent one row of Table 2, for the row specified by the form number and for the given lattice parameters.
The form number must be between 1 and 44 to represent an actual row of the table and must be 0 to represent the column header scalars, for comparison purposes.
Definition at line 242 of file ReducedCell.cpp.
References cell_type, Mantid::Geometry::center_types, centering, fabs, foot_note_b(), foot_note_c(), foot_note_d(), foot_note_e(), foot_note_f(), form_num, Mantid::Geometry::lattice_types, NUM_CELL_TYPES, scalars, transform, Mantid::Geometry::transforms, and value.
Referenced by ReducedCell().
|
inlinestatic |
Definition at line 57 of file ReducedCell.h.
Referenced by Mantid::Crystal::OptimizeLatticeForCellType::init(), and Mantid::Crystal::SelectCellOfType::init().
|
inlinestatic |
Definition at line 51 of file ReducedCell.h.
|
private |
Get list of six values, related to the six scalars, but adjusted so that changes in these values represent changes of positions of the lattice corners of approximately the same magnitude.
This is useful when comparing how close the lattice for one cell is to the lattice for another cell.
Definition at line 652 of file ReducedCell.cpp.
References scalars.
Referenced by WeightedDistance().
|
inlinestatic |
Definition at line 56 of file ReducedCell.h.
Referenced by Mantid::Crystal::OptimizeLatticeForCellType::init(), and Mantid::Crystal::SelectCellOfType::init().
|
inlinestatic |
Definition at line 64 of file ReducedCell.h.
Referenced by Mantid::Crystal::SelectCellOfType::init().
|
private |
Adjust the tranformation for this reduced cell by premultiplying by modification transform 0 or 1.
Definition at line 593 of file ReducedCell.cpp.
References index, transform, and Mantid::Geometry::transform_modifier.
Referenced by foot_note_b(), foot_note_c(), foot_note_d(), foot_note_e(), and foot_note_f().
|
inlinestatic |
Definition at line 65 of file ReducedCell.h.
Referenced by Mantid::Crystal::SelectCellOfType::init().
|
inlinestatic |
Definition at line 54 of file ReducedCell.h.
Referenced by Mantid::Crystal::OptimizeLatticeForCellType::init(), Mantid::Crystal::SelectCellOfType::init(), and Mantid::Geometry::ConventionalCell::init().
|
inlinestatic |
Definition at line 55 of file ReducedCell.h.
Referenced by Mantid::Crystal::OptimizeLatticeForCellType::init(), Mantid::Crystal::SelectCellOfType::init(), and Mantid::Geometry::ConventionalCell::init().
|
inlinestatic |
Definition at line 58 of file ReducedCell.h.
Referenced by Mantid::Geometry::ScalarUtils::GetCellBestError(), Mantid::Crystal::OptimizeLatticeForCellType::init(), and Mantid::Crystal::SelectCellOfType::init().
double Mantid::Geometry::ReducedCell::WeightedDistance | ( | const ReducedCell & | other | ) | const |
Get the maximum absolute weighted difference between the scalars for the specifed ReducedCellInfo object and this ReducedCellInfo.
A fairly complicated weighting is used to make the effect of a difference in cell edge length on lattice corner positions is comparable to the effect of a difference in the angles.
other | The ReducedCellInfo object to compare with the current object. |
Definition at line 631 of file ReducedCell.cpp.
References fabs, and norm_vals().
Referenced by Mantid::Geometry::ScalarUtils::GetCellForForm(), and Mantid::Geometry::ConventionalCell::init().
|
private |
Definition at line 80 of file ReducedCell.h.
Referenced by GetCellType(), and init().
|
private |
Definition at line 81 of file ReducedCell.h.
Referenced by foot_note_b(), foot_note_c(), foot_note_d(), foot_note_e(), foot_note_f(), GetCentering(), and init().
|
private |
Definition at line 77 of file ReducedCell.h.
Referenced by GetFormNum(), init(), and ReducedCell().
|
private |
Definition at line 78 of file ReducedCell.h.
Referenced by init(), and norm_vals().
|
private |
Definition at line 79 of file ReducedCell.h.
Referenced by GetTransformation(), init(), and premultiply().