14 #include <boost/circular_buffer.hpp>
27 namespace IT=Input::Type;
47 template<
int spacedim,
class Value>
55 static constexpr
bool is_enum_valued = boost::is_same<typename Value::element_type, FieldEnum>::value;
56 static const unsigned int space_dim = spacedim;
79 Field(
const string &name,
bool bc =
false);
119 void set_mesh(
const Mesh &mesh)
override;
130 bool is_constant(
Region reg)
override;
159 { this->limit_side_=side; }
172 void copy_from(
const FieldCommon & other)
override;
229 void check_initialized_region_fields_();
276 template<
int spacedim,
class Value>
308 template<
int spacedim,
class Value>
327 void set_limit_side(
LimitSide side)
override;
341 void set_mesh(
const Mesh &mesh)
override;
347 void copy_from(
const FieldCommon & other)
override;
357 bool is_constant(
Region reg)
override;
365 inline unsigned int size()
const
366 {
return sub_fields_.size(); }
378 void set_complemented_vector_field( TransposedField &complemented);
384 {
return sub_fields_[idx]; }
398 template<
int spacedim,
class Value>
403 ASSERT(elm.
region_idx().
idx() < region_fields_.size(),
"Region idx %u out of range %lu, field: %s\n",
404 elm.
region_idx().
idx(), (
unsigned long int) region_fields_.size(), name().c_str());
406 "Null field ptr on region id: %d, idx: %d, field: %s\n", elm.
region().
id(), elm.
region_idx().
idx(), name().c_str());
412 template<
int spacedim,
class Value>
417 ASSERT(elm.
region_idx().
idx() < region_fields_.size(),
"Region idx %u out of range %lu, field: %s\n",
418 elm.
region_idx().
idx(), (
unsigned long int) region_fields_.size(), name().c_str());
420 "Null field ptr on region id: %d, field: %s\n", elm.
region().
id(), name().c_str());
422 region_fields_[elm.
region_idx().
idx()]->value_list(point_list,elm, value_list);
std::vector< std::string > sub_names_
Common abstract parent of all Field<...> classes.
pair< double, FieldBasePtr > HistoryPoint
Pair: time, pointer to FieldBase instance.
unsigned int size() const
Number of subfields that compose the multi-field.
void set_limit_side(LimitSide side) override
Class template representing a field with values dependent on: point, element, and region...
Field< spacedim, Value > SubFieldType
Basic time management functionality for unsteady (and steady) solvers (class Equation).
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) const
Basic time management class.
std::shared_ptr< SharedData > data_
std::vector< SubFieldType > sub_fields_
FieldAlgorithmBase< spacedim, Value >::Point Point
std::shared_ptr< ControlField > no_check_control_field_
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm) const
The class for outputing data during time.
Space< spacedim >::Point Point
Field< spacedim, typename FieldValue< spacedim >::Vector > TransposedField
std::vector< FieldBasePtr > region_fields_
FieldResult
Result type have sense only for larger Value types like vectors and tensors.
std::shared_ptr< FieldBaseType > FieldBasePtr
FieldAlgorithmBase< spacedim, Value > FieldBaseType
boost::circular_buffer< HistoryPoint > RegionHistory
Nearest history of one region.
RegionIdx region_idx() const
Field< spacedim, typename FieldValue< spacedim >::Enum > ControlField
Class for representation of a vector of fields of the same physical quantity.
SubFieldType & operator[](unsigned int idx)
unsigned int id() const
Returns id of the region (using RegionDB)
unsigned int idx() const
Returns a global index of the region.
std::vector< RegionHistory > region_history_