Mantid
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::ReducedCell Class Reference

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
 

Detailed Description

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.

Author
Dennis Mikkelson
Date
2012-01-02

Definition at line 32 of file ReducedCell.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NUM_CELL_TYPES 

Definition at line 48 of file ReducedCell.h.

Constructor & Destructor Documentation

◆ ReducedCell()

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.

Parameters
form_numThe row number from Table 2, that specifies the reduced form number.
aReal space unit cell length "a".
bReal space unit cell length "b".
cReal space unit cell length "c".
alphaResl space unit cell angle "alpha", in degrees.
betaResl space unit cell angle "beta", in degrees.
gammaResl space unit cell angle "gamma", in degrees.

Definition at line 220 of file ReducedCell.cpp.

References form_num, and init().

Member Function Documentation

◆ C_CENTERED()

static const std::string Mantid::Geometry::ReducedCell::C_CENTERED ( )
inlinestatic

Definition at line 63 of file ReducedCell.h.

Referenced by foot_note_e(), foot_note_f(), and Mantid::Crystal::SelectCellOfType::init().

◆ CUBIC()

static const std::string Mantid::Geometry::ReducedCell::CUBIC ( )
inlinestatic

◆ F_CENTERED()

static const std::string Mantid::Geometry::ReducedCell::F_CENTERED ( )
inlinestatic

Definition at line 61 of file ReducedCell.h.

Referenced by Mantid::Crystal::SelectCellOfType::init().

◆ foot_note_b()

void Mantid::Geometry::ReducedCell::foot_note_b ( double  a_a,
double  a_c 
)
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().

◆ foot_note_c()

void Mantid::Geometry::ReducedCell::foot_note_c ( double  b_b,
double  b_c 
)
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().

◆ foot_note_d()

void Mantid::Geometry::ReducedCell::foot_note_d ( double  c_c,
double  b_c 
)
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().

◆ foot_note_e()

void Mantid::Geometry::ReducedCell::foot_note_e ( double  a_a,
double  c_c,
double  a_c 
)
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().

◆ foot_note_f()

void Mantid::Geometry::ReducedCell::foot_note_f ( double  b_b,
double  c_c,
double  b_c 
)
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().

◆ GetCellType()

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().

◆ GetCentering()

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().

◆ GetFormNum()

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.

◆ GetTransformation()

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.

Returns
The transformation.

Definition at line 680 of file ReducedCell.cpp.

References transform.

Referenced by Mantid::Geometry::ConventionalCell::init().

◆ HEXAGONAL()

static const std::string Mantid::Geometry::ReducedCell::HEXAGONAL ( )
inlinestatic

◆ I_CENTERED()

static const std::string Mantid::Geometry::ReducedCell::I_CENTERED ( )
inlinestatic

◆ init()

void Mantid::Geometry::ReducedCell::init ( size_t  f_num,
double  a_a,
double  b_b,
double  c_c,
double  b_c,
double  a_c,
double  a_b 
)
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().

◆ MONOCLINIC()

static const std::string Mantid::Geometry::ReducedCell::MONOCLINIC ( )
inlinestatic

◆ NONE()

static const std::string Mantid::Geometry::ReducedCell::NONE ( )
inlinestatic

Definition at line 51 of file ReducedCell.h.

◆ norm_vals()

std::vector< double > Mantid::Geometry::ReducedCell::norm_vals ( const ReducedCell info) const
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().

◆ ORTHORHOMBIC()

static const std::string Mantid::Geometry::ReducedCell::ORTHORHOMBIC ( )
inlinestatic

◆ P_CENTERED()

static const std::string Mantid::Geometry::ReducedCell::P_CENTERED ( )
inlinestatic

Definition at line 64 of file ReducedCell.h.

Referenced by Mantid::Crystal::SelectCellOfType::init().

◆ premultiply()

void Mantid::Geometry::ReducedCell::premultiply ( size_t  index)
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().

◆ R_CENTERED()

static const std::string Mantid::Geometry::ReducedCell::R_CENTERED ( )
inlinestatic

Definition at line 65 of file ReducedCell.h.

Referenced by Mantid::Crystal::SelectCellOfType::init().

◆ RHOMBOHEDRAL()

static const std::string Mantid::Geometry::ReducedCell::RHOMBOHEDRAL ( )
inlinestatic

◆ TETRAGONAL()

static const std::string Mantid::Geometry::ReducedCell::TETRAGONAL ( )
inlinestatic

◆ TRICLINIC()

static const std::string Mantid::Geometry::ReducedCell::TRICLINIC ( )
inlinestatic

◆ WeightedDistance()

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.

Parameters
otherThe ReducedCellInfo object to compare with the current object.
Returns
The maximum absolute difference between the scalars.

Definition at line 631 of file ReducedCell.cpp.

References fabs, and norm_vals().

Referenced by Mantid::Geometry::ScalarUtils::GetCellForForm(), and Mantid::Geometry::ConventionalCell::init().

Member Data Documentation

◆ cell_type

std::string Mantid::Geometry::ReducedCell::cell_type
private

Definition at line 80 of file ReducedCell.h.

Referenced by GetCellType(), and init().

◆ centering

std::string Mantid::Geometry::ReducedCell::centering
private

◆ form_num

size_t Mantid::Geometry::ReducedCell::form_num
private

Definition at line 77 of file ReducedCell.h.

Referenced by GetFormNum(), init(), and ReducedCell().

◆ scalars

double Mantid::Geometry::ReducedCell::scalars[6]
private

Definition at line 78 of file ReducedCell.h.

Referenced by init(), and norm_vals().

◆ transform

Kernel::DblMatrix Mantid::Geometry::ReducedCell::transform
private

Definition at line 79 of file ReducedCell.h.

Referenced by GetTransformation(), init(), and premultiply().


The documentation for this class was generated from the following files: