ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | Static Public Member Functions | List of all members
Lattice Class Reference

Public Member Functions

 Lattice ()
 
 ~Lattice ()
 
void readXML (XMLfileUnits &xmlconfig)
 Read in XML configuration for Lattice and all its included objects. More...
 
void init (LatticeSystem system, LatticeCentering centering, double a[3], double b[3], double c[3])
 
void setDimsMin (long dimsMin[3])
 
void setDimsMax (long dimsMax[3])
 
int getPoint (double *r)
 
bool checkValidity ()
 
void setSystem (LatticeSystem system)
 
LatticeSystem system ()
 
void setCentering (LatticeCentering centering)
 
LatticeCentering centering ()
 
int numCenters ()
 
const char * systemName ()
 
const char * centeringName ()
 
const double * a ()
 
const double * b ()
 
const double * c ()
 

Static Public Member Functions

static int numCenters (LatticeCentering centering)
 
static LatticeCentering centering (std::string name)
 
static LatticeSystem system (std::string name)
 

Constructor & Destructor Documentation

◆ Lattice()

Lattice::Lattice ( )
inline

Lattice constructor

◆ ~Lattice()

Lattice::~Lattice ( )
inline

Lattice destructor

Member Function Documentation

◆ a()

const double* Lattice::a ( )
inline

Get pointer to lattice vector a

◆ b()

const double* Lattice::b ( )
inline

Get pointer to lattice vector b

◆ c()

const double* Lattice::c ( )
inline

Get pointer to lattice vector c

◆ centering()

LatticeCentering Lattice::centering ( std::string  name)
static

Get the lattice centering to a given name

◆ centeringName()

const char * Lattice::centeringName ( )

Get the name of the lattice centering.

◆ checkValidity()

bool Lattice::checkValidity ( )

Check if lattice specifications represent a valid Bravais lattice

Returns
true if valid Bravais lattice, false otherwise
Todo:
have to implement checking of lattice vectors, as well.

◆ getPoint()

int Lattice::getPoint ( double *  r)

Get a point in the grid. Returns successively all points in the specified lattice

Parameters
[out]rpointer where to store the 3 coordinates of the point's coordinates
Returns
0 if no point returned, 1 otherwise

◆ init()

void Lattice::init ( LatticeSystem  system,
LatticeCentering  centering,
double  a[3],
double  b[3],
double  c[3] 
)

Initialize lattice

Parameters
[in]systemLattice system
[in]centeringLattice centering
[in]a1st lattice vector
[in]b2nd lattice vector
[in]c3rd lattice vector

◆ numCenters()

int Lattice::numCenters ( LatticeCentering  centering)
static

Get the number of centers for given centering type

◆ readXML()

void Lattice::readXML ( XMLfileUnits xmlconfig)

Read in XML configuration for Lattice and all its included objects.

The following xml object structure is handled by this method:

<lattice system="..." centering="...">
<vec id='a'> <x>DOUBLE</x> <y>DOUBLE</y> <z>DOUBLE</z> </vec>
<vec id='b'> <x>DOUBLE</x> <y>DOUBLE</y> <z>DOUBLE</z> </vec>
<vec id='c'> <x>DOUBLE</x> <y>DOUBLE</y> <z>DOUBLE</z> </vec>
</lattice>

where system can be one of the values "triclinic", "monoclinic", "orthorombic", "tetragonal", "rhomboedral", and "hexagonal", "cubic" and centering can be one of the values "primitive", "body", "face", "base A", "base B", and "base C".

◆ setDimsMax()

void Lattice::setDimsMax ( long  dimsMax[3])

Set upper corner of lattice given in multiples of the lattice vectors

Parameters
[in]dimsMaxcoordinate of upper corner

◆ setDimsMin()

void Lattice::setDimsMin ( long  dimsMin[3])

Set lower corner of lattice given in multiples of the lattice vectors and reset current position marker.

Parameters
[in]dimsMincoordinates of lower corner

◆ system()

LatticeSystem Lattice::system ( std::string  name)
static

Get the lattice system to a given name

◆ systemName()

const char * Lattice::systemName ( )

Get the name of the lattice system.


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