11#ifndef _TIME_SCALING_HPP_
12#define _TIME_SCALING_HPP_
24 virtual double getScale(
const double time);
42 TimeScale(std::string file_name =
"",
bool error_if_file_not_given =
false);
54 TimeScale(std::string file_name, std::string delimiter,
55 bool error_if_file_not_given =
false);
86 static const std::string
100 bool error_if_file_not_given =
false);
103 bool error_if_file_not_given =
false);
112 std::map<double, FTensor::Tensor1<double, SPACE_DIM>>
tSeries;
119 [
this](
double time) {
FTensor::Index< 'i', SPACE_DIM > i
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
virtual double getScale(const double time)
Get scaling at given time.
virtual ~ScalingMethod()=default
Force scale operator for reading two columns.
double getLinearScale(const double time)
Returns the value of time.
double getScale(const double time)
Get scaling at a given time.
double getScaleFromData(const double time)
Get scaling at a given time when the scalar values have been provided. Uses linear interpolation on t...
static const std::string defaultDelimiter
comma or space
std::function< double(double)> scalingMethod
MoFEMErrorCode timeData(std::string delimiter)
std::map< double, double > tSeries
Force scale operator for reading four columns (time and vector)
std::map< double, FTensor::Tensor1< double, SPACE_DIM > > tSeries
TimeScaleVector(std::string name="-time_vector_file", bool error_if_file_not_given=false)
std::function< FTensor::Tensor1< double, SPACE_DIM >(double)> scalingMethod
MoFEMErrorCode timeData()
virtual FTensor::Tensor1< double, SPACE_DIM > getVector(const double time)
virtual FTensor::Tensor1< double, SPACE_DIM > getVectorFromData(const double time)