preCICE v3.2.0
|
Describes a set of data values belonging to the vertices of a mesh. More...
#include <Data.hpp>
Public Types | |
enum | typeName { SCALAR , VECTOR } |
Public Member Functions | |
Data (std::string name, DataID id, int dimension, int spatialDimensions=-1, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE) | |
Constructor. | |
Eigen::VectorXd & | values () |
Returns a reference to the data values. | |
const Eigen::VectorXd & | values () const |
Returns a const reference to the data values. | |
const Eigen::MatrixXd & | gradients () const |
Returns a const reference to the gradient data values. | |
const time::Sample & | sample () const |
Returns a const reference to the _sample. | |
time::SampleResult | sampleAtTime (double time) const |
Samples _waveform at given time. | |
int | getWaveformDegree () const |
get degree of _waveform. | |
time::Storage & | timeStepsStorage () |
Returns a reference to the _timeStepsStorage of _waveform. | |
void | moveToNextWindow () |
auto | stamples () const |
Returns a the stamples from _timeStepsStorage. | |
void | setSampleAtTime (double time, const time::Sample &sample) |
Add sample at given time to _timeStepsStorage. | |
void | setGlobalSample (const time::Sample &sample) |
Set _sample. | |
void | emplaceSampleAtTime (double time) |
Creates an empty sample at given time. | |
void | emplaceSampleAtTime (double time, std::initializer_list< double > values) |
Creates a sample at given time with given values. | |
void | emplaceSampleAtTime (double time, std::initializer_list< double > values, std::initializer_list< double > gradients) |
Creates a sample at given time with given values and gradients. | |
const std::string & | getName () const |
Returns the name of the data set, as set in the config file. | |
DataID | getID () const |
Returns the ID of the data set (supposed to be unique). | |
bool | hasGradient () const |
Returns if the data contains gradient data. | |
bool | hasSamples () const |
Returns if there are sample of this data. | |
void | requireDataGradient () |
Set the additional requirement of gradient data. | |
int | getSpatialDimensions () const |
Returns the mesh dimension (i.e., number of rows) of one gradient data value . | |
int | getDimensions () const |
Returns the dimension (i.e., number of components) of one data value (i.e number of columns of one gradient data value). | |
void | allocateValues (int expectedCount) |
Allocates memory for the data values and corresponding gradient values. |
Private Attributes | |
logging::Logger | _log {"mesh::Data"} |
time::Waveform | _waveform |
Waveform wrapping this Data. | |
std::string | _name |
Name of the data set. | |
DataID | _id |
ID of the data set (supposed to be unique). | |
int | _dimensions |
Dimensionality of one data value. | |
int | _spatialDimensions |
Spatial Dimension of one element -> number of rows (only 2, 3 allowed for 2D, 3D). | |
bool | _hasGradient = false |
Whether gradient data is available or not. | |
time::Sample | _sample |
Describes a set of data values belonging to the vertices of a mesh.
precice::mesh::Data::Data | ( | std::string | name, |
DataID | id, | ||
int | dimension, | ||
int | spatialDimensions = -1, | ||
int | waveformDegree = time::Time::DEFAULT_WAVEFORM_DEGREE ) |
void precice::mesh::Data::allocateValues | ( | int | expectedCount | ) |
void precice::mesh::Data::emplaceSampleAtTime | ( | double | time | ) |
void precice::mesh::Data::emplaceSampleAtTime | ( | double | time, |
std::initializer_list< double > | values ) |
void precice::mesh::Data::emplaceSampleAtTime | ( | double | time, |
std::initializer_list< double > | values, | ||
std::initializer_list< double > | gradients ) |
int precice::mesh::Data::getDimensions | ( | ) | const |
DataID precice::mesh::Data::getID | ( | ) | const |
const std::string & precice::mesh::Data::getName | ( | ) | const |
int precice::mesh::Data::getSpatialDimensions | ( | ) | const |
int precice::mesh::Data::getWaveformDegree | ( | ) | const |
const Eigen::MatrixXd & precice::mesh::Data::gradients | ( | ) | const |
bool precice::mesh::Data::hasGradient | ( | ) | const |
bool precice::mesh::Data::hasSamples | ( | ) | const |
void precice::mesh::Data::moveToNextWindow | ( | ) |
void precice::mesh::Data::requireDataGradient | ( | ) |
const time::Sample & precice::mesh::Data::sample | ( | ) | const |
time::SampleResult precice::mesh::Data::sampleAtTime | ( | double | time | ) | const |
void precice::mesh::Data::setGlobalSample | ( | const time::Sample & | sample | ) |
void precice::mesh::Data::setSampleAtTime | ( | double | time, |
const time::Sample & | sample ) |
|
inline |
time::Storage & precice::mesh::Data::timeStepsStorage | ( | ) |
Eigen::VectorXd & precice::mesh::Data::values | ( | ) |
const Eigen::VectorXd & precice::mesh::Data::values | ( | ) | const |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |