25 #ifndef field_algo_base_HH_
26 #define field_algo_base_HH_
29 #include <type_traits>
88 limits_(
std::make_pair(-
std::numeric_limits<double>::max(),
std::numeric_limits<double>::max()) ),
104 template <
int spacedim,
class Value>
114 DECLARE_EXCEPTION( ExcInputInitUnsupported, <<
"The field " << EI_Field::qval <<
" do not support initialization from input.\n" );
150 static std::shared_ptr< FieldAlgorithmBase<spacedim, Value> >
185 unsigned int n_comp()
const;
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
Provides the numbering of the finite element degrees of freedom on the computational mesh.
Directing class of FieldValueCache.
static const Input::Type::Instance & get_input_type_instance(Input::Type::Selection value_selection=Input::Type::Selection())
virtual double next_change_time()
void set_component_idx(unsigned int idx)
double unit_conversion_coefficient_
Coeficient of conversion of user-defined unit.
static std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > function_factory(const Input::AbstractRecord &rec, const struct FieldAlgoBaseInitData &init_data)
virtual void set_native_dh(std::shared_ptr< DOFHandlerMultiDim >)
virtual std::vector< const FieldCommon * > set_dependency(FMT_UNUSED FieldSet &field_set)
virtual void init_from_input(const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
unsigned int n_comp() const
virtual void cache_update(FieldValueCache< typename Value::element_type > &data_cache, ElementCacheMap &cache_map, unsigned int region_patch_idx)
static const unsigned int spacedim_
virtual ~FieldAlgorithmBase()
virtual void cache_reinit(const ElementCacheMap &cache_map)
Allows reinit data members or structures in descendants during reinit of FieldValueCache of 'parental...
static std::string template_name()
virtual bool set_time(const TimeStep &time)
bool is_constant_in_space_
Flag detects that field is only dependent on time.
static Input::Type::Abstract & get_input_type()
virtual void set_mesh(const Mesh *mesh)
void init_unit_conversion_coefficient(const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
Init value of unit_conversion_coefficient_ from input.
FieldResult field_result_
Indicator of particular values (zero, one) constant over space.
TYPEDEF_ERR_INFO(EI_Field, std::string)
static constexpr bool is_enum_valued
unsigned int component_idx_
Specify if the field is part of a MultiField and which component it is.
Space< spacedim >::Point Point
static const Input::Type::Record & get_field_algo_common_keys()
TimeStep time_
Actual time level; initial value is -infinity.
bool is_constant_in_space() const
DECLARE_EXCEPTION(ExcInputInitUnsupported,<< "The field "<< EI_Field::qval<< " do not support initialization from input.\n")
Value value_
Last value, prevents passing large values (vectors) by value.
FieldResult field_result() const
Value::return_type r_value_
FieldAlgorithmBase(unsigned int n_comp=0)
Common abstract parent of all Field<...> classes.
Container for various descendants of FieldCommonBase.
Armor::ArmaVec< double, spacedim > Point
Representation of one time step..
Class for representation SI units of Fields.
static constexpr bool value
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
FieldAlgoBaseInitData(std::string field_name, unsigned int n_comp, const UnitSI &unit_si)
Simplified constructor, set limit values automatically (used in unit tests)
std::pair< double, double > limits_
FieldAlgoBaseInitData(std::string field_name, unsigned int n_comp, const UnitSI &unit_si, std::pair< double, double > limits, FieldFlag::Flags flags)
Full constructor.
Basic time management class.