25 #ifndef field_algo_base_HH_ 26 #define field_algo_base_HH_ 29 #include <boost/type_traits/is_same.hpp> 81 : field_name_(field_name), n_comp_(n_comp), unit_si_(unit_si), limits_(limits), flags_(flags) {}
84 : field_name_(field_name), n_comp_(n_comp), unit_si_(unit_si),
85 limits_(
std::make_pair(-
std::numeric_limits<double>::max(),
std::numeric_limits<double>::max()) ),
101 <<
"Values of some elements of FieldFE " << EI_Field::qval <<
" is undefined.\n" 102 <<
"Please specify in default_value key.\n");
108 template <
int spacedim,
class Value>
113 static const unsigned int spacedim_=spacedim;
127 static std::string template_name();
151 static std::shared_ptr< FieldAlgorithmBase<spacedim, Value> >
170 virtual bool set_time(
const TimeStep &time);
178 virtual void set_mesh(
const Mesh *mesh,
bool boundary_domain);
184 { this->component_idx_ = idx; }
189 unsigned int n_comp()
const;
196 {
return field_result_;}
204 {
ASSERT(
false).error(
"Not implemented yet.");
return 0.0; }
246 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...
virtual void set_native_dh(std::shared_ptr< DOFHandlerMultiDim >)
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
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..