18 #ifndef MULTI_FIELD_HH_
19 #define MULTI_FIELD_HH_
24 #include <boost/core/explicit_operator_bool.hpp>
25 #include <boost/format/alt_sstream.hpp>
26 #include <boost/format/alt_sstream_impl.hpp>
27 #include <boost/format/parsing.hpp>
28 #include <boost/optional/optional.hpp>
29 #include <boost/type_index/type_index_facade.hpp>
87 template<
int spacedim,
class Value>
99 <<
"of the MultiField " << EI_MultiFieldName::qval <<
", expected size: " << EI_ExpectedSize::val );
109 bool is_active_field_descriptor(
const Input::Record &in_rec,
const std::string &input_name)
override;
137 IT::Array get_multifield_input_type()
override;
164 void set_mesh(
const Mesh &mesh)
override;
169 void copy_from(
const FieldCommon & other)
override;
179 bool is_constant(
Region reg)
override;
193 std::string get_value_attribute()
const override;
201 inline unsigned int size()
const
202 {
return sub_fields_.size(); }
214 ASSERT_LT(idx, sub_fields_.size())(this->input_name()).error(
"Index of subfield in MultiField is out of range.\n");
215 return sub_fields_[idx];
223 ASSERT_LT(idx, sub_fields_.size())(this->input_name()).error(
"Index of subfield in MultiField is out of range.\n");
224 return sub_fields_[idx];
232 ASSERT_LT(idx, sub_fields_.size())(this->input_name()).error(
"Index of subfield in MultiField is out of range.\n");
233 return &(sub_fields_[idx]);
241 void setup_components();
246 void cache_reallocate(
PatchInternals &patch_internals,
unsigned int region_idx)
const override;
249 void cache_update(
ElementCacheMap &cache_map,
unsigned int region_patch_idx)
const override;
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
Directing class of FieldValueCache.
Class holds local coordinations of evaluating points (bulk and sides) specified by element dimension.
Space< spacedim >::Point Point
Common abstract parent of all Field<...> classes.
Container for various descendants of FieldCommonBase.
Class template representing a field with values dependent on: point, element, and region.
std::shared_ptr< FieldBaseType > FieldBasePtr
MultiFieldFactory(unsigned int index)
Constructor.
Class for representation of a vector of fields of the same physical quantity.
Input::Array full_input_list_
Full list of input field descriptors from which the subfields of MultiField are set.
FieldValue_< 0, 1, typename Value::element_type > MultiFieldValue
TYPEDEF_ERR_INFO(EI_ExpectedSize, unsigned int)
TYPEDEF_ERR_INFO(EI_Size, unsigned int)
SubFieldType & operator[](unsigned int idx)
TYPEDEF_ERR_INFO(EI_MultiFieldName, const string)
const TimeGovernor * tg_
TimeGovernor is necessary for set input list in setup_components method.
DECLARE_INPUT_EXCEPTION(Exc_InvalidMultiFieldSize,<< "Invalid size "<< EI_Size::val<< "of the MultiField "<< EI_MultiFieldName::qval<< ", expected size: "<< EI_ExpectedSize::val)
FieldCommon * get_component(unsigned int idx) override
unsigned int size() const
Number of subfields that compose the multi-field.
const SubFieldType & operator[](unsigned int idx) const
FieldAlgorithmBase< spacedim, Value >::Point Point
std::vector< SubFieldType > sub_fields_
Subfields (items) of MultiField.
Field< spacedim, Value > SubFieldType
FieldAlgorithmBase< spacedim, Value > SubFieldBaseType
FieldValueCache< double > * value_cache() override
Implements FieldCommon::value_cache.
const MultiField< spacedim, typename FieldValue< spacedim >::Enum > * no_check_control_field_
const FieldValueCache< double > * value_cache() const override
Implements FieldCommon::value_cache.
The class for outputting data during time.
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Representation of one time step..
Holds common data shared between GenericAssemblz and Assembly<dim> classes.
Basic time management class.