Flow123d  SM_CI_GNU_Integration_tests-46bf8c3
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
FieldTimeFunction< spacedim, Value > Class Template Reference

#include <field_time_function.hh>

Inheritance diagram for FieldTimeFunction< spacedim, Value >:
Inheritance graph
[legend]
Collaboration diagram for FieldTimeFunction< spacedim, Value >:
Collaboration graph
[legend]

Public Types

typedef FieldAlgorithmBase< spacedim, Value >::Point Point
 
typedef FieldAlgorithmBase< spacedim, ValueFactoryBaseType
 
- Public Types inherited from FieldConstant< spacedim, Value >
typedef FieldAlgorithmBase< spacedim, Value >::Point Point
 
typedef FieldAlgorithmBase< spacedim, ValueFactoryBaseType
 
- Public Types inherited from FieldAlgorithmBase< spacedim, Value >
typedef Space< spacedim >::Point Point
 

Public Member Functions

 FieldTimeFunction (unsigned int n_comp=0)
 
void init_from_input (const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data) override
 
bool set_time (const TimeStep &time) override
 
- Public Member Functions inherited from FieldConstant< spacedim, Value >
 FieldConstant (unsigned int n_comp=0)
 
FieldConstant< spacedim, Value > & set_value (const typename Value::return_type &val)
 
void cache_update (FieldValueCache< typename Value::element_type > &data_cache, ElementCacheMap &cache_map, unsigned int region_patch_idx) override
 
virtual ~FieldConstant ()
 
- Public Member Functions inherited from FieldAlgorithmBase< spacedim, Value >
 TYPEDEF_ERR_INFO (EI_Field, std::string)
 
 DECLARE_EXCEPTION (ExcInputInitUnsupported,<< "The field "<< EI_Field::qval<< " do not support initialization from input.\n")
 
 FieldAlgorithmBase (unsigned int n_comp=0)
 
virtual void set_mesh (const Mesh *mesh)
 
void set_component_idx (unsigned int idx)
 
unsigned int n_comp () const
 
FieldResult field_result () const
 
virtual double next_change_time ()
 
virtual void cache_reinit (const ElementCacheMap &cache_map)
 Allows reinit data members or structures in descendants during reinit of FieldValueCache of 'parental' Field<> More...
 
virtual void set_native_dh (std::shared_ptr< DOFHandlerMultiDim >)
 
bool is_constant_in_space () const
 
virtual std::vector< const FieldCommon * > set_dependency (FMT_UNUSED FieldSet &field_set)
 
virtual ~FieldAlgorithmBase ()
 

Static Public Member Functions

static const Input::Type::Recordget_input_type ()
 
- Static Public Member Functions inherited from FieldConstant< spacedim, Value >
static const Input::Type::Recordget_input_type ()
 
static Input::Type::Array get_tensor_input_type ()
 Implementation. More...
 
- Static Public Member Functions inherited from FieldAlgorithmBase< spacedim, Value >
static std::string template_name ()
 
static Input::Type::Abstractget_input_type ()
 
static const Input::Type::Instanceget_input_type_instance (Input::Type::Selection value_selection=Input::Type::Selection())
 
static const Input::Type::Recordget_field_algo_common_keys ()
 
static std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > function_factory (const Input::AbstractRecord &rec, const struct FieldAlgoBaseInitData &init_data)
 

Private Attributes

Input::Record in_rec_
 Accessor to Input::Record. More...
 
std::string field_name_
 
UnitSIunit_si_
 
std::pair< double, double > limits_
 

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 = std::is_same<typename Value::element_type, FieldEnum>::value
 
- Protected Member Functions inherited from FieldConstant< spacedim, Value >
void check_field_limits (const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
 Compare field value with given minimal and maximal limits. More...
 
- 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...
 
bool is_constant_in_space_
 Flag detects that field is only dependent on time. More...
 

Detailed Description

template<int spacedim, class Value>
class FieldTimeFunction< spacedim, Value >

Class representing spatially fields defined by time-dependent function.

Definition at line 42 of file field_time_function.hh.

Member Typedef Documentation

◆ FactoryBaseType

template<int spacedim, class Value >
typedef FieldAlgorithmBase<spacedim, Value> FieldTimeFunction< spacedim, Value >::FactoryBaseType

Definition at line 46 of file field_time_function.hh.

◆ Point

template<int spacedim, class Value >
typedef FieldAlgorithmBase<spacedim, Value>::Point FieldTimeFunction< spacedim, Value >::Point

Definition at line 45 of file field_time_function.hh.

Constructor & Destructor Documentation

◆ FieldTimeFunction()

template<int spacedim, class Value >
FieldTimeFunction< spacedim, Value >::FieldTimeFunction ( unsigned int  n_comp = 0)

Default constructor, optionally we need number of components n_comp in the case of Vector valued fields.

Definition at line 50 of file field_time_function.cc.

Member Function Documentation

◆ get_input_type()

template<int spacedim, class Value >
const Input::Type::Record & FieldTimeFunction< spacedim, Value >::get_input_type
static

Return Record for initialization of FieldTimeFunction that is derived from Abstract given by a_type and the individual elements of the possible Value (vector, tensor) in given times have Input::Type eit.

Definition at line 28 of file field_time_function.cc.

◆ init_from_input()

template<int spacedim, class Value >
void FieldTimeFunction< spacedim, Value >::init_from_input ( const Input::Record rec,
const struct FieldAlgoBaseInitData init_data 
)
overridevirtual

This method initialize actual value of the field given from the given Input::Record rec.

TODO: after removing support for vector valued FieldConstant we can merge this method with FieldConstant::init_from_input and move initizaliation of FieldConstant value to set_time method.

Reimplemented from FieldConstant< spacedim, Value >.

Definition at line 56 of file field_time_function.cc.

◆ set_time()

template<int spacedim, class Value >
bool FieldTimeFunction< spacedim, Value >::set_time ( const TimeStep time)
overridevirtual

Set time and init value_.

Reimplemented from FieldAlgorithmBase< spacedim, Value >.

Definition at line 67 of file field_time_function.cc.

Member Data Documentation

◆ field_name_

template<int spacedim, class Value >
std::string FieldTimeFunction< spacedim, Value >::field_name_
private

Initialization data of field. Necessary for check limits.

TODO: Temporary solution will be replaced with shared_ptr to field data in FieldAlgoBase

Definition at line 86 of file field_time_function.hh.

◆ in_rec_

template<int spacedim, class Value >
Input::Record FieldTimeFunction< spacedim, Value >::in_rec_
private

Accessor to Input::Record.

Definition at line 79 of file field_time_function.hh.

◆ limits_

template<int spacedim, class Value >
std::pair<double, double> FieldTimeFunction< spacedim, Value >::limits_
private

Definition at line 88 of file field_time_function.hh.

◆ registrar

template<int spacedim, class Value >
const int FieldTimeFunction< spacedim, Value >::registrar
staticprivate
Initial value:
=
Input::register_class< FieldTimeFunction<spacedim, Value>, unsigned int >("FieldTimeFunction") +

Registrar of class to factory.

Definition at line 76 of file field_time_function.hh.

◆ unit_si_

template<int spacedim, class Value >
UnitSI& FieldTimeFunction< spacedim, Value >::unit_si_
private

Definition at line 87 of file field_time_function.hh.


The documentation for this class was generated from the following files: