58 int spatialDimensions = -1,
65 const Eigen::VectorXd &
values()
const;
This class provides a lightweight logger.
Describes a set of data values belonging to the vertices of a mesh.
time::Sample & sample()
Returns a reference to the _sample.
const std::string & getName() const
Returns the name of the data set, as set in the config file.
std::string _name
Name of the data set.
time::Storage & timeStepsStorage()
Returns a reference to the _timeStepsStorage of _waveform.
Data(std::string name, DataID id, int dimension, int spatialDimensions=-1, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE)
Constructor.
int getDimensions() const
Returns the dimension (i.e., number of components) of one data value (i.e number of columns of one gr...
void requireDataGradient()
Set the additional requirement of gradient data.
bool hasGradient() const
Returns if the data contains gradient data.
int _spatialDimensions
Spatial Dimension of one element -> number of rows (only 2, 3 allowed for 2D, 3D).
auto stamples() const
Returns a the stamples from _timeStepsStorage.
void allocateValues(int expectedCount)
Allocates memory for the data values and corresponding gradient values.
int getSpatialDimensions() const
Returns the mesh dimension (i.e., number of rows) of one gradient data value .
int _dimensions
Dimensionality of one data value.
int getWaveformDegree() const
get degree of _waveform.
Eigen::VectorXd sampleAtTime(double time) const
Samples _waveform at given time.
void toZero()
Sets all values to zero.
Eigen::MatrixXd & gradients()
Returns a reference to the gradient data values.
DataID getID() const
Returns the ID of the data set (supposed to be unique).
DataID _id
ID of the data set (supposed to be unique).
bool _hasGradient
Whether gradient data is available or not.
Eigen::VectorXd & values()
Returns a reference to the data values.
time::Waveform _waveform
Waveform wrapping this Data.
void setSampleAtTime(double time, const time::Sample &sample)
Add sample at given time to _timeStepsStorage.
static const int DEFAULT_WAVEFORM_DEGREE
To be used, when the interpolation degree is not defined.
Main namespace of the precice library.