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> 86 template<
int spacedim,
class Value>
98 <<
"of the MultiField " << EI_MultiFieldName::qval <<
", expected size: " << EI_ExpectedSize::val );
108 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;
174 void field_output(std::shared_ptr<OutputTime> stream)
override;
179 void observe_output(std::shared_ptr<Observe> observe)
override;
184 bool is_constant(
Region reg)
override;
198 std::string get_value_attribute()
const override;
206 inline unsigned int size()
const 207 {
return sub_fields_.size(); }
219 ASSERT_LT_DBG(idx, sub_fields_.size())(this->input_name()).error(
"Index of subfield in MultiField is out of range.\n");
220 return sub_fields_[idx];
226 inline const SubFieldType &
operator[](
unsigned int idx)
const 228 ASSERT_LT_DBG(idx, sub_fields_.size())(this->input_name()).error(
"Index of subfield in MultiField is out of range.\n");
229 return sub_fields_[idx];
237 ASSERT_LT_DBG(idx, sub_fields_.size())(this->input_name()).error(
"Index of subfield in MultiField is out of range.\n");
238 return &(sub_fields_[idx]);
246 void setup_components();
265 void cache_reallocate(
const ElementCacheMap &cache_map,
unsigned int region_idx)
const override;
268 void cache_update(
ElementCacheMap &cache_map,
unsigned int region_patch_idx)
const override;
FieldValueCache< double > * value_cache() override
Implements FieldCommon::value_cache.
Common abstract parent of all Field<...> classes.
Container for various descendants of FieldCommonBase.
unsigned int size() const
Number of subfields that compose the multi-field.
Class template representing a field with values dependent on: point, element, and region...
Directing class of FieldValueCache.
Field< spacedim, Value > SubFieldType
const MultiField< spacedim, typename FieldValue< spacedim >::Enum > * no_check_control_field_
Basic time management functionality for unsteady (and steady) solvers (class Equation).
FieldValue_< 0, 1, typename Value::element_type > MultiFieldValue
Basic time management class.
Input::Array full_input_list_
Full list of input field descriptors from which the subfields of MultiField are set.
Global macros to enhance readability and debugging, general constants.
FieldAlgorithmBase< spacedim, Value > SubFieldBaseType
std::vector< SubFieldType > sub_fields_
Subfields (items) of MultiField.
MultiFieldFactory(unsigned int index)
Constructor.
const TimeGovernor * tg_
TimeGovernor is necessary for set input list in setup_components method.
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
FieldCommon * get_component(unsigned int idx) override
The class for outputting data during time.
Space< spacedim >::Point Point
const FieldValueCache< double > * value_cache() const override
Implements FieldCommon::value_cache.
FieldAlgorithmBase< spacedim, Value >::Point Point
std::shared_ptr< FieldBaseType > FieldBasePtr
#define DECLARE_INPUT_EXCEPTION(ExcName, Format)
Macro for simple definition of input exceptions.
Class holds local coordinations of evaluating points (bulk and sides) specified by element dimension...
const SubFieldType & operator[](unsigned int idx) const
Class for representation of a vector of fields of the same physical quantity.
SubFieldType & operator[](unsigned int idx)
Representation of one time step..
#define ASSERT_LT_DBG(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.