Go to the documentation of this file.
40 return Input::Type::Record(
"EquationBase_AUX",
"Auxiliary record with keys common for equations. Should not be used.")
42 "Time governor setting.")
47 return Input::Type::Record(
"EquationBase_user_field_AUX",
"Auxiliary record with common key user_field. Should not be used.")
51 "Input fields of the equation defined by user.")
56 : equation_empty_(true),
66 : equation_empty_(false),
69 input_record_(in_rec),
86 it != user_fields.
end();
88 std::string field_name =
it->val<std::string>(
"name");
89 bool is_bdr =
it->val<
bool>(
"is_boundary");
93 if (exist_field!=
nullptr) {
94 THROW(FieldSet::ExcFieldExists() << FieldCommon::EI_Field(field_name));
99 if (
it->opt_val(
"unit", unit_record) ) {
100 std::string unit_str = unit_record.
val<std::string>(
"unit_formula");
103 }
catch (ExcInvalidUnit &e) {
104 e <<
it->ei_address();
106 }
catch (ExcNoncorrespondingUnit &e) {
107 e <<
it->ei_address();
125 scalar_field->
set( *scalar_it,
time_->
t());
127 output_fields+=*scalar_field;
142 vector_field->
set( *vector_it,
time_->
t());
144 output_fields+=*vector_field;
159 tensor_field->
set( *tensor_it,
time_->
t());
161 output_fields+=*tensor_field;
163 THROW(FieldSet::ExcFieldNotSet() << FieldCommon::EI_Field(field_name));
static const Input::Type::Record & make_user_field_type(const std::string &equation_name)
Declare input record type of field defined by user.
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
static Input::Type::Record & user_fields_template(std::string equation_name)
Template Record with common key user_fields for derived equations.
static UnitSI & dimensionless()
Returns dimensionless unit.
Basic time management class.
std::shared_ptr< FieldSet > eq_fieldset_
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
FieldCommon & flags(FieldFlag::Flags::Mask mask)
double convert_unit_from(std::string actual_unit) const
Convert and check user-defined unit.
void init_user_fields(Input::Array user_fields, FieldSet &output_fields)
static constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
void set(FieldBasePtr field, double time, std::vector< std::string > region_set_names={"ALL"})
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Class for representation SI units of Fields.
virtual double solved_time()
Container for various descendants of FieldCommonBase.
Abstract base class for equation clasess.
void set_default_fieldset(FieldSet &default_fs)
static const Input::Type::Record & get_input_type()
void set_mesh(const Mesh &mesh) override
static Input::Type::Record & record_template()
Template Record with common keys for derived equations.
FieldCommon & description(const string &description)
Class template representing a field with values dependent on: point, element, and region.
virtual void set_time_governor(TimeGovernor &time)
FieldCommon & name(const string &name)