15 ASSERT(&add_field==found_field,
"Another field of the same name exists when adding field: %s\n",
16 add_field.
name().c_str());
26 for(
auto field_ptr : other.
field_list) this->operator +=(*field_ptr);
34 for(
auto name : names) set += (*this)[name];
40 FieldSet FieldSet::subset( FieldFlag::Flags::Mask mask)
const {
51 for(
auto field : field_list) {
71 namespace IT=Input::Type;
75 for(
auto field : field_list)
96 auto &
field = (*this)[dest_field_name];
103 for(
auto field : field_list)
112 if (found_field)
return *found_field;
114 THROW(ExcUnknownField() << FieldCommon::EI_Field(field_name));
115 return *field_list[0];
121 bool changed_all=
false;
137 for(
auto field : field_list)
146 const string &desc,
const string & d_val) {
std::vector< FieldCommon * > field_list
List of all fields.
Common abstract parent of all Field<...> classes.
Container for various descendants of FieldCommonBase.
virtual void copy_from(const FieldCommon &other)=0
FieldCommon & operator[](const std::string &field_name) const
static constexpr Mask allow_output
The field can output. Is part of generated output selection. (default on)
virtual bool is_constant(Region reg)=0
virtual void output(OutputTime *stream)=0
std::ostream & operator<<(std::ostream &stream, const FieldSet &set)
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
FieldCommon * field(const std::string &field_name) const
FieldCommon & add_field(FieldCommon *field, const string &name, const string &desc, const string &d_val="")
FieldCommon & input_default(const string &input_default)
static IT::Record field_descriptor_record(const string &record_name)
void set_field(const std::string &dest_field_name, FieldCommon &source)
The class for outputing data during time.
FieldCommon & description(const string &description)
void output(OutputTime *stream)
bool is_constant(Region reg) const
Input::Type::Selection make_output_field_selection(const string &name, const string &desc="")
FieldCommon & name(const string &name)
virtual IT::AbstractRecord & get_input_type()=0
FieldCommon & flags(FieldFlag::Flags::Mask mask)
const std::string & input_name() const
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Input::Type::Record make_field_descriptor_type(const std::string &equation_name) const
static constexpr Mask declare_input
The field can be set from input. The key in input field descriptor is declared. (default on) ...