v0.14.0 |
Force scale operator for reading two columns. More...
#include <src/boundary_conditions/ScalingMethod.hpp>
Public Member Functions | |
TimeScale (std::string file_name="", bool error_if_file_not_given=false) | |
TimeScale constructor. More... | |
TimeScale (std::string file_name, std::string delimiter, bool error_if_file_not_given=false) | |
TimeScale constructor. More... | |
double | getScale (const double time) |
Get scaling at a given time. More... | |
Public Member Functions inherited from MoFEM::ScalingMethod | |
ScalingMethod ()=default | |
virtual | ~ScalingMethod ()=default |
Private Member Functions | |
MoFEMErrorCode | timeData (std::string fileName, std::string delimiter) |
double | getScaleFromData (const double time) |
Get scaling at a given time when the scalar values have been provided. Uses linear interpolation on the nearest time range to calculate scaling if the provided time is not present in the data. More... | |
double | getLinearScale (const double time) |
Returns the value of time. More... | |
Private Attributes | |
std::map< double, double > | tSeries |
std::string | fileName = "" |
std::string | fileNameFlag = "-time_scalar_file" |
bool | errorIfFileNotGiven |
std::function< double(double)> | scalingMethod |
Static Private Attributes | |
static const std::string | defaultDelimiter |
comma or space More... | |
Force scale operator for reading two columns.
Definition at line 32 of file ScalingMethod.hpp.
MoFEM::TimeScale::TimeScale | ( | std::string | file_name = "" , |
bool | error_if_file_not_given = false |
||
) |
TimeScale constructor.
file_name | Path to input CSV data file |
error_if_file_not_given | If file name is not provided, the constructor will throw an error if this flag is set to true or throw a warning and use linear scaling if this flag is set to false |
Definition at line 22 of file ScalingMethod.cpp.
MoFEM::TimeScale::TimeScale | ( | std::string | file_name, |
std::string | delimiter, | ||
bool | error_if_file_not_given = false |
||
) |
TimeScale constructor.
file_name | Path to input CSV data file |
delimiter | Character which is used to separate the data in a csv row, by default it is ',' |
error_if_file_not_given | If file name is not provided, the constructor will throw an error if this flag is set to true or throw a warning and use linear scaling if this flag is set to false |
Definition at line 25 of file ScalingMethod.cpp.
Get scaling at a given time.
time |
Reimplemented from MoFEM::ScalingMethod.
Reimplemented in Example::DynamicFirstOrderConsConstantTimeScale, Example::DynamicFirstOrderConsSinusTimeScale, LinMomTimeScale, Example::ScaledTimeScale, Example::ScaledTimeScale, and Contact::ScaledTimeScale.
Definition at line 133 of file ScalingMethod.cpp.
Get scaling at a given time when the scalar values have been provided. Uses linear interpolation on the nearest time range to calculate scaling if the provided time is not present in the data.
Definition at line 105 of file ScalingMethod.cpp.
|
private |
Definition at line 32 of file ScalingMethod.cpp.
|
staticprivate |
|
private |
Definition at line 89 of file ScalingMethod.hpp.
|
private |
Definition at line 83 of file ScalingMethod.hpp.
|
private |
Definition at line 84 of file ScalingMethod.hpp.
Definition at line 90 of file ScalingMethod.hpp.
Definition at line 82 of file ScalingMethod.hpp.