A reference is used to compare to simulated data. More...
#include <Reference.h>
Classes | |
struct | timeStep |
private structure with monitors for a time step More... | |
Public Member Functions | |
bool | getDistanceToTriangularMesh (double pos[3], double &dist) |
get distance to a triangular mesh, the target of the reference must contain triangles. More... | |
bool | getMonitoredData (std::string type, double ref[]) |
get the the values of a given monitor which do not depend of time or an atom (e.g. More... | |
bool | getMonitoredData (std::string type, double time, double &realTime, double ref[]) |
get the the values of a given monitor at a given time which do not depend an atom (e.g. More... | |
bool | getMonitoredData (std::string type, double time, int index, double &realTime, double ref[]) |
get the the values of a given monitor at a given time and a given atom's index (e.g. More... | |
bool | getNearest (double pos[3], double ref[3]) |
get the nearest reference point in the "target" using "Position" monitor of the PML Reference. More... | |
bool | getNearest (double pos[3], double time, double ref[3]) |
get the nearest reference point in the "target" using "Position" monitor at given time More... | |
Reference (mml::Reference reference, MonitoringManager *monitoringManager) | |
constructor More... | |
std::string | toString () |
return a string relative to Reference type More... | |
virtual | ~Reference () |
destructor More... | |
Private Attributes | |
int | CurrentIndex |
current data index, stored to avoid search from beginning in the data vector More... | |
std::vector< timeStep * > | data |
vector which contain alls monitors for each time step More... | |
std::unique_ptr< mml::MonitoringOut > | mmlOut |
Object in the file generated by xsdcxx. More... | |
std::string | mmlOutFile |
the mmlOut document More... | |
MonitoringManager * | monitoringManager |
monitoring manager More... | |
PhysicalModel * | pml |
pml of the reference More... | |
std::string | target |
target More... | |
A reference is used to compare to simulated data.
An instance of this class corresponds to the data-binding for type Reference of MonitoringModel.xsd.
A reference therefore contains:
All MonitoringOut data is also managed by this class. A MonitoringOut contains:
The PML document given in the MMLout is called the PML Reference.
The PML Reference can either be at any state (beginning, rest shape, final step...etc...) It is mainly used to get the list of Structure/Component to be used in correlation with the target field of the reference.
Reference::Reference | ( | mml::Reference | reference, |
MonitoringManager * | monitoringManager | ||
) |
constructor
|
virtual |
destructor
References data, Reference::timeStep::monitorsMap, and pml.
bool Reference::getDistanceToTriangularMesh | ( | double | pos[3], |
double & | dist | ||
) |
get distance to a triangular mesh, the target of the reference must contain triangles.
This is a fast method that gives the distance relatively to the triangles in the PML Reference.
pos | atom's position (with eventual offset) |
dist | the distance |
References a, AtomIterator::begin(), AtomIterator::currentAtom(), distance(), distanceToTrianglePlane(), AtomIterator::end(), Atom::getPosition(), Cell::getProperties(), StructuralComponent::getStructure(), StructureProperties::getType(), AtomIterator::next(), pml, target, and StructureProperties::TRIANGLE.
bool Reference::getMonitoredData | ( | std::string | type, |
double | ref[] | ||
) |
get the the values of a given monitor which do not depend of time or an atom (e.g.
geometrical data)
type | name of the monitor, must be a existing monitor in the mmlOut document |
ref | a table where data will be stored |
Referenced by getNearest().
bool Reference::getMonitoredData | ( | std::string | type, |
double | time, | ||
double & | realTime, | ||
double | ref[] | ||
) |
get the the values of a given monitor at a given time which do not depend an atom (e.g.
volume) if there is no corresponding time in reference, it return data for the first higher time.
type | name of the monitor, must be a existing monitor in the mmlOut document |
time | time to get the values |
realTime | the nearest time found if realTime=infinity, the nearest is the final state |
ref | a table where data will be stored |
References CurrentIndex, data, and Monitor::SCALAR.
bool Reference::getMonitoredData | ( | std::string | type, |
double | time, | ||
int | index, | ||
double & | realTime, | ||
double | ref[] | ||
) |
get the the values of a given monitor at a given time and a given atom's index (e.g.
position)
type | name of the monitor, must be a existing monitor in the mmlOut document |
time | time to get the values |
index | atom's index |
realTime | the nearest time found if realTime=infinity, the nearest is the final state |
ref | a table where data will be stored |
References CurrentIndex, and data.
bool Reference::getNearest | ( | double | pos[3], |
double | ref[3] | ||
) |
get the nearest reference point in the "target" using "Position" monitor of the PML Reference.
This is a fast method that gives the nearest position relatively to the PML Reference.
pos | atom's position (with eventual offset) |
ref | a table where positon of the nearest atom in reference will be stored |
References AtomIterator::begin(), AtomIterator::currentAtom(), distance(), AtomIterator::end(), Atom::getPosition(), AtomIterator::next(), pml, and target.
bool Reference::getNearest | ( | double | pos[3], |
double | time, | ||
double | ref[3] | ||
) |
get the nearest reference point in the "target" using "Position" monitor at given time
pos | atom's position (with eventual offset) |
time | time to get the Position |
ref | a table where positon of the nearest atom in reference will be stored |
References AtomIterator::begin(), AtomIterator::currentAtom(), distance(), AtomIterator::end(), Structure::getIndex(), getMonitoredData(), AtomIterator::next(), pml, and target.
std::string Reference::toString | ( | ) |
return a string relative to Reference type
References mmlOutFile.
|
private |
current data index, stored to avoid search from beginning in the data vector
Referenced by getMonitoredData().
|
private |
vector which contain alls monitors for each time step
Referenced by getMonitoredData(), and ~Reference().
|
private |
Object in the file generated by xsdcxx.
|
private |
the mmlOut document
Referenced by toString().
|
private |
monitoring manager
|
private |
pml of the reference
Referenced by getDistanceToTriangularMesh(), getNearest(), and ~Reference().
|
private |
target
Referenced by getDistanceToTriangularMesh(), and getNearest().