25 #ifndef field_algo_base_HH_ 26 #define field_algo_base_HH_ 29 #include <boost/type_traits/is_same.hpp> 82 : field_name_(field_name), n_comp_(n_comp), unit_si_(unit_si), limits_(limits), flags_(flags) {}
85 : field_name_(field_name), n_comp_(n_comp), unit_si_(unit_si),
86 limits_(
std::make_pair(-
std::numeric_limits<double>::max(),
std::numeric_limits<double>::max()) ),
102 <<
"Values of some elements of FieldFE " << EI_Field::qval <<
" is undefined.\n" 103 <<
"Please specify in default_value key.\n");
109 template <
int spacedim,
class Value>
114 static const unsigned int spacedim_=spacedim;
128 static std::string template_name();
152 static std::shared_ptr< FieldAlgorithmBase<spacedim, Value> >
171 virtual bool set_time(
const TimeStep &time);
179 virtual void set_mesh(
const Mesh *mesh,
bool boundary_domain);
185 { this->component_idx_ = idx; }
190 unsigned int n_comp()
const;
197 {
return field_result_;}
205 {
ASSERT(
false).error(
"Not implemented yet.");
return 0.0; }
247 return is_constant_in_space_;
TimeStep time_
Actual time level; initial value is -infinity.
virtual double next_change_time()
unsigned int component_idx_
Specify if the field is part of a MultiField and which component it is.
FieldResult field_result_
Indicator of particular values (zero, one) constant over space.
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
Value::return_type r_value_
Basic time management class.
static constexpr bool value
double unit_conversion_coefficient_
Coeficient of conversion of user-defined unit.
bool is_constant_in_space() const
FieldResult field_result() const
arma::vec::fixed< spacedim > Point
Provides the numbering of the finite element degrees of freedom on the computational mesh...
FieldAlgoBaseInitData(std::string field_name, unsigned int n_comp, const UnitSI &unit_si)
Simplified constructor, set limit values automatically (used in unit tests)
Space< spacedim >::Point Point
virtual void set_native_dh(std::shared_ptr< DOFHandlerMultiDim > dh)
bool is_constant_in_space_
Flag detects that field is only dependent on time.
Value value_
Last value, prevents passing large values (vectors) by value.
virtual ~FieldAlgorithmBase()
void set_component_idx(unsigned int idx)
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.
Class for representation SI units of Fields.
Representation of one time step..