Describes a set of data values belonging to the vertices of a mesh.
More...
#include <Data.hpp>
|
| 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.
|
|
Describes a set of data values belonging to the vertices of a mesh.
Definition at line 27 of file Data.hpp.
◆ typeName
◆ Data()
Constructor.
Definition at line 12 of file Data.cpp.
◆ allocateValues()
void precice::mesh::Data::allocateValues |
( |
int | expectedCount | ) |
|
Allocates memory for the data values and corresponding gradient values.
- Parameters
-
expectedCount | expected number of values count (i.e. number of mesh vertices) |
Definition at line 135 of file Data.cpp.
◆ emplaceSampleAtTime() [1/3]
void precice::mesh::Data::emplaceSampleAtTime |
( |
double | time | ) |
|
Creates an empty sample at given time.
Definition at line 85 of file Data.cpp.
◆ emplaceSampleAtTime() [2/3]
Creates a sample at given time with given values.
Definition at line 90 of file Data.cpp.
◆ emplaceSampleAtTime() [3/3]
Creates a sample at given time with given values and gradients.
Definition at line 96 of file Data.cpp.
◆ getDimensions()
int precice::mesh::Data::getDimensions |
( |
| ) |
const |
Returns the dimension (i.e., number of components) of one data value (i.e number of columns of one gradient data value).
Definition at line 130 of file Data.cpp.
◆ getID()
DataID precice::mesh::Data::getID |
( |
| ) |
const |
Returns the ID of the data set (supposed to be unique).
Definition at line 110 of file Data.cpp.
◆ getName()
const std::string & precice::mesh::Data::getName |
( |
| ) |
const |
Returns the name of the data set, as set in the config file.
Definition at line 105 of file Data.cpp.
◆ getSpatialDimensions()
int precice::mesh::Data::getSpatialDimensions |
( |
| ) |
const |
Returns the mesh dimension (i.e., number of rows) of one gradient data value .
Definition at line 173 of file Data.cpp.
◆ getWaveformDegree()
int precice::mesh::Data::getWaveformDegree |
( |
| ) |
const |
get degree of _waveform.
- Returns
- int degree of _waveform
Definition at line 53 of file Data.cpp.
◆ gradients()
const Eigen::MatrixXd & precice::mesh::Data::gradients |
( |
| ) |
const |
Returns a const reference to the gradient data values.
Definition at line 38 of file Data.cpp.
◆ hasGradient()
bool precice::mesh::Data::hasGradient |
( |
| ) |
const |
Returns if the data contains gradient data.
Definition at line 115 of file Data.cpp.
◆ hasSamples()
bool precice::mesh::Data::hasSamples |
( |
| ) |
const |
Returns if there are sample of this data.
Definition at line 120 of file Data.cpp.
◆ moveToNextWindow()
void precice::mesh::Data::moveToNextWindow |
( |
| ) |
|
◆ requireDataGradient()
void precice::mesh::Data::requireDataGradient |
( |
| ) |
|
Set the additional requirement of gradient data.
Definition at line 125 of file Data.cpp.
◆ sample()
Returns a const reference to the _sample.
Definition at line 43 of file Data.cpp.
◆ sampleAtTime()
Samples _waveform at given time.
- Parameters
-
time | Time where the sampling happens. |
- Returns
- Value of _waveform at time time.
Definition at line 48 of file Data.cpp.
◆ setGlobalSample()
void precice::mesh::Data::setGlobalSample |
( |
const time::Sample & | sample | ) |
|
Set _sample.
Definition at line 79 of file Data.cpp.
◆ setSampleAtTime()
void precice::mesh::Data::setSampleAtTime |
( |
double | time, |
|
|
const time::Sample & | sample ) |
Add sample at given time to _timeStepsStorage.
Definition at line 72 of file Data.cpp.
◆ stamples()
auto precice::mesh::Data::stamples |
( |
| ) |
const |
|
inline |
Returns a the stamples from _timeStepsStorage.
Definition at line 92 of file Data.hpp.
◆ timeStepsStorage()
Returns a reference to the _timeStepsStorage of _waveform.
Definition at line 58 of file Data.cpp.
◆ values() [1/2]
Eigen::VectorXd & precice::mesh::Data::values |
( |
| ) |
|
Returns a reference to the data values.
Definition at line 28 of file Data.cpp.
◆ values() [2/2]
const Eigen::VectorXd & precice::mesh::Data::values |
( |
| ) |
const |
Returns a const reference to the data values.
Definition at line 33 of file Data.cpp.
◆ _dimensions
int precice::mesh::Data::_dimensions |
|
private |
Dimensionality of one data value.
Definition at line 153 of file Data.hpp.
◆ _hasGradient
bool precice::mesh::Data::_hasGradient = false |
|
private |
Whether gradient data is available or not.
Definition at line 159 of file Data.hpp.
◆ _id
DataID precice::mesh::Data::_id |
|
private |
ID of the data set (supposed to be unique).
Definition at line 150 of file Data.hpp.
◆ _log
◆ _name
Name of the data set.
Definition at line 147 of file Data.hpp.
◆ _sample
◆ _spatialDimensions
int precice::mesh::Data::_spatialDimensions |
|
private |
Spatial Dimension of one element -> number of rows (only 2, 3 allowed for 2D, 3D).
Definition at line 156 of file Data.hpp.
◆ _waveform
The documentation for this class was generated from the following files: