16 ASSERT(&add_field==found_field,
"Another field of the same name exists when adding field: %s\n",
17 add_field.
name().c_str());
27 for(
auto field_ptr : other.
field_list) this->operator +=(*field_ptr);
35 for(
auto name : names) set += (*this)[name];
41 FieldSet FieldSet::subset( FieldFlag::Flags::Mask mask)
const {
52 for(
auto field : field_list) {
78 namespace IT=Input::Type;
82 for(
auto field : field_list)
86 string desc =
"Output of the field " +
field->
name() +
" $[" +
field->
units().format_latex()+
"]$";
103 auto &
field = (*this)[dest_field_name];
110 for(
auto field : field_list)
119 if (found_field)
return *found_field;
121 THROW(ExcUnknownField() << FieldCommon::EI_Field(field_name));
122 return *field_list[0];
128 bool changed_all=
false;
145 for(
auto field : field_list)
154 const string &desc,
const string & d_val) {
std::vector< FieldCommon * > field_list
List of all fields.
virtual IT::Record & get_multifield_input_type()=0
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
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)
#define START_TIMER(tag)
Starts a timer with specified tag.
void set_field(const std::string &dest_field_name, FieldCommon &source)
bool is_multifield() const
The class for outputting data during time.
STREAM & operator<<(STREAM &s, UpdateFlags u)
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) ...