Flow123d
release_2.2.0-37-g336ee74
|
#include <field_formula.hh>
Public Types | |
typedef FieldAlgorithmBase< spacedim, Value >::Point | Point |
typedef FieldAlgorithmBase< spacedim, Value > | FactoryBaseType |
Public Types inherited from FieldAlgorithmBase< spacedim, Value > | |
typedef Space< spacedim >::Point | Point |
Public Member Functions | |
FieldFormula (unsigned int n_comp=0) | |
virtual void | init_from_input (const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data) |
bool | set_time (const TimeStep &time) override |
virtual Value::return_type const & | value (const Point &p, const ElementAccessor< spacedim > &elm) |
virtual void | value_list (const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) |
virtual | ~FieldFormula () |
Public Member Functions inherited from FieldAlgorithmBase< spacedim, Value > | |
FieldAlgorithmBase (unsigned int n_comp=0) | |
virtual void | set_mesh (const Mesh *mesh, bool boundary_domain) |
void | set_component_idx (unsigned int idx) |
unsigned int | n_comp () const |
FieldResult | field_result () const |
virtual double | next_change_time () |
virtual | ~FieldAlgorithmBase () |
Static Public Member Functions | |
static const Input::Type::Record & | get_input_type () |
Implementation. More... | |
Static Public Member Functions inherited from FieldAlgorithmBase< spacedim, Value > | |
static std::string | template_name () |
static Input::Type::Abstract & | get_input_type () |
static const Input::Type::Instance & | get_input_type_instance (Input::Type::Selection value_selection=Input::Type::Selection()) |
static const Input::Type::Record & | get_field_algo_common_keys () |
static std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > | function_factory (const Input::AbstractRecord &rec, const struct FieldAlgoBaseInitData &init_data) |
Private Types | |
typedef StringTensorInput< Value::NRows_, Value::NCols_ > | STI |
Private Attributes | |
StringTensor | formula_matrix_ |
std::vector< std::vector< FunctionParser > > | parser_matrix_ |
std::string | value_input_address_ |
Static Private Attributes | |
static const int | registrar |
Registrar of class to factory. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from FieldAlgorithmBase< spacedim, Value > | |
static const unsigned int | spacedim_ =spacedim |
static constexpr bool | is_enum_valued = boost::is_same<typename Value::element_type, FieldEnum>::value |
Protected Member Functions inherited from FieldAlgorithmBase< spacedim, Value > | |
void | init_unit_conversion_coefficient (const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data) |
Init value of unit_conversion_coefficient_ from input. More... | |
Protected Attributes inherited from FieldAlgorithmBase< spacedim, Value > | |
TimeStep | time_ |
Actual time level; initial value is -infinity. More... | |
Value | value_ |
Last value, prevents passing large values (vectors) by value. More... | |
Value::return_type | r_value_ |
FieldResult | field_result_ |
Indicator of particular values (zero, one) constant over space. More... | |
unsigned int | component_idx_ |
Specify if the field is part of a MultiField and which component it is. More... | |
double | unit_conversion_coefficient_ |
Coeficient of conversion of user-defined unit. More... | |
Class representing fields given by runtime parsed formulas.
Using library: http://warp.povusers.org/FunctionParser/
TODO: correct support for discrete functions (use integer parser), actually we just convert double to int
Definition at line 44 of file field_formula.hh.
typedef FieldAlgorithmBase<spacedim, Value> FieldFormula< spacedim, Value >::FactoryBaseType |
Definition at line 48 of file field_formula.hh.
typedef FieldAlgorithmBase<spacedim, Value>::Point FieldFormula< spacedim, Value >::Point |
Definition at line 47 of file field_formula.hh.
|
private |
Definition at line 77 of file field_formula.hh.
FieldFormula< spacedim, Value >::FieldFormula | ( | unsigned int | n_comp = 0 | ) |
Definition at line 64 of file field_formula.cc.
|
virtual |
Definition at line 192 of file field_formula.cc.
|
static |
Implementation.
Definition at line 33 of file field_formula.cc.
|
virtual |
Function can provide way to initialize itself from the input data.
TODO: make protected, should be called through function factory
Reimplemented from FieldAlgorithmBase< spacedim, Value >.
Definition at line 77 of file field_formula.cc.
|
overridevirtual |
For time dependent formulas returns always true. For time independent formulas returns true only for the first time.
Reimplemented from FieldAlgorithmBase< spacedim, Value >.
Definition at line 87 of file field_formula.cc.
|
virtual |
Returns one value in one given point. ResultType can be used to avoid some costly calculation if the result is trivial.
Implements FieldAlgorithmBase< spacedim, Value >.
Definition at line 159 of file field_formula.cc.
|
virtual |
Returns std::vector of scalar values in several points at once.
Implements FieldAlgorithmBase< spacedim, Value >.
Definition at line 173 of file field_formula.cc.
|
private |
Definition at line 80 of file field_formula.hh.
|
private |
Definition at line 83 of file field_formula.hh.
|
staticprivate |
Registrar of class to factory.
Definition at line 90 of file field_formula.hh.
|
private |
Definition at line 87 of file field_formula.hh.