ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | List of all members
Virial2DProfile Class Referencefinal
Inheritance diagram for Virial2DProfile:
ProfileBase

Public Member Functions

 Virial2DProfile (DensityProfile *densProf, DOFProfile *dofProf, KineticProfile *kinProf)
 
void record (Molecule &mol, unsigned long uID) final
 The recording step defines what kind of data needs to be recorded for a single molecule with a corresponding uID. More...
 
void collectAppend (DomainDecompBase *domainDecomp, unsigned long uID) final
 Append all necessary communication per bin to the DomainDecomposition. Append from e.g. _localProfile. More...
 
void collectRetrieve (DomainDecompBase *domainDecomp, unsigned long uID) final
 Get global values after AllReduceSum per bin. Write to e.g. _globalProfile. More...
 
void output (string prefix, long unsigned accumulatedDatasets) final
 Whatever is necessary to output for this profile. More...
 
void reset (unsigned long uID) final
 Used to reset all array contents for a specific uID in order to start the next recording timeframe. More...
 
int comms () final
 1D profiles like a number density profile should return 1 here. 3D profiles that have 3 entries per bin that need to be communicated would need to return 3. Adjust as needed. Same number as commAppends in collectAppend. More...
 
- Public Member Functions inherited from ProfileBase
virtual void init (SamplingInformation &samplingInformation)
 Init function is given a pointer to the KartesianProfile object handling this profile. Same for all profiles. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ProfileBase
void writeMatrix (ofstream &outfile)
 Matrix writing routine to avoid code duplication. More...
 
void writeKartMatrix (ofstream &outfile)
 
void writeSimpleMatrix (ofstream &outfile)
 STUB for simple Matrix output without headers. More...
 
void writeCylMatrix (ofstream &outfile)
 cylinder Matrix output More...
 
- Protected Attributes inherited from ProfileBase
string _profilePrefix
 
SamplingInformation _samplInfo
 
long _accumulatedDatasets = -1
 

Member Function Documentation

◆ collectAppend()

void Virial2DProfile::collectAppend ( DomainDecompBase domainDecomp,
unsigned long  uID 
)
inlinefinalvirtual

Append all necessary communication per bin to the DomainDecomposition. Append from e.g. _localProfile.

Parameters
domainDecompDomainDecomposition handling the communication.
uIDuID of molecule in sampling grid, needed to put data in right spot in the profile arrays.

Implements ProfileBase.

◆ collectRetrieve()

void Virial2DProfile::collectRetrieve ( DomainDecompBase domainDecomp,
unsigned long  uID 
)
inlinefinalvirtual

Get global values after AllReduceSum per bin. Write to e.g. _globalProfile.

Parameters
domainDecompDomainDecomposition handling the communication.
uIDuID of molecule in sampling grid, needed to put data in right spot in the profile arrays.

Implements ProfileBase.

◆ comms()

int Virial2DProfile::comms ( )
inlinefinalvirtual

1D profiles like a number density profile should return 1 here. 3D profiles that have 3 entries per bin that need to be communicated would need to return 3. Adjust as needed. Same number as commAppends in collectAppend.

Returns
Number of nedded communications per bin so the communicator can be setup correctly.

Implements ProfileBase.

◆ output()

void Virial2DProfile::output ( string  prefix,
long unsigned  accumulatedDatasets 
)
finalvirtual

Whatever is necessary to output for this profile.

This function varies wildly between profiles. The Profile should output to its desired format here and handle all file IO for one profile writing step.

Parameters
prefixFile prefix including the global _outputPrefix for all profiles and the current timestep. Should be appended by some specific file ending for this specific profile.

Implements ProfileBase.

◆ record()

void Virial2DProfile::record ( Molecule mol,
unsigned long  uID 
)
inlinefinalvirtual

The recording step defines what kind of data needs to be recorded for a single molecule with a corresponding uID.

Parameters
molReference to Molecule, needed to extract info such as velocity or Virial.
uIDuID of molecule in sampling grid, needed to put data in right spot in the profile arrays.

Implements ProfileBase.

◆ reset()

void Virial2DProfile::reset ( unsigned long  uID)
inlinefinalvirtual

Used to reset all array contents for a specific uID in order to start the next recording timeframe.

Parameters
uIDuID of molecule in sampling grid, needed to put data in right spot in the profile arrays.

Implements ProfileBase.


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