A reference is used to compare to simulated data. More...
#include <Reference.h>
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... | |
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
References MonitorFactory::createMonitor(), MonitoringManager::getmmlFileFolder(), and Monitor::getTypeName().
|
virtual |
destructor
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(), 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 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 |
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(), and AtomIterator::next().
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(), and AtomIterator::next().
std::string Reference::toString | ( | ) |
return a string relative to Reference type