25 #ifndef field_algo_base_HH_ 26 #define field_algo_base_HH_ 31 #include <boost/type_traits.hpp> 68 limits_(
std::make_pair(-
std::numeric_limits<double>::max(),
std::numeric_limits<double>::max()) ) {}
82 template <
int spacedim,
class Value>
87 static const unsigned int spacedim_=spacedim;
101 static std::string template_name();
125 static std::shared_ptr< FieldAlgorithmBase<spacedim, Value> >
144 virtual bool set_time(
const TimeStep &time);
152 virtual void set_mesh(
const Mesh *mesh,
bool boundary_domain);
158 { this->component_idx_ = idx; }
163 unsigned int n_comp()
const;
170 {
return field_result_;}
178 {
ASSERT(
false).error(
"Not implemented yet.");
return 0.0; }
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.
FieldResult field_result() const
arma::vec::fixed< spacedim > Point
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
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)
Full constructor.
Class for representation SI units of Fields.
Representation of one time step..