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

#include <GridFiller.h>

Inheritance diagram for GridFiller:
ObjectFillerBase

Public Member Functions

void readXML (XMLfileUnits &xmlconfig)
 Read in XML configuration for GridFiller and all its included objects. More...
 
void init (Lattice &lattice, Basis &basis, double origin[3])
 
void init ()
 
void setObject (std::shared_ptr< Object > object)
 
int getMolecule (Molecule *molecule)
 
std::string getPluginName ()
 

Static Public Member Functions

static ObjectFillerBasecreateInstance ()
 

Detailed Description

The GridFiller returns molecules within an object placed on a lattice using a specified lattice basis.

Member Function Documentation

◆ getMolecule()

int GridFiller::getMolecule ( Molecule molecule)
virtual

Get a single molecule By subsequent calls all molecules will be returned, one by one.

Parameters
[out]moleculePointer to molecule data structure where to store the molecule data (coordinate and component id)
Returns
0 if no more molecules can be returned

Implements ObjectFillerBase.

◆ getPluginName()

std::string GridFiller::getPluginName ( )
inlinevirtual

Implements ObjectFillerBase.

◆ init() [1/2]

void GridFiller::init ( )
virtual

Initialize the generator with current internal state

Implements ObjectFillerBase.

◆ init() [2/2]

void GridFiller::init ( Lattice lattice,
Basis basis,
double  origin[3] 
)

Initialize the generator

Parameters
[in]latticeThe underlying point lattice to be used
[in]basisThe molecular basis to be put on each lattice point
[in]originThe origin for the lattice
[in]objectVolume object to be filled

◆ readXML()

void GridFiller::readXML ( XMLfileUnits xmlconfig)
virtual

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

If a density is provided a cubic lattice will be used. If in this case also a lattice occupancy factor (0-1] is provided, a finer grid will be used and only the specified fraction of points will be used. The lattice vectors will be scaled to achieve the desired density taking the occupancy factor into account. By default the occupancy factor is 1 (use all lattice points).

The following xml object structure is handled by this method:

<filler type="GridFiller">
<lattice><!-- ... --></lattice>
<basis><!-- ... --></basis>
<latticeOrigin> <x>DOUBLE</x> <y>DOUBLE</y> <z>DOUBLE</z> </latticeOrigin>
<densit>DOUBLE</density>
<latticeOccupancy>DOUBLE</latticeOccupancy>
</filler>

Implements ObjectFillerBase.

◆ setObject()

void GridFiller::setObject ( std::shared_ptr< Object object)
inlinevirtual

Implements ObjectFillerBase.


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