4#include <initializer_list>
55 int spatialDimensions = -1,
65 int spatialDimensions,
67 std::vector<std::optional<double>>
69 std::vector<std::optional<double>>
76 const Eigen::VectorXd &
values()
const;
130 const std::string &
getName()
const;
This class provides a lightweight logger.
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.
bool hasSamples() const
Returns if there are sample of this data.
Data(std::string name, DataID id, int dimension, int spatialDimensions=-1, int waveformDegree=time::Time::DEFAULT_WAVEFORM_DEGREE)
Constructor.
std::vector< std::optional< double > > getUpperBound() const
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 the waveform.
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.
void setGlobalSample(const time::Sample &sample)
Set _sample.
time::SampleResult sampleAtTime(double time) const
Samples _waveform at given time.
std::vector< std::optional< double > > getLowerBound() const
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.
std::vector< std::optional< double > > _lowerBound
Lower bound for data values. This vector with optional elements has size of the data dimension....
const time::Sample & sample() const
Returns a const reference to the _sample.
time::Waveform _waveform
Sample storage of this Data.
std::vector< std::optional< double > > _upperBound
Upper bound for data values. This vector with optional elements has size of the data dimension....
time::Waveform & waveform()
Returns a reference to the waveform.
const Eigen::MatrixXd & gradients() const
Returns a const reference to the gradient data values.
void setSampleAtTime(double time, const time::Sample &sample)
Add sample at given time to the waveform.
void emplaceSampleAtTime(double time)
Creates an empty sample at given time.
Container and creator for meshes.
static const int DEFAULT_WAVEFORM_DEGREE
To be used, when the interpolation degree is not defined.
provides Mesh, Data and primitives.
contains the time interpolation logic.