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");
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();
124 scalar_field->
set( field_rec,
time_->
t());
126 output_fields+=*scalar_field;
137 vector_field->
set( field_rec,
time_->
t());
139 output_fields+=*vector_field;
150 tensor_field->
set( field_rec,
time_->
t());
152 output_fields+=*tensor_field;
static Input::Type::Record & record_template()
Template Record with common keys for derived equations.
virtual double solved_time()
std::shared_ptr< FieldSet > eq_fieldset_
virtual void set_time_governor(TimeGovernor &time)
void init_user_fields(Input::Array user_fields, FieldSet &output_fields)
static Input::Type::Record & user_fields_template(std::string equation_name)
Template Record with common key user_fields for derived equations.
FieldCommon & description(const string &description)
FieldCommon & flags(FieldFlag::Flags::Mask mask)
void set_default_fieldset(FieldSet &default_fs)
FieldCommon & name(const string &name)
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
static constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
Container for various descendants of FieldCommonBase.
static const Input::Type::Record & make_user_field_type(const std::string &equation_name)
Declare input record type of field defined by user.
Class template representing a field with values dependent on: point, element, and region.
void set(FieldBasePtr field, double time, std::vector< std::string > region_set_names={"ALL"})
void set_mesh(const Mesh &mesh) override
Basic time management functionality for unsteady (and steady) solvers (class Equation).
static const Input::Type::Record & get_input_type()
Class for representation SI units of Fields.
double convert_unit_from(std::string actual_unit) const
Convert and check user-defined unit.
static UnitSI & dimensionless()
Returns dimensionless unit.
Abstract base class for equation clasess.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Basic time management class.