14 #include <boost/circular_buffer.hpp>
51 template<
int spacedim,
class Value>
59 static constexpr
bool is_enum_valued = boost::is_same<typename Value::element_type, FieldEnum>::value;
60 static const unsigned int space_dim = spacedim;
99 Field(
const string &name,
bool bc =
false);
124 IT::Record &get_multifield_input_type()
override;
143 void set_mesh(
const Mesh &mesh)
override;
154 bool is_constant(
Region reg)
override;
166 void set_field(
const RegionSet &domain, FieldBasePtr field,
double time=0.0);
180 bool set_time(
const TimeStep &time)
override;
185 void copy_from(
const FieldCommon & other)
override;
230 void add_factory(std::shared_ptr<FactoryBase> factory);
247 void update_history(
const TimeStep &time);
254 void check_initialized_region_fields_();
294 template<
int dim,
class Val>
311 template<
int spacedim,
class Value>
316 ASSERT(elm.
region_idx().
idx() < region_fields_.size(),
"Region idx %u out of range %lu, field: %s\n",
317 elm.
region_idx().
idx(), (
unsigned long int) region_fields_.size(),
name().c_str());
325 template<
int spacedim,
class Value>
330 ASSERT(elm.
region_idx().
idx() < region_fields_.size(),
"Region idx %u out of range %lu, field: %s\n",
331 elm.
region_idx().
idx(), (
unsigned long int) region_fields_.size(),
name().c_str());
333 "Null field ptr on region id: %d, field: %s\n", elm.
region().
id(),
name().c_str());
335 region_fields_[elm.
region_idx().
idx()]->value_list(point_list,elm, value_list);
Common abstract parent of all Field<...> classes.
pair< double, FieldBasePtr > HistoryPoint
Pair: time, pointer to FieldBase instance.
Class template representing a field with values dependent on: point, element, and region...
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_
const std::string & name() const
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 outputting data during time.
Space< spacedim >::Point Point
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
std::vector< std::shared_ptr< FactoryBase > > factories_
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.
Representation of one time step.
TimeStatus set_time_result_
Status of history.
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_