Flow123d
JS_before_hm-2087-gb06a8f5d8
|
Go to the documentation of this file.
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 <<
"Values of some elements of FieldFE " << EI_Field::qval <<
" is undefined.\n"
105 <<
"Please specify in default_value key.\n");
111 template <
int spacedim,
class Value>
121 DECLARE_EXCEPTION( ExcInputInitUnsupported, <<
"The field " << EI_Field::qval <<
" do not support initialization from input.\n" );
157 static std::shared_ptr< FieldAlgorithmBase<spacedim, Value> >
184 virtual void set_mesh(
const Mesh *mesh,
bool boundary_domain);
195 unsigned int n_comp()
const;
210 {
ASSERT(
false).error(
"Not implemented yet.");
return 0.0; }
Armor::ArmaVec< double, spacedim > Point
DECLARE_INPUT_EXCEPTION(ExcUndefElementValue,<< "Values of some elements of FieldFE "<< EI_Field::qval<< " is undefined.\n"<< "Please specify in default_value key.\n")
unsigned int n_comp() const
double unit_conversion_coefficient_
Coeficient of conversion of user-defined unit.
FieldResult field_result() const
Basic time management class.
void set_component_idx(unsigned int idx)
virtual ~FieldAlgorithmBase()
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
virtual void value_list(const Armor::array &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list)=0
static const Input::Type::Record & get_field_algo_common_keys()
Directing class of FieldValueCache.
virtual void cache_reinit(const ElementCacheMap &cache_map)
Allows reinit data members or structures in descendants during reinit of FieldValueCache of 'parental...
static const Input::Type::Instance & get_input_type_instance(Input::Type::Selection value_selection=Input::Type::Selection())
static constexpr bool value
bool is_constant_in_space_
Flag detects that field is only dependent on time.
static Input::Type::Abstract & get_input_type()
Space< spacedim >::Point Point
virtual const Value::return_type & value(const Point &p, const ElementAccessor< spacedim > &elm)=0
static const unsigned int spacedim_
FieldAlgoBaseInitData(std::string field_name, unsigned int n_comp, const UnitSI &unit_si, std::pair< double, double > limits, FieldFlag::Flags flags)
Full constructor.
FieldAlgorithmBase(unsigned int n_comp=0)
virtual void cache_update(FieldValueCache< typename Value::element_type > &data_cache, ElementCacheMap &cache_map, unsigned int region_patch_idx)
unsigned int component_idx_
Specify if the field is part of a MultiField and which component it is.
Provides the numbering of the finite element degrees of freedom on the computational mesh.
std::pair< double, double > limits_
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
virtual void init_from_input(const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
Representation of one time step..
Value value_
Last value, prevents passing large values (vectors) by value.
void init_unit_conversion_coefficient(const Input::Record &rec, const struct FieldAlgoBaseInitData &init_data)
Init value of unit_conversion_coefficient_ from input.
virtual std::vector< const FieldCommon * > set_dependency(FMT_UNUSED FieldSet &field_set)
Common abstract parent of all Field<...> classes.
Class for representation SI units of Fields.
virtual double next_change_time()
virtual void set_mesh(const Mesh *mesh, bool boundary_domain)
Container for various descendants of FieldCommonBase.
static std::string template_name()
FieldResult field_result_
Indicator of particular values (zero, one) constant over space.
TYPEDEF_ERR_INFO(EI_Field, std::string)
TYPEDEF_ERR_INFO(EI_Field, std::string)
Declaration of exception.
TimeStep time_
Actual time level; initial value is -infinity.
Value::return_type r_value_
virtual void set_native_dh(std::shared_ptr< DOFHandlerMultiDim >)
static constexpr bool is_enum_valued
bool is_constant_in_space() const
DECLARE_EXCEPTION(ExcInputInitUnsupported,<< "The field "<< EI_Field::qval<< " do not support initialization from input.\n")
FieldAlgoBaseInitData(std::string field_name, unsigned int n_comp, const UnitSI &unit_si)
Simplified constructor, set limit values automatically (used in unit tests)
virtual bool set_time(const TimeStep &time)
static std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > function_factory(const Input::AbstractRecord &rec, const struct FieldAlgoBaseInitData &init_data)