Flow123d  release_3.0.0-968-gc87a28e79
field_common.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file field_common.hh
15  * @brief
16  */
17 
18 #ifndef FIELD_COMMON_HH_
19 #define FIELD_COMMON_HH_
20 
21 #include <algorithm> // for sort, unique
22 #include <limits> // for numeric_limits
23 #include <memory> // for shared_ptr
24 #include <ostream> // for operator<<
25 #include <string> // for string, basic_...
26 #include <utility> // for make_pair, pair
27 #include <vector> // for vector, allocator
28 #include "fields/field_algo_base.hh" // for FieldResult
29 #include "fields/field_flag.hh" // for FieldFlag, Fie...
30 #include "fields/field_values.hh" // for FieldEnum
31 #include "tools/unit_si.hh" // for UnitSI
32 #include "input/accessors.hh" // for Record, Array ...
33 #include "input/input_exception.hh" // for ExcInputMessage
34 #include "input/type_base.hh" // for Array, Type
35 #include "input/type_generic.hh" // for Instance
36 #include "input/type_record.hh" // for Record
37 #include "input/type_selection.hh" // for Selection
38 #include "io/output_time.hh" // for OutputTime
39 #include "mesh/region.hh" // for Region (ptr only)
40 #include "system/asserts.hh" // for Assert, ASSERT
41 #include "system/exc_common.hh" // for EI_Message
42 #include "system/exceptions.hh" // for operator<<
43 #include "system/flag_array.hh" // for FlagArray<>::Mask
44 #include "tools/time_governor.hh" // for TimeGovernor (...
45 
46 class Mesh;
47 class Observe;
48 
49 
50 using namespace std;
51 
52 namespace IT=Input::Type;
53 
54 /**
55  * Left and right time limit, used in the @p set_time() method.
56  * Assigned values allow to index an array.
57  */
58 enum class LimitSide {
59  left=0,
60  right=1
61 };
62 
63 
64 
65 /**
66  * @brief Common abstract parent of all Field<...> classes.
67  *
68  * We need common ancestor in order to keep a list of all fields in one EqData object and allow
69  * collective operations like @p set_time or @p init_from_input.
70  */
71 class FieldCommon {
72 
73 public:
74  TYPEDEF_ERR_INFO(EI_Time, double);
75  TYPEDEF_ERR_INFO(EI_Field, std::string);
76  DECLARE_INPUT_EXCEPTION(ExcNonascendingTime,
77  << "Non-ascending time: " << EI_Time::val << " for field " << EI_Field::qval << ".\n");
78  DECLARE_INPUT_EXCEPTION(ExcMissingDomain,
79  << "Missing domain specification (region or r_id) in the field descriptor:");
80  DECLARE_EXCEPTION(ExcFieldMeshDifference,
81  << "Two copies of the field " << EI_Field::qval << "call set_mesh with different arguments.\n");
82 
83 
84 
85  /// Store data of one initialization message.
86  struct MessageData {
87  /// Constructor
88  MessageData(std::string default_value, std::string field_name, std::string region_list)
89  : default_value_(default_value), field_name_(field_name), region_list_(region_list) {};
90 
91  std::string default_value_; ///< Default value of the field.
92  std::string field_name_; ///< Parameter name_ of the field.
93  std::string region_list_; ///< List of regions separated by comma.
94  };
95 
96  /**
97  * Set name of the field. In fact there are two attributes set by this method.
98  *
99  * The first is name used to identify the field as part of a FieldSet or MultiField objects.
100  * This name is permanent and can be set only by this method. Can be accessed by @p name() method.
101  * This name is also used at output.
102  *
103  * The second is @p input_name_ that determines appropriate key name in the input field descriptor.
104  * This name is also set by this method, but is stored in the internal shared space which
105  * is overwritten during call of copy_from method or assignment operator. Can be accessed by @p input_name() mathod.
106  *
107  */
108  FieldCommon &name(const string & name)
109  { name_=shared_->input_name_ = name;
110  return *this;
111  }
112  /**
113  * Set description of the field, used for description of corresponding key in documentation.
114  */
115  FieldCommon & description(const string & description)
116  { shared_->input_description_ = description; return *this;}
117  /**
118  * Set default value for the field's key from which the default constant valued field will be constructed.
119  *
120  * During the first call of the @p set_time method, we check that the field is defined on all regions.
121  * On regions where it is not set yet, we use given @p dflt string to get particular instance of
122  * FieldBase<> (see @p check_initialized_region_fields_).
123  * The default string is interpreted in the same way as if it appears in the input file
124  * as the value of the field. In particular it can be whole record with @p TYPE of the field etc.
125  * Most common choice is however mere constant.
126  */
127  FieldCommon & input_default(const string &input_default)
128  { shared_->input_default_ = input_default; return *this;}
129  /**
130  * @brief Set basic units of the field.
131  *
132  * Currently, we use it only during output and we represents units just by a string.
133  *
134  * TODO:
135  * Particular class for representing and conversion of various units would be more appropriate.
136  * This can allow specification of the units on the inptu, automatic conversion and the same on the output.
137  * Possibly this allow using Boost::Units library, however, it seems to introduce lot of boilerplate code.
138  * But can increase correctness of the calculations.
139  */
140  FieldCommon & units(const UnitSI & units)
141  { shared_->units_ = units; return *this;}
142 
143  /**
144  * Set limits of value of the field.
145  */
146  FieldCommon & set_limits(double min, double max = std::numeric_limits<double>::max())
147  {
148  ASSERT(min < max)(min)(max).error("Invalid field limits!");
149  shared_->limits_ = std::make_pair(min, max);
150  return *this;
151  }
152 
153  /**
154  * For the fields returning "Enum", we have to pass the Input::Type::Selection object to
155  * the field implementations.
156  *
157  * We must save raw pointer since selection may not be yet initialized (during static initialization phase).
158  */
160  {
161  shared_->input_element_selection_=element_selection;
162  return *this;
163  }
164 
165  /**
166  * Output discrete space used in the output() method. Can be different for different field copies.
167  * one can choose between:
168  * data constant on elements, linear data given in nodes, and discontinuous linear data.
169  *
170  * If not set explicitly by this method, the default value is OutputTime::ELEM_DATA
171  */
173  { if (rt!=OutputTime::UNDEFINED) type_of_output_data_ = rt; return *this; }
174 
175  /**
176  * Set given mask to the field flags, ignoring default setting.
177  * Default setting is declare_input & equation_input & allow_output.
178  */
179  FieldCommon & flags(FieldFlag::Flags::Mask mask)
180  { flags_ = FieldFlag::Flags(mask); return *this; }
181 
182  /**
183  * Add given mask to the field flags.
184  */
185  FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
186  { flags().add(mask); return *this; }
187 
188  /**
189  * Set vector of component names.
190  * Set number of components for run-time sized vectors. This is used latter when we construct
191  * objects derived from FieldBase<...>.
192  *
193  * n_comp_ is constant zero for fixed values, this zero is set by Field<...> constructors
194  */
195  void set_components(const std::vector<string> &names) {
196  // Test of unique values in names vector for MultiField
197  if (multifield_) {
198  std::vector<string> cpy = names;
199  std::sort( cpy.begin(), cpy.end() );
200  cpy.erase( std::unique( cpy.begin(), cpy.end() ), cpy.end() );
201  if (names.size() != cpy.size()) {
202  THROW( Input::ExcInputMessage() << EI_Message("The field " + this->input_name()
203  + " has set non-unique names of components.") );
204  }
205  }
206 
207  shared_->comp_names_ = names;
208  shared_->n_comp_ = (shared_->n_comp_ ? names.size() : 0);
209  }
210 
211 
212  /**
213  * Set internal mesh pointer.
214  */
215  virtual void set_mesh(const Mesh &mesh) {};
216  /**
217  * Set the data list from which field will read its input. It is list of "field descriptors".
218  * When reading from the input list we consider only field descriptors containing key of
219  * named by the field name. These field descriptors has to have times forming ascending sequence.
220  *
221  * The list is used by set_time method to set field on individual regions to actual FieldBase descendants.
222  */
223  virtual void set_input_list(const Input::Array &list, const TimeGovernor &tg) =0;
224 
225  /**
226  * Getters.
227  */
228  const std::string &input_name() const
229  { return shared_->input_name_;}
230 
231  const std::string &name() const
232  { return name_;}
233 
234  const std::string description() const
235  {return shared_->input_description_;}
236 
237  const std::string &input_default() const
238  { return shared_->input_default_;}
239 
240  const UnitSI &units() const
241  {
242  ASSERT(shared_->units_.is_def())(name()).error("Getting undefined unit.\n");
243  return shared_->units_;
244  }
245 
246  std::pair<double, double> limits() const
247  {
248  return shared_->limits_;
249  }
250 
252  { return type_of_output_data_; }
253 
254  bool is_bc() const
255  { return shared_->bc_;}
256 
257  unsigned int n_comp() const
258  { return shared_->n_comp_;}
259 
260  const Mesh * mesh() const
261  { return shared_->mesh_;}
262 
264  { return flags_; }
265 
267  { return flags_; }
268 
269  /**
270  * Returns time set by last call of set_time method.
271  * Can be different for different field copies.
272  */
273  double time() const
274  { return last_time_; }
275 
276  /**
277  * Returns true if the field change algorithm for the current time set through the @p set_time method.
278  * This happen for all times in the field descriptors on the input of this particular field.
279  */
280  bool is_jump_time() {
281  return is_jump_time_;
282  }
283 
284  /**
285  * Returns number of field descriptors containing the field.
286  */
287  unsigned int input_list_size() const {
288  return shared_->input_list_.size();
289  }
290 
291  /**
292  * If the field on given region @p reg exists and is of type FieldConstant<...> the method method returns true
293  * otherwise it returns false.
294  * Then one can call ElementAccessor<spacedim>(mesh(), reg ) to construct an ElementAccessor @p elm
295  * pointing to "virtual" element on which Field::value returns constant value.
296  * Unlike the Field<>::field_result method, this one provides no value, so it have common header (arguments, return type) and
297  * could be part of FieldCommon and FieldSet which is useful in some applications.
298  *
299  * TODO:Current implementation use virtual functions and can be prohibitively slow if called for every element. If this
300  * becomes necessary it is possible to incorporate such test into set_time method and in this method just return precomputed result.
301  */
302  virtual bool is_constant(Region reg) =0;
303 
304 
305  /**
306  * @brief Indicates special field states.
307  *
308  * Extension of the previous method. Return possible values from the enum @p FieldResult, see description there.
309  * The initial state is @p field_none, if the field is correctly set on all regions of the @p region_set given as parameter
310  * we return state @p field_other or even more particular result.
311  *
312  * Special field values spatially constant. Could allow optimization of tensor multiplication and
313  * tensor or vector addition. field_result_ should be set in constructor and in set_time method of particular Field implementation.
314  * We return value @p result_none, if the field is not initialized on the region of the given element accessor @p elm.
315  * Other possible results are: result_zeros, result_eye, result_ones, result_constant, result_other
316  * see @p FieldResult for explanation.
317  *
318  * Multifield return most particular value that holds for all its subfields.
319  *
320  *
321  */
322  virtual FieldResult field_result( RegionSet region_set) const =0;
323 
324  /**
325  * Return specification of the field value type in form of the string:
326  * [ <element type>, NRows, NCols]
327  *
328  * Result is valid JSON (and/or flow style YAML).
329  * For multifields not implemented.
330  */
331  virtual std::string get_value_attribute() const =0;
332 
333  /**
334  * Returns true if set_time_result_ is not @p TimeStatus::constant.
335  * Returns the same value as last set_time method.
336  */
337  bool changed() const
338  {
339  ASSERT( set_time_result_ != TimeStatus::unknown ).error("Invalid time status.");
340  return ( (set_time_result_ == TimeStatus::changed) );
341  }
342 
343  /**
344  * Common part of the field descriptor. To get finished record
345  * one has to add keys for individual fields. This is done automatically
346  * using FieldSet::get_input_type().
347  */
348  static IT::Record field_descriptor_record(const string& record_name);
349 
350  /**
351  * Create description of field descriptor record.
352  */
353  static const std::string field_descriptor_record_description(const string& record_name);
354 
355  /**
356  * Returns input type for particular field instance, this is reference to a static member input_type of the corresponding @p FieldBase
357  * class (i.e. with the same template parameters). This is used in FieldSet::make_field_descriptor_type.
358  */
359  virtual IT::Instance get_input_type() =0;
360 
361  /**
362  * Returns input type for MultiField instance.
363  * TODO: temporary solution, see @p multifield_
364  */
365  virtual IT::Array get_multifield_input_type() =0;
366 
367  /**
368  * Pass through the input array @p input_list_, collect all times where the field could change and
369  * put appropriate time marks into global TimeMarks object.
370  * Introduced time marks have both given @p mark_type and @p type_input() type.
371  *
372  * Further development:
373  * - we have to distinguish "jump" times and "smooth" times
374  */
375  void mark_input_times(const TimeGovernor &tg);
376 
377  /**
378  * Abstract method to update field to the new time level.
379  * Implemented by in class template Field<...>.
380  *
381  * Return true if the value of the field was changed on some region.
382  * The returned value is also stored in @p changed_during_set_time data member.
383  *
384  * Default values helps when creating steady field. Note that default TimeGovernor constructor
385  * set time to 0.0.
386  *
387  * Different field copies can be set to different times.
388  *
389  * TODO: update following:
390  * Set side of limit when calling @p set_time
391  * with jump time, i.e. time where the field change implementation on some region.
392  * Wee assume that implementations prescribe only smooth fields.
393  * This method invalidate result of
394  * @p changed() so it should be called just before @p set_time.
395  * Can be different for different field copies.
396  */
397  virtual bool set_time(const TimeStep &time, LimitSide limit_side) =0;
398 
399  /**
400  * Check that @p other is instance of the same Field<..> class and
401  * perform assignment. Polymorphic copy.
402  *
403  * The copy is performed only if *this have set flag 'input_copy'.
404  * If *this have set also the flag 'decare_input' the copy is performed only if the
405  * input_list is empty.
406  */
407  virtual void copy_from(const FieldCommon & other) =0;
408 
409  /**
410  * Output the field.
411  * The parameter @p output_fields is checked for value named by the field name. If the key exists,
412  * then the output of the field is performed. If the key do not appear in the input, no output is done.
413  */
414  virtual void field_output(std::shared_ptr<OutputTime> stream) =0;
415 
416  /**
417  * Perform the observe output of the field.
418  * The Observe object passed by the parameter is called with the particular Field<> as the parameter
419  * to evaluate the field in observation points and store the values in the OutputData arrays.
420  */
421  virtual void observe_output(std::shared_ptr<Observe> observe) =0;
422 
423 
424  /**
425  * Sets @p component_index_
426  */
427  void set_component_index(unsigned int idx)
428  {
429  this->component_index_ = idx;
430  }
431 
432  /**
433  * Return @p multifield_ flag.
434  * TODO: temporary solution
435  */
436  inline bool is_multifield() const
437  {
438  return this->multifield_;
439  }
440 
441  /**
442  * Print stored messages to table.
443  *
444  * Return true if messages_data_ vector is nonempty and clear its.
445  */
446  static bool print_message_table(ostream& stream, std::string equation_name);
447 
448  /**
449  * Virtual destructor.
450  */
451  virtual ~FieldCommon();
452 
453 
454 protected:
455  /**
456  * Private default constructor. Should be used only through
457  * Field<...>
458  */
459  FieldCommon();
460 
461  /**
462  * Private copy constructor. Should be used only through
463  * Field<...>
464  */
465  FieldCommon(const FieldCommon & other);
466 
467  /**
468  * Invalidate last time in order to force set_time method
469  * update region_fields_.
470  */
472  {
473  last_time_ = -numeric_limits<double>::infinity();
474  }
475 
476  /**
477  * Setters for essential field properties.
478  */
479  /**
480  * Data shared among copies of the same field.
481  *
482  * This allow field copies in different equations with different time setting, but
483  * sharing common input field descriptor array and common history.
484  */
485  struct SharedData {
486  /**
487  * Empty constructor.
488  */
490  : list_idx_(0), limits_(std::make_pair(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max())) {};
491 
492  /**
493  * True for boundary fields.
494  */
495  bool bc_;
496  /**
497  * Number of components for fields that return variable size vectors. Zero in other cases.
498  */
499  unsigned int n_comp_;
500  /**
501  * Names of field components.
502  */
504  /**
505  * Name of the particular field. Used to name the key in the Field list Record.
506  */
507  std::string input_name_;
508  /**
509  * Description of corresponding key in the Field list Record.
510  */
511  std::string input_description_;
512  /**
513  * Units of the field values. Currently just a string description.
514  */
516  /**
517  * For Enum valued fields this is the input type selection that should be used
518  * to read possible values of the field (e.g. for FieldConstant the key 'value' has this selection input type).
519  *
520  * Is empty selection for for non-enum values fields.
521  */
523  /**
524  * Possible default value of the field.
525  */
527  /**
528  * Pointer to the mesh on which the field lives.
529  */
530  const Mesh *mesh_;
531 
532  /**
533  * Vector of input field descriptors from which the field is set.
534  */
536 
537  /**
538  * Index to current position of input field descriptor.
539  */
540  unsigned int list_idx_;
541 
542  /**
543  * True after check_initialized_region_fields_ is called. That happen at first call of the set_time method.
544  */
546 
547  /**
548  * For which values of an enum valued field we do not
549  * check the field. User is responsible, that the value will not be called
550  * on such regions.
551  */
553 
554  /**
555  * Allow set minimal and maximal limit value of Field.
556  */
557  std::pair<double, double> limits_;
558 
559 
560  };
561 
562  /**
563  * Name that identifies the field in the field_set. By default this is same as
564  * shared_->input_name_.
565  */
566  std::string name_;
567 
568  /**
569  * Data shared among copies of the same input field.
570  */
571  std::shared_ptr<SharedData> shared_;
572 
573  /**
574  * Result of last set time method
575  */
576  enum class TimeStatus {
577  changed, //< Field changed during last set time call.
578  constant, //< Field doesn't change.
579  unknown //< Before first call of set_time.
580  };
581 
582  // TODO: Merge time information: set_time_result_, last_time_, last_limit_side_, is_jump_time into
583  // a single structure with single getter.
584  /**
585  * Status of @p history.
586  */
588 
589  /**
590  * Last set time. Can be different for different field copies.
591  * Store also time limit, since the field may be discontinuous.
592  */
593  double last_time_ = -numeric_limits<double>::infinity();
594  LimitSide last_limit_side_ = LimitSide::left;
595 
596  /**
597  * Set to true by the @p set_time method the field algorithm change on any region.
598  * Accessible through the @p is_jump_time method.
599  */
601 
602  /**
603  * Output data type used in the output() method. Can be different for different field copies.
604  */
606 
607  /**
608  * Specify if the field is part of a MultiField and which component it is
609  */
610  unsigned int component_index_;
611 
612  /**
613  * Flag determining if object is Multifield or Field.
614  * TODO: temporary solution, goal is to make these two classes to behave similarly
615  */
617 
618  /**
619  * Maximum number of FieldBase objects we store per one region.
620  */
621  static const unsigned int history_length_limit_=3;
622 
623  /// Field flags. Default setting is "an equation input field, that can read from user input, and can be written to output"
625 
626  /// Vector of data of initialization messages.
628 
629  /**
630  * Stream output operator
631  */
632  friend std::ostream &operator<<(std::ostream &stream, const FieldCommon &field) {
633 
634  vector<string> limit_side_str = {"left", "right"};
635 
636  stream
637  << "field name:" << field.name()
638  << " n. comp.:" << field.n_comp()
639  << " last time:" << field.last_time_
640  << " last limit side:" << limit_side_str[(unsigned int) field.last_limit_side_];
641  return stream;
642  }
643 };
644 
645 
646 
647 
648 
649 
650 
651 #endif /* FIELD_COMMON_HH_ */
FieldCommon::units
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
Definition: field_common.hh:140
LimitSide::right
@ right
FieldCommon::shared_
std::shared_ptr< SharedData > shared_
Definition: field_common.hh:571
FieldCommon::operator<<
friend std::ostream & operator<<(std::ostream &stream, const FieldCommon &field)
Definition: field_common.hh:632
Observe
Definition: observe.hh:182
FieldCommon::last_limit_side_
LimitSide last_limit_side_
Definition: field_common.hh:594
FieldCommon::get_output_type
OutputTime::DiscreteSpace get_output_type() const
Definition: field_common.hh:251
FieldCommon::last_time_
double last_time_
Definition: field_common.hh:593
time_governor.hh
Basic time management class.
FlagArray< FieldFlag >
FieldCommon::output_type
FieldCommon & output_type(OutputTime::DiscreteSpace rt)
Definition: field_common.hh:172
field_algo_base.hh
FieldCommon::flags
FieldFlag::Flags & flags()
Definition: field_common.hh:263
ASSERT
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
Definition: asserts.hh:346
FieldCommon::messages_data_
static std::vector< MessageData > messages_data_
Vector of data of initialization messages.
Definition: field_common.hh:627
FieldCommon::SharedData::input_name_
std::string input_name_
Definition: field_common.hh:507
FieldCommon::set_component_index
void set_component_index(unsigned int idx)
Definition: field_common.hh:427
asserts.hh
Definitions of ASSERTS.
FieldCommon::TimeStatus
TimeStatus
Definition: field_common.hh:576
FieldResult
FieldResult
Definition: field_algo_base.hh:68
FieldCommon::mesh
const Mesh * mesh() const
Definition: field_common.hh:260
THROW
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Definition: exceptions.hh:53
std::vector
Definition: doxy_dummy_defs.hh:7
OutputTime::ELEM_DATA
@ ELEM_DATA
Definition: output_time.hh:107
FieldCommon::set_limits
FieldCommon & set_limits(double min, double max=std::numeric_limits< double >::max())
Definition: field_common.hh:146
FieldCommon::flags
FieldCommon & flags(FieldFlag::Flags::Mask mask)
Definition: field_common.hh:179
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
FieldCommon::SharedData::limits_
std::pair< double, double > limits_
Definition: field_common.hh:557
FieldCommon::SharedData::SharedData
SharedData()
Definition: field_common.hh:489
type_base.hh
type_selection.hh
field_flag.hh
FieldCommon::description
const std::string description() const
Definition: field_common.hh:234
FieldCommon::MessageData::field_name_
std::string field_name_
Parameter name_ of the field.
Definition: field_common.hh:92
FieldCommon::SharedData::input_element_selection_
IT::Selection input_element_selection_
Definition: field_common.hh:522
exceptions.hh
type_record.hh
FieldCommon::flags_add
FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
Definition: field_common.hh:185
Region
Definition: region.hh:146
FieldCommon::input_default
const std::string & input_default() const
Definition: field_common.hh:237
LimitSide::left
@ left
FieldCommon::SharedData::units_
UnitSI units_
Definition: field_common.hh:515
FieldCommon::SharedData::comp_names_
std::vector< std::string > comp_names_
Definition: field_common.hh:503
FieldCommon::multifield_
bool multifield_
Definition: field_common.hh:616
FieldCommon::units
const UnitSI & units() const
Definition: field_common.hh:240
type_generic.hh
FieldCommon::MessageData::MessageData
MessageData(std::string default_value, std::string field_name, std::string region_list)
Constructor.
Definition: field_common.hh:88
FieldCommon::SharedData::is_fully_initialized_
bool is_fully_initialized_
Definition: field_common.hh:545
accessors.hh
FieldCommon::SharedData::input_description_
std::string input_description_
Definition: field_common.hh:511
FieldCommon::set_mesh
virtual void set_mesh(const Mesh &mesh)
Definition: field_common.hh:215
TimeStep
Representation of one time step..
Definition: time_governor.hh:113
TimeGovernor
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Definition: time_governor.hh:294
output_time.hh
field_values.hh
FieldCommon
Common abstract parent of all Field<...> classes.
Definition: field_common.hh:71
FieldCommon::SharedData::n_comp_
unsigned int n_comp_
Definition: field_common.hh:499
UnitSI
Class for representation SI units of Fields.
Definition: unit_si.hh:40
FieldCommon::MessageData::region_list_
std::string region_list_
List of regions separated by comma.
Definition: field_common.hh:93
Input::Type::Instance
Helper class that stores data of generic types.
Definition: type_generic.hh:89
FieldCommon::changed
bool changed() const
Definition: field_common.hh:337
LimitSide
LimitSide
Definition: field_common.hh:58
input_exception.hh
FieldCommon::is_bc
bool is_bc() const
Definition: field_common.hh:254
Input::Type::Selection
Template for classes storing finite set of named values.
Definition: type_selection.hh:65
FieldCommon::SharedData::input_list_
vector< Input::Record > input_list_
Definition: field_common.hh:535
Input::Type
Definition: balance.hh:38
exc_common.hh
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
TYPEDEF_ERR_INFO
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
Definition: exceptions.hh:194
FieldCommon::is_multifield
bool is_multifield() const
Definition: field_common.hh:436
FieldCommon::set_components
void set_components(const std::vector< string > &names)
Definition: field_common.hh:195
FieldCommon::input_default
FieldCommon & input_default(const string &input_default)
Definition: field_common.hh:127
OutputTime::UNDEFINED
@ UNDEFINED
Definition: output_time.hh:110
Mesh
Definition: mesh.h:80
FieldFlag::Flags
FlagArray< FieldFlag > Flags
Definition: field_flag.hh:26
Input::Type::Array
Class for declaration of inputs sequences.
Definition: type_base.hh:339
FieldCommon::SharedData::mesh_
const Mesh * mesh_
Definition: field_common.hh:530
Input::Array
Accessor to input data conforming to declared Array.
Definition: accessors.hh:566
unit_si.hh
std
Definition: doxy_dummy_defs.hh:5
DECLARE_INPUT_EXCEPTION
#define DECLARE_INPUT_EXCEPTION(ExcName, Format)
Macro for simple definition of input exceptions.
Definition: input_exception.hh:69
FieldFlag::equation_input
static constexpr Mask equation_input
The field is data parameter of the owning equation. (default on)
Definition: field_flag.hh:33
FieldCommon::get_flags
FieldFlag::Flags get_flags() const
Definition: field_common.hh:266
region.hh
flag_array.hh
FieldFlag::declare_input
static constexpr Mask declare_input
The field can be set from input. The key in input field descriptor is declared. (default on)
Definition: field_flag.hh:35
FieldCommon::SharedData
Definition: field_common.hh:485
FieldCommon::name
const std::string & name() const
Definition: field_common.hh:231
FieldCommon::n_comp
unsigned int n_comp() const
Definition: field_common.hh:257
FieldCommon::SharedData::list_idx_
unsigned int list_idx_
Definition: field_common.hh:540
OutputTime::DiscreteSpace
DiscreteSpace
Definition: output_time.hh:104
FieldCommon::SharedData::no_check_values_
std::vector< FieldEnum > no_check_values_
Definition: field_common.hh:552
FieldCommon::is_jump_time_
bool is_jump_time_
Definition: field_common.hh:600
FieldCommon::input_name
const std::string & input_name() const
Definition: field_common.hh:228
FieldCommon::SharedData::input_default_
string input_default_
Definition: field_common.hh:526
FieldCommon::is_jump_time
bool is_jump_time()
Definition: field_common.hh:280
FieldCommon::limits
std::pair< double, double > limits() const
Definition: field_common.hh:246
FieldCommon::input_selection
FieldCommon & input_selection(Input::Type::Selection element_selection)
Definition: field_common.hh:159
FieldCommon::description
FieldCommon & description(const string &description)
Definition: field_common.hh:115
std::list
Definition: doxy_dummy_defs.hh:9
DECLARE_EXCEPTION
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
Definition: exceptions.hh:158
FieldCommon::set_history_changed
void set_history_changed()
Definition: field_common.hh:471
FieldCommon::time
double time() const
Definition: field_common.hh:273
FieldCommon::MessageData
Store data of one initialization message.
Definition: field_common.hh:86
FieldCommon::set_time_result_
TimeStatus set_time_result_
Definition: field_common.hh:587
FieldCommon::input_list_size
unsigned int input_list_size() const
Definition: field_common.hh:287
FieldCommon::name_
std::string name_
Definition: field_common.hh:566
FieldCommon::component_index_
unsigned int component_index_
Definition: field_common.hh:610
FieldCommon::name
FieldCommon & name(const string &name)
Definition: field_common.hh:108