Flow123d  master-9c1c1b8e5
equation_output.cc
Go to the documentation of this file.
1 /*
2  * equation_output.cc
3  *
4  * Created on: Jul 8, 2016
5  * Author: jb
6  */
7 
8 #include "tools/time_marks.hh"
9 #include "input/input_type.hh"
10 #include "input/accessors.hh"
12 #include "fields/field.hh"
15 #include "io/output_time_set.hh"
16 #include "io/observe.hh"
18 #include "fem/dofhandler.hh"
19 #include "fem/discrete_space.hh"
20 #include "fem/fe_p.hh"
21 #include <memory>
22 
23 
24 namespace IT = Input::Type;
25 
26 
27 
29 
30  static const IT::Selection &interpolation_sel =
31  IT::Selection("Discrete_output", "Discrete type of output. Determines type of output data (element, node, native etc).")
32  .add_value(OutputTime::NODE_DATA, "P1_average", "Node data / point data.")
33  .add_value(OutputTime::CORNER_DATA, "D1_value", "Corner data.")
34  .add_value(OutputTime::ELEM_DATA, "P0_value", "Element data / cell data.")
35  .add_value(OutputTime::NATIVE_DATA, "Native", "Native data (Flow123D data).")
36  .close();
37 
38  static const IT::Record &field_output_setting =
39  IT::Record("FieldOutputSetting", "Setting of the field output. The field name, output times, output interpolation (future).")
40  .allow_auto_conversion("field")
41  .declare_key("field", IT::Parameter("output_field_selection"), IT::Default::obligatory(),
42  "The field name (from selection).")
44  "Output times specific to particular field.")
45  .declare_key("interpolation", IT::Array( interpolation_sel ), IT::Default::read_time("Interpolation type of output data."),
46  "Optional value. Implicit value is given by field and can be changed.")
47  .close();
48 
49  return IT::Record("EquationOutput",
50  "Output of the equation's fields."
51  "The output is done through the output stream of the associated balance law equation."
52  "The stream defines output format for the full space information in selected times and "
53  "observe points for the full time information. The key 'fields' select the fields for the full spatial output."
54  "The set of output times may be specified per field otherwise common time set 'times' is used. If even this is not provided"
55  "the time set of the output_stream is used. The initial time of the equation is automatically added "
56  "to the time set of every selected field. The end time of the equation is automatically added "
57  "to the common output time set.")
60  "Output times used for the output fields without is own time series specification.")
61  .declare_key("add_input_times", IT::Bool(), IT::Default("false"),
62  "Add all input time points of the equation, mentioned in the 'input_fields' list, also as the output points.")
63  .declare_key("fields", IT::Array(field_output_setting), IT::Default("[]"),
64  "Array of output fields and their individual output settings.")
65  .declare_key("observe_fields", IT::Array( IT::Parameter("output_field_selection")), IT::Default("[]"),
66  "Array of the fields evaluated in the observe points of the associated output stream.")
67  .close();
68 }
69 
70 
71 
73 : FieldSet(), output_elem_data_assembly_(nullptr), output_node_data_assembly_(nullptr), output_corner_data_assembly_(nullptr),
74  observe_output_assembly_(nullptr) {
75  this->add_coords_field();
76 }
77 
83 }
84 
85 
86 
88  const string &additional_description)
89 {
90  string selection_name = equation_name + ":OutputFields";
91  string description = "Selection of output fields for the " + equation_name + " model.\n" + additional_description;
92  IT::Selection sel(selection_name, description );
93  int i=0;
94  // add value for each field excluding boundary fields
95  for( FieldCommon * field : field_list)
96  {
97  //DebugOut().fmt("type for field: {}\n", field->name());
98  if ( !field->is_bc() && field->flags().match( FieldFlag::allow_output) )
99  {
100  string desc = "(($[" + field->units().format_latex()+"]$)) "; + "Output of: the field " + field->name() + " ";
101  if (field->flags().match(FieldFlag::equation_input))
102  desc += "Input field: ";
103  if (field->description().length() > 0)
104  desc += field->description();
105  sel.add_value(i, field->name(), desc, { {FlowAttribute::field_value_shape(), field->get_value_attribute()} });
106  i++;
107  }
108  }
109 
110  return sel.close();
111 }
112 
113 const IT::Instance &EquationOutput::make_output_type(const string &equation_name, const string &additional_description)
114 {
115  return make_output_type_from_record(get_input_type(), equation_name, additional_description);
116 }
117 
119  const string &equation_name,
120  const string &additional_description)
121 {
122  const IT::Selection &output_field_selection = create_output_field_selection(equation_name, additional_description);
123 
125  param_vec.push_back( std::make_pair("output_field_selection", std::make_shared< IT::Selection >(output_field_selection) ) );
126  return IT::Instance(in_rec, param_vec).close();
127 }
128 
129 
130 void EquationOutput::initialize(std::shared_ptr<OutputTime> stream, Mesh *mesh, Input::Record in_rec, const TimeGovernor & tg)
131 {
132  stream_ = stream;
133  mesh_ = mesh;
136  read_from_input(in_rec, tg);
137 
138  { // DOF handler of element data output
139  MixedPtr<FE_P_disc> fe_p_disc(0);
140  dh_ = make_shared<DOFHandlerMultiDim>(*mesh_);
141  std::shared_ptr<DiscreteSpace> ds = std::make_shared<EqualOrderDiscreteSpace>( mesh_, fe_p_disc);
142  dh_->distribute_dofs(ds);
143  }
144 
145  { // DOF handler of node / corner data output
146  MixedPtr<FE_P_disc> fe_p_disc(1);
147  dh_node_ = make_shared<DOFHandlerMultiDim>(*mesh_);
148  std::shared_ptr<DiscreteSpace> ds = std::make_shared<EqualOrderDiscreteSpace>( mesh_, fe_p_disc);
149  dh_node_->distribute_dofs(ds);
150  }
151 
156 }
157 
158 
159 
161 {
162  ASSERT(stream_).error("The 'set_stream' method must be called before the 'read_from_input'.");
163  auto &marks = TimeGovernor::marks();
164 
165  Input::Array times_array;
166  if (in_rec.opt_val("times", times_array) ) {
167  common_output_times_.read_from_input(times_array, tg);
168  } else {
169  // take times from the output_stream if key times is missing
170  auto times_array_it = stream_->get_time_set_array();
171  if (times_array_it) {
172  common_output_times_.read_from_input(*times_array_it, tg);
173  }
174  }
175  // always add the end time
177 
178  if (in_rec.val<bool>("add_input_times")) {
179  // copy time marks in order to prevent invalidation of the iterator
180  TimeMarks marks_copy = TimeGovernor::marks();
181  for(auto time_mark_it = marks_copy.begin(equation_type_ | marks.type_input());
182  time_mark_it != marks_copy.end(equation_type_ | marks.type_input());
183  ++time_mark_it) {
184  common_output_times_.add(time_mark_it->time(), equation_fixed_type_);
185  }
186  }
187  auto fields_array = in_rec.val<Input::Array>("fields");
188  for(auto it = fields_array.begin<Input::Record>(); it != fields_array.end(); ++it) {
189  this->init_field_item(it, tg);
190  }
191  auto observe_fields_array = in_rec.val<Input::Array>("observe_fields");
192  for(auto it = observe_fields_array.begin<Input::FullEnum>(); it != observe_fields_array.end(); ++it) {
193  observe_fields_.insert(string(*it));
194  }
195 
196 }
197 
199  string field_name = it -> val< Input::FullEnum >("field");
200  FieldCommon *found_field = field(field_name);
201 
202  Input::Array interpolations;
204  if (it->opt_val("interpolation", interpolations)) {
205  // process interpolations
206  for(auto it_interp = interpolations.begin<OutputTime::DiscreteSpace>(); it_interp != interpolations.end(); ++it_interp) {
207  interpolation[ *it_interp ] = true;
208  }
209  } else {
210  OutputTime::set_discrete_flag(interpolation, found_field->get_output_type());
211  }
212  Input::Array field_times_array;
213  FieldOutputConfig field_config;
214  if (it->opt_val("times", field_times_array)) {
215  OutputTimeSet field_times;
216  field_times.read_from_input(field_times_array, tg);
217  field_config.output_set_ = field_times;
218  } else {
219  field_config.output_set_ = common_output_times_;
220  }
221  field_config.space_flags_ = interpolation;
222  // Add init time as the output time for every output field.
223  field_config.output_set_.add(tg.init_time(), equation_fixed_type_);
224  // register interpolation types of fields to OutputStream
225  for (uint i=0; i<OutputTime::N_DISCRETE_SPACES; ++i)
226  if (interpolation[i]) used_interpolations_.insert( OutputTime::DiscreteSpace(i) );
227  // Set output configuration to field_output_times_
228  if (found_field->is_multifield()) {
229  for (uint i_comp=0; i_comp<found_field->n_comp(); ++i_comp) {
230  field_output_times_[ found_field->full_comp_name(i_comp) ] = field_config;
231  }
232  } else {
233  field_output_times_[field_name] = field_config;
234  }
235 }
236 
238 {
239  if ( !field.get_flags().match(FieldFlag::allow_output) ) return false;
240  auto &marks = TimeGovernor::marks();
241  auto field_times_it = field_output_times_.find(field.name());
242  if (field_times_it == field_output_times_.end()) return false;
243  ASSERT( step.eq(field.time()) )(step.end())(field.time())(field.name()).error("Field is not set to the output time.");
244  auto current_mark_it = marks.current(step, equation_type_ | marks.type_output() );
245  if (current_mark_it == marks.end(equation_type_ | marks.type_output()) ) return false;
246  return (field_times_it->second.output_set_.contains(*current_mark_it) );
247 }
248 
249 
251 {
252  ASSERT_PTR(mesh_).error();
253 
254  // automatically call of stream_->write_time_frame if the time in the TimeStep is higher then in output stream
255  if (step.end() > stream_->registered_time()) {
256  stream_->write_time_frame();
257  }
258 
259  // make observe points if not already done
260  auto observe_ptr = stream_->observe(mesh_);
261 
262  this->make_output_mesh( stream_->is_parallel() );
263 
264  // NODE_DATA
265  {
266  FieldSet used_fields;
267  for(FieldListAccessor f_acc : this->fields_range()) {
268  if (is_field_output_time( *(f_acc.field()), step) && field_output_times_[f_acc->name()].space_flags_[OutputTime::NODE_DATA]) {
269  f_acc->set_output_data_cache(OutputTime::NODE_DATA, stream_);
270  used_fields += *(f_acc.field());
271  }
272  }
273  if (used_fields.size()>0) {
274  auto mixed_assmbly = output_node_data_assembly_->multidim_assembly();
275  mixed_assmbly[1_d]->set_output_data(used_fields, stream_);
276  mixed_assmbly[2_d]->set_output_data(used_fields, stream_);
277  mixed_assmbly[3_d]->set_output_data(used_fields, stream_);
279  }
280  }
281 
282  // CORNER_DATA
283  {
284  FieldSet used_fields;
285  for(FieldListAccessor f_acc : this->fields_range()) {
286  if (is_field_output_time( *(f_acc.field()), step) && field_output_times_[f_acc->name()].space_flags_[OutputTime::CORNER_DATA]) {
287  f_acc->set_output_data_cache(OutputTime::CORNER_DATA, stream_);
288  used_fields += *(f_acc.field());
289  }
290  }
291  if (used_fields.size()>0) {
292  auto mixed_assmbly = output_corner_data_assembly_->multidim_assembly();
293  mixed_assmbly[1_d]->set_output_data(used_fields, stream_);
294  mixed_assmbly[2_d]->set_output_data(used_fields, stream_);
295  mixed_assmbly[3_d]->set_output_data(used_fields, stream_);
297  }
298  }
299 
300  // ELEM_DATA
301  {
302  FieldSet used_fields;
303  for (FieldListAccessor f_acc : this->fields_range()) {
304  if (is_field_output_time( *(f_acc.field()), step) && field_output_times_[f_acc->name()].space_flags_[OutputTime::ELEM_DATA]) {
305  f_acc->set_output_data_cache(OutputTime::ELEM_DATA, stream_);
306  used_fields += *(f_acc.field());
307  }
308  }
309  if (used_fields.size()>0) {
310  auto mixed_assmbly = output_elem_data_assembly_->multidim_assembly();
311  mixed_assmbly[1_d]->set_output_data(used_fields, stream_);
312  mixed_assmbly[2_d]->set_output_data(used_fields, stream_);
313  mixed_assmbly[3_d]->set_output_data(used_fields, stream_);
315  }
316  }
317 
318  // NATIVE_DATA
319  for(FieldListAccessor f_acc : this->fields_range()) {
320  if (is_field_output_time( *(f_acc.field()), step) && field_output_times_[f_acc->name()].space_flags_[OutputTime::NATIVE_DATA]) {
321  f_acc->field_output(stream_, OutputTime::NATIVE_DATA);
322  }
323  }
324 
325  // observe output
326  if (observe_fields_.size() > 0) {
327  for (auto observe_field : this->observe_fields_) {
328  auto *field_ptr = this->field(observe_field);
329  if ( field_ptr->flags().match( FieldFlag::allow_output) ) {
330  if (field_ptr->is_multifield()) {
331  for (uint i_comp=0; i_comp<field_ptr->n_comp(); ++i_comp) {
332  observe_ptr->prepare_compute_data(field_ptr->full_comp_name(i_comp), step.end(), field_ptr->n_shape());
333  }
334  } else {
335  observe_ptr->prepare_compute_data(field_ptr->name(), field_ptr->time(), field_ptr->n_shape());
336  }
337  }
338  }
340  }
341 }
342 
343 
344 void EquationOutput::add_output_times(double begin, double step, double end)
345 {
346  common_output_times_.add(begin,step, end, equation_fixed_type_ );
347 }
348 
349 
351 {
352  // already computed
353  if (stream_->is_output_data_caches_init()) return;
354 
355  // Read optional error control field name
356  bool need_refinment = stream_->get_output_mesh_record();
357 
358  if(need_refinment) {
359  if(stream_->enable_refinement()) {
360  // create output meshes from input record
361  output_mesh_ = std::make_shared<OutputMeshDiscontinuous>(*mesh_, *stream_->get_output_mesh_record());
362 
363  // possibly set error control field for refinement
364  auto ecf = select_error_control_field();
365  output_mesh_->set_error_control_field(ecf);
366 
367  // actually compute refined mesh
368  output_mesh_->create_refined_sub_mesh();
369  output_mesh_->make_serial_master_mesh();
370 
371  stream_->set_output_data_caches(output_mesh_);
372  return;
373  }
374  else
375  {
376  // skip creation of output mesh (use computational one)
377  WarningOut() << "Ignoring output mesh record.\n Output in GMSH format available only on computational mesh!";
378  }
379  }
380 
381  // create output mesh identical with the computational one
382  bool discont = need_refinment | (used_interpolations_.find(OutputTime::CORNER_DATA) != used_interpolations_.end());
383  //discont |= parallel;
384  if (discont) {
385  output_mesh_ = std::make_shared<OutputMeshDiscontinuous>(*mesh_);
386  } else {
387  output_mesh_ = std::make_shared<OutputMesh>(*mesh_);
388  }
389  output_mesh_->create_sub_mesh();
390  if (!parallel) {
391  output_mesh_->make_serial_master_mesh();
392  } else {
393  output_mesh_->make_parallel_master_mesh();
394  }
395  stream_->set_output_data_caches(output_mesh_);
396 }
397 
398 
400 {
401  std::string error_control_field_name = "";
402  // Read optional error control field name
403  auto it = stream_->get_output_mesh_record()->find<std::string>("error_control_field");
404  if(it) error_control_field_name = *it;
405 
406  if(error_control_field_name!="")
407  {
408  FieldCommon* field = this->field(error_control_field_name);
409  // throw input exception if the field is unknown
410  if(field == nullptr){
411  THROW(FieldSet::ExcUnknownField()
412  << FieldCommon::EI_Field(error_control_field_name));
413  }
414 
415  // throw input exception if the field is not scalar
416  if( typeid(*field) == typeid(Field<3,FieldValue<3>::Scalar>) ) {
417 
418  Field<3,FieldValue<3>::Scalar>* error_control_field = static_cast<Field<3,FieldValue<3>::Scalar>*>(field);
419  DebugOut() << "Error control field for output mesh set: " << error_control_field_name << ".";
420  auto lambda_function =
421  [error_control_field](const Armor::array &point_list, const ElementAccessor<OutputMeshBase::spacedim> &elm, std::vector<double> &value_list)->void
422  { error_control_field->value_list(point_list, elm, value_list); };
423 
424  OutputMeshBase::ErrorControlFieldFunc func = lambda_function;
425  return func;
426 
427  }
428  else{
429  THROW(ExcFieldNotScalar()
430  << FieldCommon::EI_Field(error_control_field_name));
431  }
432  }
434 }
FieldCommon::units
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
Definition: field_common.hh:153
EquationOutput::EquationOutput
EquationOutput()
Default constructor.
Definition: equation_output.cc:72
FieldSet::mesh
const Mesh * mesh() const
Returns pointer to mesh.
Definition: field_set.hh:382
Input::Type::Bool
Class for declaration of the input of type Bool.
Definition: type_base.hh:452
FlagArray::match
constexpr bool match(Mask mask) const
Definition: flag_array.hh:163
Input::FullEnum
Definition: accessors.hh:129
EquationOutput::observe_output_assembly_
GenericAssemblyObserve< AssemblyObserveOutput > * observe_output_assembly_
Definition: equation_output.hh:167
FieldCommon::get_output_type
OutputTime::DiscreteSpace get_output_type() const
Definition: field_common.hh:266
FieldListAccessor
Definition: field_set.hh:61
TimeGovernor::end_time
double end_time() const
End time.
Definition: time_governor.hh:591
EquationOutput::initialize
void initialize(std::shared_ptr< OutputTime > stream, Mesh *mesh, Input::Record in_rec, const TimeGovernor &tg)
Definition: equation_output.cc:130
discrete_space.hh
Declaration of class which provides the finite element for every mesh cell.
Input::Type::Instance::close
const Instance & close() const
Used for set Instance to TypeRepository.
Definition: type_generic.cc:108
EquationOutput::select_error_control_field
OutputMeshBase::ErrorControlFieldFunc select_error_control_field()
Selects the error control field out of output field set according to input record.
Definition: equation_output.cc:399
ASSERT
#define ASSERT(expr)
Definition: asserts.hh:351
EquationOutput::create_output_field_selection
const Input::Type::Selection & create_output_field_selection(const string &equation_name, const string &additional_description)
Definition: equation_output.cc:87
TimeGovernor::equation_fixed_mark_type
TimeMark::Type equation_fixed_mark_type() const
Definition: time_governor.hh:481
Input::Record::val
const Ret val(const string &key) const
Definition: accessors_impl.hh:31
Input::Type::Selection::close
const Selection & close() const
Close the Selection, no more values can be added.
Definition: type_selection.cc:65
assembly_observe.hh
EquationOutput::is_field_output_time
bool is_field_output_time(const FieldCommon &field, TimeStep step) const
Definition: equation_output.cc:237
OutputTimeSet::add
void add(double begin, TimeMark::Type mark_type)
Definition: output_time_set.cc:77
THROW
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Definition: exceptions.hh:53
FieldSet::fields_range
Range< FieldListAccessor > fields_range() const
Returns range of Fields held in field_list.
Definition: field_set.cc:329
std::vector
Definition: doxy_dummy_defs.hh:7
Input::Type::Default::read_time
static Default read_time(const std::string &description)
The factory function to make an default value that will be specified at the time when a key will be r...
Definition: type_record.hh:97
ElementAccessor
Definition: dh_cell_accessor.hh:32
TimeMarks::end
TimeMarks::iterator end(TimeMark::Type mask) const
Iterator for the end mimics container-like of TimeMarks.
Definition: time_marks.cc:206
OutputTime::ELEM_DATA
@ ELEM_DATA
Definition: output_time.hh:111
EquationOutput::dh_node_
std::shared_ptr< DOFHandlerMultiDim > dh_node_
Definition: equation_output.hh:161
FieldCommon::flags
FieldCommon & flags(FieldFlag::Flags::Mask mask)
Definition: field_common.hh:192
FieldFlag::allow_output
static constexpr Mask allow_output
The field can output. Is part of generated output selection. (default on)
Definition: field_flag.hh:37
GenericAssemblyObserve::assemble
void assemble(std::shared_ptr< DOFHandlerMultiDim > dh) override
General assemble methods.
Definition: assembly_observe.hh:69
dofhandler.hh
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
uint
unsigned int uint
Definition: mh_dofhandler.hh:101
Input::Array::begin
Iterator< ValueType > begin() const
Definition: accessors_impl.hh:145
GenericAssembly::assemble
void assemble(std::shared_ptr< DOFHandlerMultiDim > dh) override
General assemble methods.
Definition: generic_assembly.hh:209
EquationOutput::make_output_type
const Input::Type::Instance & make_output_type(const string &equation_name, const string &aditional_description="")
Definition: equation_output.cc:113
OutputMeshBase::ErrorControlFieldFunc
std::function< void(const Armor::array &, const ElementAccessor< spacedim > &, std::vector< double > &)> ErrorControlFieldFunc
Definition: output_mesh.hh:77
fe_p.hh
Definitions of basic Lagrangean finite elements with polynomial shape functions.
EquationOutput::output_node_data_assembly_
GenericAssembly< AssemblyOutputNodeData > * output_node_data_assembly_
Definition: equation_output.hh:165
OutputTime::DiscreteSpaceFlags
std::array< bool, 4 > DiscreteSpaceFlags
Definition: output_time.hh:122
EquationOutput::FieldOutputConfig::output_set_
OutputTimeSet output_set_
Set of output times.
Definition: equation_output.hh:54
Input::Iterator
Definition: accessors.hh:143
FieldSet::field_list
std::vector< FieldCommon * > field_list
List of all fields.
Definition: field_set.hh:401
TimeMarks::begin
TimeMarks::iterator begin(TimeMark::Type mask) const
Iterator for the begin mimics container-like of TimeMarks.
Definition: time_marks.cc:192
Input::Type::Default
Class Input::Type::Default specifies default value of keys of a Input::Type::Record.
Definition: type_record.hh:61
EquationOutput::output_corner_data_assembly_
GenericAssembly< AssemblyOutputNodeData > * output_corner_data_assembly_
Definition: equation_output.hh:166
equation_output.hh
OutputTime::set_discrete_flag
static void set_discrete_flag(DiscreteSpaceFlags &dsf, DiscreteSpace d_space)
Definition: output_time.hh:135
EquationOutput::mesh_
Mesh * mesh_
Definition: equation_output.hh:154
TimeStep::end
double end() const
Definition: time_governor.hh:161
EquationOutput::read_from_input
void read_from_input(Input::Record in_rec, const TimeGovernor &tg)
Definition: equation_output.cc:160
Input::Record
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
GenericAssembly::multidim_assembly
MixedPtr< DimAssembly, 1 > multidim_assembly() const
Getter to set of assembly objects.
Definition: generic_assembly.hh:190
Input::Type::Record::allow_auto_conversion
virtual Record & allow_auto_conversion(const string &from_key)
Allows shorter input of the Record providing only value of the from_key given as the parameter.
Definition: type_record.cc:133
accessors.hh
flow_attribute_lib.hh
TimeStep
Representation of one time step..
Definition: time_governor.hh:123
TimeGovernor
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Definition: time_governor.hh:317
Input::Type::Record::root_of_generic_subtree
virtual Record & root_of_generic_subtree()
Definition: type_record.cc:432
EquationOutput::add_output_times
void add_output_times(double begin, double step, double end)
Definition: equation_output.cc:344
OutputTime::empty_discrete_flags
static DiscreteSpaceFlags empty_discrete_flags()
Check if at least one of discrete space flag is set to true.
Definition: output_time.hh:130
Input::Type::Default::obligatory
static Default obligatory()
The factory function to make an empty default value which is obligatory.
Definition: type_record.hh:110
EquationOutput::field_output_times_
std::unordered_map< string, FieldOutputConfig > field_output_times_
Time sets of individual fields.
Definition: equation_output.hh:139
FieldCommon
Common abstract parent of all Field<...> classes.
Definition: field_common.hh:77
FieldSet::add_coords_field
void add_coords_field()
Definition: field_set.cc:307
EquationOutput::equation_type_
TimeMark::Type equation_type_
The time mark type of the equation.
Definition: equation_output.hh:132
EquationOutput::get_input_type
static Input::Type::Record & get_input_type()
Definition: equation_output.cc:28
Input::Record::opt_val
bool opt_val(const string &key, Ret &value) const
Definition: accessors_impl.hh:107
Input::Type::Instance
Helper class that stores data of generic types.
Definition: type_generic.hh:89
Input::Type::Record::declare_key
Record & declare_key(const string &key, std::shared_ptr< TypeBase > type, const Default &default_value, const string &description, TypeBase::attribute_map key_attributes=TypeBase::attribute_map())
Declares a new key of the Record.
Definition: type_record.cc:503
FieldCommon::is_bc
bool is_bc() const
Definition: field_common.hh:269
FieldSet
Container for various descendants of FieldCommonBase.
Definition: field_set.hh:159
output_time_set.hh
Input::Type::Selection
Template for classes storing finite set of named values.
Definition: type_selection.hh:65
Input::Type::Record::close
Record & close() const
Close the Record for further declarations of keys.
Definition: type_record.cc:304
OutputTimeSet::read_from_input
void read_from_input(Input::Array in_array, const TimeGovernor &tg)
Definition: output_time_set.cc:35
Input::Type
Definition: balance.hh:41
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
FieldCommon::is_multifield
bool is_multifield() const
Definition: field_common.hh:461
observe.hh
TimeStep::eq
bool eq(double other_time) const
Definition: time_governor.hh:191
EquationOutput::output
void output(TimeStep step)
Definition: equation_output.cc:250
input_type.hh
TimeMarks
This class is a collection of time marks to manage various events occurring during simulation time.
Definition: time_marks.hh:206
EquationOutput::observe_fields_
std::unordered_set< string > observe_fields_
Set of observed fields. The observe points are given within the observe stream.
Definition: equation_output.hh:142
Mesh
Definition: mesh.h:361
OutputTime::NODE_DATA
@ NODE_DATA
Definition: output_time.hh:109
OutputTimeSet::get_input_type
static const Input::Type::Array get_input_type()
Definition: output_time_set.cc:17
Input::Type::Array
Class for declaration of inputs sequences.
Definition: type_base.hh:339
TimeGovernor::marks
static TimeMarks & marks()
Definition: time_governor.hh:338
Field::value_list
virtual void value_list(const Armor::array &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) const
Definition: field.hh:459
Input::Array
Accessor to input data conforming to declared Array.
Definition: accessors.hh:566
WarningOut
#define WarningOut()
Macro defining 'warning' record of log.
Definition: logger.hh:278
FieldFlag::equation_input
static constexpr Mask equation_input
The field is data parameter of the owning equation. (default on)
Definition: field_flag.hh:33
OutputTime::CORNER_DATA
@ CORNER_DATA
Definition: output_time.hh:110
MixedPtr< FE_P_disc >
FieldCommon::get_flags
FieldFlag::Flags get_flags() const
Definition: field_common.hh:293
EquationOutput::make_output_type_from_record
const Input::Type::Instance & make_output_type_from_record(Input::Type::Record &in_rec, const string &equation_name, const string &aditional_description="")
Definition: equation_output.cc:118
TimeGovernor::equation_mark_type
TimeMark::Type equation_mark_type() const
Definition: time_governor.hh:475
Armor::Array< double >
assembly_output.hh
EquationOutput::FieldOutputConfig
Configuration of output of one field. Pair of OutputTimeSet and DiscreteSpaces.
Definition: equation_output.hh:53
EquationOutput::FieldOutputConfig::space_flags_
OutputTime::DiscreteSpaceFlags space_flags_
Array of used DiscreteSpaces.
Definition: equation_output.hh:55
FieldCommon::n_comp
unsigned int n_comp() const
Definition: field_common.hh:272
EquationOutput::make_output_mesh
void make_output_mesh(bool parallel)
Definition: equation_output.cc:350
EquationOutput::dh_
std::shared_ptr< DOFHandlerMultiDim > dh_
Objects for distribution of dofs.
Definition: equation_output.hh:160
OutputTime::DiscreteSpace
DiscreteSpace
Definition: output_time.hh:108
FieldCommon::full_comp_name
std::string full_comp_name(unsigned int i_comp) const
Definition: field_common.hh:280
EquationOutput::used_interpolations_
std::set< OutputTime::DiscreteSpace > used_interpolations_
Definition: equation_output.hh:149
EquationOutput::common_output_times_
OutputTimeSet common_output_times_
The time set used for the fields without explicit time set.
Definition: equation_output.hh:136
GenericAssemblyObserve< AssemblyObserveOutput >
time_marks.hh
EquationOutput::output_elem_data_assembly_
GenericAssembly< AssemblyOutputElemData > * output_elem_data_assembly_
general assembly objects, hold assembly objects of appropriate dimension
Definition: equation_output.hh:164
FieldCommon::description
FieldCommon & description(const string &description)
Definition: field_common.hh:128
Field
Class template representing a field with values dependent on: point, element, and region.
Definition: field.hh:92
Input::Type::Parameter
Class for representing parametric types in IST.
Definition: type_generic.hh:53
DebugOut
#define DebugOut()
Macro defining 'debug' record of log.
Definition: logger.hh:284
Input::Type::Selection::add_value
Selection & add_value(const int value, const std::string &key, const std::string &description="", TypeBase::attribute_map attributes=TypeBase::attribute_map())
Adds one new value with name given by key to the Selection.
Definition: type_selection.cc:50
OutputTimeSet
Definition: output_time_set.hh:28
ASSERT_PTR
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
Definition: asserts.hh:341
EquationOutput::stream_
std::shared_ptr< OutputTime > stream_
output stream (may be shared by more equation)
Definition: equation_output.hh:130
EquationOutput::equation_fixed_type_
TimeMark::Type equation_fixed_type_
The fixed time mark type of the equation.
Definition: equation_output.hh:134
Input::Type::Default::optional
static Default optional()
The factory function to make an empty default value which is optional.
Definition: type_record.hh:124
OutputTime::N_DISCRETE_SPACES
static const unsigned int N_DISCRETE_SPACES
Definition: output_time.hh:107
EquationOutput::~EquationOutput
~EquationOutput()
Destructor.
Definition: equation_output.cc:78
TimeGovernor::init_time
double init_time() const
Definition: time_governor.hh:536
Input::Array::end
IteratorBase end() const
Definition: accessors_impl.hh:157
EquationOutput::init_field_item
void init_field_item(Input::Iterator< Input::Record > it, const TimeGovernor &tg)
Initialize data of Field given by passed Input::Record.
Definition: equation_output.cc:198
GenericAssembly< AssemblyOutputElemData >
FieldCommon::time
double time() const
Definition: field_common.hh:300
EquationOutput::output_mesh_
std::shared_ptr< OutputMeshBase > output_mesh_
Output mesh.
Definition: equation_output.hh:157
field.hh
OutputTime::NATIVE_DATA
@ NATIVE_DATA
Definition: output_time.hh:112
FieldSet::field
FieldCommon * field(const std::string &field_name) const
Definition: field_set.cc:168
FieldCommon::name
FieldCommon & name(const string &name)
Definition: field_common.hh:121
FieldValue
Definition: field_values.hh:645