24 static const IT::Record &field_output_setting =
25 IT::Record(
"FieldOutputSetting",
"Setting of the field output. The field name, output times, output interpolation (future).")
28 "The field name (from selection).")
30 "Output times specific to particular field.")
35 "Output of the equation's fields." 36 "The output is done through the output stream of the associated balance law equation." 37 "The stream defines output format for the full space information in selected times and " 38 "observe points for the full time information. The key 'fields' select the fields for the full spatial output." 39 "The set of output times may be specified per field otherwise common time set 'times' is used. If even this is not provided" 40 "the time set of the output_stream is used. The initial time of the equation is automatically added " 41 "to the time set of every selected field. The end time of the equation is automatically added " 42 "to the common output time set.")
45 "Output times used for the output fields without is own time series specification.")
47 "Add all input time points of the equation, mentioned in the 'input_fields' list, also as the output points.")
49 "Array of output fields and their individual output settings.")
51 "Array of the fields evaluated in the observe points of the associated output stream.")
59 string selection_name = equation_name +
":OutputFields";
60 string description =
"Selection of output fields for the " + equation_name +
" model.\n" + additional_description;
69 string desc =
"(($[" +
field->
units().format_latex()+
"]$)) "; +
"Output of: the field " +
field->
name() +
" ";
71 desc +=
"Input field: ";
82 param_vec.push_back( std::make_pair(
"output_field_selection", std::make_shared< IT::Selection >(output_field_selection) ) );
100 ASSERT(
stream_).error(
"The 'set_stream' method must be called before the 'read_from_input'.");
104 if (in_rec.
opt_val(
"times", times_array) ) {
108 auto times_array_it =
stream_->get_time_set_array();
109 if (times_array_it) {
116 if (in_rec.
val<
bool>(
"add_input_times")) {
127 string field_name =
it -> val< Input::FullEnum >(
"field");
129 if (
it->opt_val(
"times", field_times_array)) {
139 auto observe_fields_array = in_rec.
val<
Input::Array>(
"observe_fields");
140 for(
auto it = observe_fields_array.begin<
Input::FullEnum>();
it != observe_fields_array.end(); ++
it) {
150 ASSERT( step.
eq(field.
time()) )(step.
end())(field.
time())(field.
name()).error(
"Field is not set to the output time.");
151 auto current_mark_it = marks.current(step,
equation_type_ | marks.type_output() );
152 if (current_mark_it == marks.end(
equation_type_ | marks.type_output()) )
return false;
153 return (field_times_it->second.contains(*current_mark_it) );
189 if (
stream_->is_output_mesh_init())
return;
192 auto it =
stream_->get_output_mesh_record();
194 if(
stream_->enable_refinement()) {
196 auto output_mesh =
stream_->create_output_mesh_ptr(
true);
197 auto output_mesh_discont =
stream_->create_output_mesh_ptr(
true,
true);
202 output_mesh->create_refined_mesh();
210 WarningOut() <<
"Ignoring output mesh record.\n Output in GMSH format available only on computational mesh!";
214 std::shared_ptr<OutputMesh> output_mesh = std::dynamic_pointer_cast<
OutputMesh>(
stream_->create_output_mesh_ptr(
false) );
215 stream_->create_output_mesh_ptr(
false,
true);
217 output_mesh->create_identical_mesh();
223 if(error_control_field_name!=
"")
227 if(field ==
nullptr){
228 THROW(FieldSet::ExcUnknownField()
229 << FieldCommon::EI_Field(error_control_field_name));
238 DebugOut() <<
"Output mesh will be refined according to field " << error_control_field_name <<
".";
241 THROW(ExcFieldNotScalar()
242 << FieldCommon::EI_Field(error_control_field_name));
Class represents output mesh with continuous elements.
virtual void field_output(std::shared_ptr< OutputTime > stream)=0
Classes for auxiliary output mesh.
std::vector< FieldCommon * > field_list
List of all fields.
void add_output_times(double begin, double step, double end)
Common abstract parent of all Field<...> classes.
std::unordered_set< string > observe_fields_
Set of observed fields. The observe points are given within the observe stream.
double end_time() const
End time.
static constexpr Mask allow_output
The field can output. Is part of generated output selection. (default on)
void output(TimeStep step)
Class template representing a field with values dependent on: point, element, and region...
TimeMarks::iterator begin(TimeMark::Type mask) const
Iterator for the begin mimics container-like of TimeMarks.
virtual std::string get_value_attribute() const =0
void initialize(std::shared_ptr< OutputTime > stream, Input::Record in_rec, const TimeGovernor &tg)
TimeMark::Type equation_fixed_type_
The fixed time mark type of the equation.
void read_from_input(Input::Array in_array, const TimeGovernor &tg)
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
Basic time management functionality for unsteady (and steady) solvers (class Equation).
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
Field< 3, FieldValue< 3 >::Scalar > * error_control_field_
Refinement error control field.
static TimeMarks & marks()
void read_from_input(Input::Record in_rec, const TimeGovernor &tg)
FieldCommon * field(const std::string &field_name) const
TimeMark::Type equation_fixed_mark_type() const
TimeMark::Type equation_mark_type() const
static string field_value_shape()
std::shared_ptr< OutputTime > stream_
output stream (may be shared by more equation)
This class is a collection of time marks to manage various events occurring during simulation time...
std::unordered_map< string, OutputTimeSet > field_output_times_
Time sets of individual fields.
void select_error_control_field(std::string error_control_field_name)
Selects the error control field out of output field set according to input record.
FieldCommon & description(const string &description)
static Input::Type::Record & get_input_type()
static const Input::Type::Array get_input_type()
TimeMarks::iterator end(TimeMark::Type mask) const
Iterator for the end mimics container-like of TimeMarks.
#define WarningOut()
Macro defining 'warning' record of log.
FieldCommon & name(const string &name)
virtual void observe_output(std::shared_ptr< Observe > observe)=0
bool is_field_output_time(const FieldCommon &field, TimeStep step) const
const Input::Type::Instance & make_output_type(const string &equation_name, const string &aditional_description="")
FieldCommon & flags(FieldFlag::Flags::Mask mask)
OutputTimeSet common_output_times_
The time set used for the fields without explicit time set.
static constexpr Mask equation_input
The field is data parameter of the owning equation. (default on)
#define DebugOut()
Macro defining 'debug' record of log.
TimeMark::Type equation_type_
The time mark type of the equation.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Representation of one time step..
bool eq(double other_time) const
void add(double begin, TimeMark::Type mark_type)