27 OLD_ASSERT(&add_field==found_field,
"Another field of the same name exists when adding field: %s\n",
28 add_field.
name().c_str());
38 for(
auto field_ptr : other.
field_list) this->operator +=(*field_ptr);
46 for(
auto name : names)
set += (*this)[name];
52 FieldSet FieldSet::subset( FieldFlag::Flags::Mask mask)
const {
66 for(
auto field : field_list) {
78 std::shared_ptr<Input::Type::TypeBase> field_type_ptr;
101 for(
auto field : field_list)
105 string desc =
"Output of the field " +
field->
name() +
" (($[" +
field->
units().format_latex()+
"]$))";
122 auto &
field = (*this)[dest_field_name];
129 for(
auto field : field_list)
138 if (found_field)
return *found_field;
140 THROW(ExcUnknownField() << FieldCommon::EI_Field(field_name));
141 return *field_list[0];
147 bool changed_all=
false;
162 bool is_jump =
false;
171 const string &desc,
const string & d_val) {
std::vector< FieldCommon * > field_list
List of all fields.
bool is_jump_time() const
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 IT::Instance get_input_type()=0
static const std::string field_descriptor_record_description(const string &record_name)
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)
bool is_multifield() const
FieldCommon & description(const string &description)
virtual IT::Array get_multifield_input_type()=0
bool is_constant(Region reg) const
FieldCommon & name(const string &name)
static string field_unit()
friend std::ostream & operator<<(std::ostream &stream, const FieldSet &set)
FieldCommon & flags(FieldFlag::Flags::Mask mask)
const std::string & input_name() const
Input::Type::Selection make_output_field_selection(const string &name, const string &desc)
#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) ...