MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
PointData< nDim, SolverType > Class Template Reference

This class is responsible for the point data feature. It records the state of all sampling variables at specified intervals at specified points. More...

#include <samplingdata.h>

Inheritance diagram for PointData< nDim, SolverType >:
[legend]
Collaboration diagram for PointData< nDim, SolverType >:
[legend]

Public Types

using Base = SamplingData< nDim, SolverType >
 

Public Member Functions

 PointData (SolverType &solver_)
 
virtual ~PointData ()
 
MInt loadInputFile (const MString inputFileName, const MInt NotUsed(fileNo), std::vector< MFloat > &coordinates) override
 Loads an input file with points for the point data feature. More...
 
MString getBaseName () const override
 Return base name of derived class, e.g. used for naming properties and output file names. More...
 
MBool isMpiRoot () const
 
MPI_Comm mpiComm () const
 
SolverTypesolver ()
 Return reference to solver. More...
 
const SolverTypesolver () const
 
MInt solverId () const
 
- Public Member Functions inherited from SamplingData< nDim, SolverType >
 SamplingData (SolverType &solver)
 
void init ()
 
void save (MBool finalTimestep)
 
void setInputOutputProperties ()
 
MBool enabled () const
 
virtual MInt loadInputFile (const MString NotUsed(inputFileName), const MInt NotUsed(fileNo), std::vector< MFloat > &NotUsed(coordinates))
 
virtual MString getBaseName () const
 Return base name of derived class, e.g. used for naming properties and output file names. More...
 

Public Attributes

MBool m_enabled
 
std::vector< SamplingDataSeriesm_timeSeries
 Holds all properties and buffers for each input file. More...
 

Additional Inherited Members

- Protected Member Functions inherited from SamplingData< nDim, SolverType >
void init (SamplingDataSeries &timeSeries)
 
void save (SamplingDataSeries &timeSeries, MBool finalTimeStep)
 Saves sampling data Saves all states of conservative variables at specified points. Also writes sampling data files in specified intervals. More...
 
virtual MBool hasInputDataFile (const MInt fileNo) const
 Check if an input file exists, might be overwritten in derived class if points are generated. More...
 
virtual MBool generatePoints () const
 Default behaviour for point generation which can be overwritten in derived class. More...
 
virtual MInt noSamplingPoints (const MInt NotUsed(fileNo))
 Return the number of sampling points which are generated by the derived class (no input file) More...
 
virtual void getSamplingPoint (const MInt NotUsed(fileNo), const MInt NotUsed(pointId), MFloat *const NotUsed(coordinates))
 Return the coordinates of the sampling point with the given id when generating points. More...
 
void indexXD (const MInt index, const MInt *const nPoints, MInt *indexXD)
 Convert 1D index into 2D/3D index. More...
 
void saveSamplingPointCoordinates (SamplingDataSeries &timeSeries)
 Save point coordinates of time series. More...
 
virtual void readAdditionalProperties (const MInt NotUsed(fileNo))
 Read additional properties which are required by the derived class. More...
 
MInt solverId () const
 
MBool isMpiRoot () const
 
MPI_Comm mpiComm () const
 
MInt noVars () const
 Return total number of sampling variables. More...
 
MString getFileBaseName () const
 Return base name of files for used sampling feature. More...
 
SolverTypesolver ()
 Return reference to solver. More...
 
const SolverTypesolver () const
 
- Protected Attributes inherited from SamplingData< nDim, SolverType >
MBool m_enabled = false
 
MBool m_interpolatePointData
 
std::vector< SamplingDataSeriesm_timeSeries {}
 Holds all properties and buffers for each input file. More...
 
std::vector< MIntm_solverSamplingVarIds {}
 List of sampling variables. More...
 
std::vector< MIntm_noSolverSamplingVars {}
 Number of variables for each sampling variable. More...
 
std::vector< std::vector< MString > > m_solverSamplingVarNames {}
 List of variable names for each sampling variable. More...
 

Detailed Description

template<MInt nDim, class SolverType>
class PointData< nDim, SolverType >
Author
Fabian Klemp f.kle.nosp@m.mp@a.nosp@m.ia.rw.nosp@m.th-a.nosp@m.achen.nosp@m..de
Date
2016-09-27

Currently the only way to specify the points is via a input file.

Definition at line 164 of file samplingdata.h.

Member Typedef Documentation

◆ Base

template<MInt nDim, class SolverType >
using PointData< nDim, SolverType >::Base = SamplingData<nDim, SolverType>

Definition at line 166 of file samplingdata.h.

Constructor & Destructor Documentation

◆ PointData()

template<MInt nDim, class SolverType >
PointData< nDim, SolverType >::PointData ( SolverType solver_)
inline

Definition at line 176 of file samplingdata.h.

This base class is responsible for the sampling data feature that provides the required general metho...
Definition: samplingdata.h:35

◆ ~PointData()

template<MInt nDim, class SolverType >
virtual PointData< nDim, SolverType >::~PointData ( )
inlinevirtual

Definition at line 177 of file samplingdata.h.

177{};

Member Function Documentation

◆ getBaseName()

template<MInt nDim, class SolverType >
MString PointData< nDim, SolverType >::getBaseName ( ) const
inlineoverridevirtual

Reimplemented from SamplingData< nDim, SolverType >.

Definition at line 182 of file samplingdata.h.

182{ return "point"; }

◆ isMpiRoot()

template<MInt nDim, class SolverType >
MBool SamplingData< nDim, SolverType >::isMpiRoot ( ) const
inline

Definition at line 119 of file samplingdata.h.

119{ return m_solver.domainId() == 0; }
SolverType & m_solver
Definition: samplingdata.h:150

◆ loadInputFile()

template<MInt nDim, class SolverType >
MInt PointData< nDim, SolverType >::loadInputFile ( const MString  inputFileName,
const MInt   NotUsedfileNo,
std::vector< MFloat > &  coordinates 
)
override

Definition at line 1077 of file samplingdata.h.

1079 {
1080 TRACE();
1081 if(!isMpiRoot()) {
1082 TERMM(1, "PointData::loadInputFile() should only be called by mpi root process!");
1083 }
1084
1085 return loadPointCoordinatesFromFile(inputFileName, nDim, coordinates);
1086}
MBool isMpiRoot() const
Definition: samplingdata.h:119
MInt loadPointCoordinatesFromFile(const MString inputFileName, const MInt nDim, std::vector< MFloat > &coordinates)
Loads point coordinates from an input file.
Definition: functions.cpp:182

◆ mpiComm()

template<MInt nDim, class SolverType >
MPI_Comm SamplingData< nDim, SolverType >::mpiComm ( ) const
inline

Definition at line 120 of file samplingdata.h.

120{ return m_solver.mpiComm(); }

◆ solver() [1/2]

template<MInt nDim, class SolverType >
SolverType & SamplingData< nDim, SolverType >::solver ( )
inline

Definition at line 129 of file samplingdata.h.

129{ return m_solver; }

◆ solver() [2/2]

template<MInt nDim, class SolverType >
const SolverType & SamplingData< nDim, SolverType >::solver ( ) const
inline

Definition at line 130 of file samplingdata.h.

130{ return m_solver; }

◆ solverId()

template<MInt nDim, class SolverType >
MInt SamplingData< nDim, SolverType >::solverId ( ) const
inline

Definition at line 118 of file samplingdata.h.

118{ return m_solver.solverId(); }

Member Data Documentation

◆ m_enabled

template<MInt nDim, class SolverType >
MBool SamplingData< nDim, SolverType >::m_enabled

Definition at line 134 of file samplingdata.h.

◆ m_timeSeries

template<MInt nDim, class SolverType >
std::vector<SamplingDataSeries> SamplingData< nDim, SolverType >::m_timeSeries

Definition at line 138 of file samplingdata.h.


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