Flow123d  release_2.1.0-87-gfbc1563
field.impl.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.impl.hh
15  * @brief
16  */
17 
18 #ifndef FIELD_IMPL_HH_
19 #define FIELD_IMPL_HH_
20 
21 #include <boost/foreach.hpp>
22 
23 #include "field.hh"
24 #include "field_algo_base.impl.hh"
25 #include "mesh/region.hh"
27 #include "input/accessors.hh"
28 #include "io/observe.hh"
29 
30 
31 /******************************************************************************************
32  * Implementation of Field<...>
33  */
34 
35 template<int spacedim, class Value>
37 : data_(std::make_shared<SharedData>())
38 {
39  // n_comp is nonzero only for variable size vectors Vector, VectorEnum, ..
40  // this invariant is kept also by n_comp setter
41  shared_->n_comp_ = (Value::NRows_ ? 0 : 1);
42  this->add_factory( std::make_shared<FactoryBase>() );
43 
44  this->multifield_ = false;
45 }
46 
47 
48 template<int spacedim, class Value>
49 Field<spacedim,Value>::Field(const string &name, bool bc)
50 : data_(std::make_shared<SharedData>())
51 
52 {
53  // n_comp is nonzero only for variable size vectors Vector, VectorEnum, ..
54  // this invariant is kept also by n_comp setter
55  shared_->n_comp_ = (Value::NRows_ ? 0 : 1);
56  shared_->bc_=bc;
57  this->name( name );
58  this->add_factory( std::make_shared<FactoryBase>() );
59  this->multifield_ = false;
60 }
61 
62 
63 
64 template<int spacedim, class Value>
65 Field<spacedim,Value>::Field(unsigned int component_index, string input_name, string name, bool bc)
66 : data_(std::make_shared<SharedData>())
67 {
68  // n_comp is nonzero only for variable size vectors Vector, VectorEnum, ..
69  // this invariant is kept also by n_comp setter
70  shared_->n_comp_ = (Value::NRows_ ? 0 : 1);
71  this->set_component_index(component_index);
72  this->name_ = (name=="") ? input_name : name;
73  this->shared_->input_name_ = input_name;
74  shared_->bc_ = bc;
75 
76  this->multifield_ = false;
77 }
78 
79 
80 template<int spacedim, class Value>
82 : FieldCommon(other),
83  data_(other.data_),
85  factories_(other.factories_)
86 {
87  if (other.no_check_control_field_)
88  no_check_control_field_ = make_shared<ControlField>(*other.no_check_control_field_);
89 
90  this->multifield_ = false;
91 }
92 
93 
94 template<int spacedim, class Value>
96 {
97  //OLD_ASSERT( flags().match( FieldFlag::input_copy ) , "Try to assign to non-copy field '%s' from the field '%s'.", this->name().c_str(), other.name().c_str());
98  OLD_ASSERT(other.shared_->mesh_, "Must call set_mesh before assign to other field.\n");
99  OLD_ASSERT( !shared_->mesh_ || (shared_->mesh_==other.shared_->mesh_),
100  "Assignment between fields with different meshes.\n");
101 
102  // check for self assignement
103  if (&other == this) return *this;
104 
105  // class members derived from FieldCommon
106  shared_ = other.shared_;
107  shared_->is_fully_initialized_ = false;
109  last_time_ = other.last_time_;
113  this->multifield_ = false;
114 
115  // class members of Field class
116  data_ = other.data_;
117  factories_ = other.factories_;
119 
120  if (other.no_check_control_field_) {
121  no_check_control_field_ = make_shared<ControlField>(*other.no_check_control_field_);
122  }
123 
124  return *this;
125 }
126 
127 
128 
129 template<int spacedim, class Value>
131  return FieldBaseType::get_input_type_instance(shared_->input_element_selection_);
132 }
133 
134 
135 
136 template<int spacedim, class Value>
138  OLD_ASSERT(false, "This method can't be used for Field");
139 
140  it::Array arr = it::Array( it::Integer() );
141  return arr;
142 }
143 
144 
145 
146 template<int spacedim, class Value>
148  const Field<spacedim, typename FieldValue<spacedim>::Enum > &control_field,
149  const vector<FieldEnum> &value_list) -> Field &
150 {
151  no_check_control_field_=std::make_shared<ControlField>(control_field);
152  shared_->no_check_values_=value_list;
153  return *this;
154 }
155 
156 template<int spacedim, class Value>
157 void Field<spacedim,Value>::set_mesh(const Mesh &in_mesh) {
158  // since we allow copy of fields before set_mesh is called
159  // we have to check that all copies set the same mesh
160  if (shared_->mesh_ && shared_->mesh_ != &in_mesh) {
161  THROW(ExcFieldMeshDifference() << EI_Field(name()) );
162  }
163 
164  shared_->mesh_ = &in_mesh;
165 
166  // initialize table if it is empty, we assume that the RegionDB is closed at this moment
167  region_fields_.resize( mesh()->region_db().size() );
168  RegionHistory init_history(history_length_limit_); // capacity
169  data_->region_history_.resize( mesh()->region_db().size(), init_history );
170 
171  if (no_check_control_field_) no_check_control_field_->set_mesh(in_mesh);
172 }
173 
174 
175 /*
176 template<int spacedim, class Value>
177 std::shared_ptr< typename Field<spacedim,Value>::FieldBaseType >
178 Field<spacedim,Value>::operator[] (Region reg)
179 {
180  OLD_ASSERT_LESS(reg.idx(), this->region_fields_.size());
181  return this->region_fields_[reg.idx()];
182 }
183 */
184 
185 
186 template <int spacedim, class Value>
188  OLD_ASSERT(this->set_time_result_ != TimeStatus::unknown, "Unknown time status.\n");
189  OLD_ASSERT_LESS(reg.idx(), this->region_fields_.size());
190  FieldBasePtr region_field = this->region_fields_[reg.idx()];
191  return (region_field && typeid(*region_field) == typeid(FieldConstant<spacedim, Value>));
192 }
193 
194 
195 template<int spacedim, class Value>
197  const RegionSet &domain,
198  FieldBasePtr field,
199  double time)
200 {
201  OLD_ASSERT(field, "Null field pointer.\n");
202 
203  OLD_ASSERT( mesh(), "Null mesh pointer, set_mesh() has to be called before set_field().\n");
204  if (domain.size() == 0) return;
205 
206  OLD_ASSERT_EQUAL( field->n_comp() , n_comp());
207  field->set_mesh( mesh() , is_bc() );
208 
209  HistoryPoint hp = HistoryPoint(time, field);
210  for(const Region &reg: domain) {
211  RegionHistory &region_history = data_->region_history_[reg.idx()];
212  // insert hp into descending time sequence
213  OLD_ASSERT( region_history.size() == 0 || region_history[0].first < hp.first, "Can not insert smaller time %g then last time %g in field's history.\n",
214  hp.first, region_history[0].first );
215  region_history.push_front(hp);
216  }
218 }
219 
220 
221 
222 template<int spacedim, class Value>
224  const RegionSet &domain,
225  const Input::AbstractRecord &a_rec,
226  double time)
227 {
228  FieldAlgoBaseInitData init_data(input_name(), n_comp(), units(), limits());
229  set_field(domain, FieldBaseType::function_factory(a_rec, init_data), time);
230 }
231 
232 
233 
234 
235 template<int spacedim, class Value>
236 bool Field<spacedim, Value>::set_time(const TimeStep &time_step, LimitSide limit_side)
237 {
238  OLD_ASSERT( mesh() , "NULL mesh pointer of field '%s'. set_mesh must be called before.\n",name().c_str());
239 
240  // Skip setting time if the new time is equal to current time of the field
241  // and if either the field is continuous in that time or the current limit side is same as the new one.
242  if (time_step.end() == last_time_) {
243  if ( ! is_jump_time() ||
244  limit_side == last_limit_side_) {
245  last_limit_side_ = limit_side;
246  return changed();
247  }
248  }
249 
250  last_time_=time_step.end();
251  last_limit_side_ = limit_side;
252 
253  // possibly update our control field
255  no_check_control_field_->set_time(time_step, limit_side);
256  }
257 
259 
260  // read all descriptors satisfying time.ge(input_time)
261  update_history(time_step);
263 
264  //
265  is_jump_time_=false;
266  // set time_step on all regions
267  // for regions that match type of the field domain
268  for(const Region &reg: mesh()->region_db().get_region_set("ALL") ) {
269  auto rh = data_->region_history_[reg.idx()];
270 
271  // skip regions with no matching BC flag
272  if (reg.is_boundary() != is_bc()) continue;
273 
274  // Check regions with empty history, possibly set default.
275  if ( rh.empty()) continue;
276 
277  double last_time_in_history = rh.front().first;
278  unsigned int history_size=rh.size();
279  unsigned int i_history;
280  OLD_ASSERT(time_step.ge(last_time_in_history), "Setting field time back in history not fully supported yet!");
281 
282  // set history index
283  if ( time_step.gt(last_time_in_history) ) {
284  // in smooth time_step
285  i_history=0;
286  } else {
287  // time_step .eq. input_time; i.e. jump time
288  is_jump_time_=true;
289  if (limit_side == LimitSide::right) {
290  i_history=0;
291  } else {
292  i_history=1;
293  }
294  }
295  i_history=min(i_history, history_size - 1);
296  OLD_ASSERT(i_history >= 0, "Empty field history.");
297  // possibly update field pointer
298 
299  auto new_ptr = rh.at(i_history).second;
300  if (new_ptr != region_fields_[reg.idx()]) {
301  region_fields_[reg.idx()]=new_ptr;
303  }
304  // let FieldBase implementation set the time
305  if ( new_ptr->set_time(time_step) ) set_time_result_ = TimeStatus::changed;
306 
307  }
308 
309  return changed();
310 }
311 
312 
313 template<int spacedim, class Value>
315  ASSERT( flags().match(FieldFlag::equation_input))(other.name().c_str())(this->name().c_str())
316  .error("Can not copy to the non-input field.");
317 
318  // do not use copy if the field have its own input
320  && this->shared_->input_list_.size() != 0 ) return;
321 
322  if (typeid(other) == typeid(*this)) {
323  auto const &other_field = dynamic_cast< Field<spacedim, Value> const &>(other);
324  this->operator=(other_field);
325  }
326 }
327 
328 
329 
330 template<int spacedim, class Value>
331 void Field<spacedim, Value>::output(std::shared_ptr<OutputTime> stream)
332 {
333  // currently we cannot output boundary fields
334  if (!is_bc())
335  stream->register_data(this->output_type(), *this);
336 }
337 
338 
339 template<int spacedim, class Value>
340 void Field<spacedim, Value>::observe_output(std::shared_ptr<Observe> observe)
341 {
342  observe->compute_field_values(*this);
343 }
344 
345 
346 
347 template<int spacedim, class Value>
349 
350  FieldResult result_all = result_none;
351  for(Region &reg : region_set) {
352  auto f = region_fields_[reg.idx()];
353  if (f) {
354  FieldResult fr = f->field_result();
355  if (result_all == result_none) // first region
356  result_all = fr;
357  else if (fr != result_all)
358  result_all = result_other; // if results from individual regions are different
359  } else return result_none; // if field is undefined on any region of the region set
360  }
361 
362  if (result_all == result_constant && region_set.size() > 1)
363  return result_other; // constant result for individual regions could be non-constant on the whole region set
364 
365  return result_all;
366 
367 }
368 
369 
370 template<int spacedim, class Value>
372 {
373  int nrows = Value::NRows_;
374  int ncols = Value::NCols_;
375  string type = "Integer";
377  type = "Double";
378 
379  return fmt::format("{{ \"shape\": [ {}, {} ], \"type\": \"{}\", \"limit\": [ {}, {} ] }}",
380  nrows, ncols, type, this->limits().first, this->limits().second);
381 }
382 
383 
384 template<int spacedim, class Value>
386  OLD_ASSERT( mesh(), "Null mesh pointer, set_mesh() has to be called before.\n");
387 
388  // read input up to given time
389  double input_time;
390  if (shared_->input_list_.size() != 0) {
391  while( shared_->list_idx_ < shared_->input_list_.size()
392  && time.ge( input_time = shared_->input_list_[shared_->list_idx_].val<double>("time") ) ) {
393 
394  const Input::Record & actual_list_item = shared_->input_list_[shared_->list_idx_];
395  // get domain specification
396  RegionSet domain;
397  Input::Array domain_name_array;
398  unsigned int id;
399  if (actual_list_item.opt_val("region", domain_name_array)) {
400  std::vector<string> domain_names = mesh()->region_db().get_and_check_operands(domain_name_array);
401  domain = mesh()->region_db().union_set(domain_names);
402 
403  } else if (actual_list_item.opt_val("rid", id)) {
404  Region region;
405  try {
406  region = mesh()->region_db().find_id(id);
407  } catch (RegionDB::ExcUniqueRegionId &e) {
408  e << actual_list_item.ei_address();
409  throw;
410  }
411  if (region.is_valid())
412  domain.push_back(region);
413  else
414  THROW(RegionDB::ExcUnknownRegion() << RegionDB::EI_ID(id) );
415  } else {
416  THROW(ExcMissingDomain()
417  << actual_list_item.ei_address() );
418  }
419 
420  // get field instance
421  for(auto rit = factories_.rbegin() ; rit != factories_.rend(); ++rit) {
422  FieldBasePtr field_instance = (*rit)->create_field(actual_list_item, *this);
423  if (field_instance) // skip descriptors without related keys
424  {
425  // add to history
426  OLD_ASSERT_EQUAL( field_instance->n_comp() , n_comp());
427  field_instance->set_mesh( mesh() , is_bc() );
428  for(const Region &reg: domain) {
429  data_->region_history_[reg.idx()].push_front(
430  HistoryPoint(input_time, field_instance)
431  );
432  //DebugOut() << "Update history" << print_var(this->name()) <<print_var(reg.label()) << print_var(input_time);
433  }
434  break;
435  }
436  }
437 
438  ++shared_->list_idx_;
439  }
440  }
441 }
442 
443 template<int spacedim, class Value>
445  OLD_ASSERT(mesh(), "Null mesh pointer.");
446  //if (shared_->is_fully_initialized_) return;
447 
448  // check there are no empty field pointers, collect regions to be initialized from default value
449  RegionSet regions_to_init; // empty vector
450 
451  for(const Region &reg : mesh()->region_db().get_region_set("ALL") )
452  if (reg.is_boundary() == is_bc()) { // for regions that match type of the field domain
453  RegionHistory &rh = data_->region_history_[reg.idx()];
454  if ( rh.empty() || ! rh[0].second) // empty region history
455  {
456  // test if check is turned on and control field is FieldConst
457  if (no_check_control_field_ && no_check_control_field_->is_constant(reg) ) {
458  // get constant enum value
459  auto elm = ElementAccessor<spacedim>(mesh(), reg);
460  FieldEnum value = no_check_control_field_->value(elm.centre(),elm);
461  // check that the value is in the disable list
462  if ( std::find(shared_->no_check_values_.begin(), shared_->no_check_values_.end(), value)
463  != shared_->no_check_values_.end() )
464  continue; // the field is not needed on this region
465  }
466  if (shared_->input_default_ != "") { // try to use default
467  regions_to_init.push_back( reg );
468  } else {
469  xprintf(UsrErr, "Missing value of the input field '%s' ('%s') on region ID: %d label: %s.\n",
470  input_name().c_str(), name().c_str(), reg.id(), reg.label().c_str() );
471  }
472  }
473  }
474 
475  // possibly set from default value
476  if ( regions_to_init.size() ) {
477  std::string region_list;
478  // has to deal with fact that reader can not deal with input consisting of simple values
479  string default_input=input_default();
480  auto input_type = get_input_type().make_instance().first;
481  Input::ReaderToStorage reader( default_input, *input_type, Input::FileFormat::format_JSON );
482 
483  auto a_rec = reader.get_root_interface<Input::AbstractRecord>();
484  FieldAlgoBaseInitData init_data(input_name(), n_comp(), units(), limits());
485  auto field_ptr = FieldBaseType::function_factory( a_rec , init_data );
486  field_ptr->set_mesh( mesh(), is_bc() );
487  for(const Region &reg: regions_to_init) {
488  data_->region_history_[reg.idx()]
489  .push_front(HistoryPoint( 0.0, field_ptr) );
490  region_list+=" "+reg.label();
491  }
492  WarningOut().fmt("Default value '{}' for field '{}' ('{}').\n"
493  " on regions: {}\n",
494  input_default(), input_name(), name(), region_list);
495 
496  }
497  //shared_->is_fully_initialized_ = true;
498 }
499 
500 
501 template<int spacedim, class Value>
502 void Field<spacedim,Value>::add_factory(const std::shared_ptr<FactoryBase> factory) {
503  factories_.push_back( factory );
504 }
505 
506 
507 template<int spacedim, class Value>
509  Input::AbstractRecord field_record;
510  if (rec.opt_val(field.input_name(), field_record)) {
511  FieldAlgoBaseInitData init_data(field.input_name(), field.n_comp(), field.units(), field.limits());
512  return FieldBaseType::function_factory(field_record, init_data );
513  }
514  else
515  return FieldBasePtr();
516 }
517 
518 
519 template<int spacedim, class Value>
521  return in_rec.find<Input::AbstractRecord>(input_name);
522 }
523 
524 
525 
526 
527 template<int spacedim, class Value>
529  if (! flags().match(FieldFlag::declare_input)) return;
530 
531  // check that times forms ascending sequence
532  double time,last_time=0.0;
533 
535  it != list.end();
536  ++it) {
537  for(auto rit = factories_.rbegin() ; rit != factories_.rend(); ++rit) {
538  if ( (*rit)->is_active_field_descriptor( (*it), this->input_name() ) ) {
539  shared_->input_list_.push_back( Input::Record( *it ) );
540  time = it->val<double>("time");
541  if (time < last_time) {
542  THROW( ExcNonascendingTime()
543  << EI_Time(time)
544  << EI_Field(input_name())
545  << it->ei_address());
546  }
547  last_time = time;
548 
549  break;
550  }
551  }
552  }
553 
554 }
555 
556 
557 
558 #endif /* FIELD_IMPL_HH_ */
void check_initialized_region_fields_()
Definition: field.impl.hh:444
Iterator< ValueType > begin() const
Common abstract parent of all Field<...> classes.
Definition: field_common.hh:60
virtual bool is_active_field_descriptor(const Input::Record &in_rec, const std::string &input_name)
Definition: field.impl.hh:520
pair< double, FieldBasePtr > HistoryPoint
Pair: time, pointer to FieldBase instance.
Definition: field.hh:299
bool is_jump_time_
Accessor to input data conforming to declared Array.
Definition: accessors.hh:561
unsigned int size() const
Number of subfields that compose the multi-field.
Definition: multi_field.hh:174
MakeInstanceReturnType make_instance(std::vector< ParameterPair > vec=std::vector< ParameterPair >()) override
Implements TypeBase::make_instance.
static const Input::Type::Instance & get_input_type_instance(Input::Type::Selection value_selection=Input::Type::Selection())
RegionSet union_set(std::vector< string > set_names) const
Definition: region.cc:472
Reader for (slightly) modified input files.
std::string get_value_attribute() const override
Definition: field.impl.hh:371
std::string name_
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:62
std::string format(CStringRef format_str, ArgList args)
Definition: format.h:3141
unsigned int component_index_
std::pair< double, double > limits() const
Definition: mesh.h:95
Iterator< Ret > find(const string &key) const
void update_history(const TimeStep &time)
Definition: field.impl.hh:385
Helper class that stores data of generic types.
Definition: type_generic.hh:88
void set_input_list(const Input::Array &list) override
Definition: field.impl.hh:528
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
void observe_output(std::shared_ptr< Observe > observe) override
Definition: field.impl.hh:340
void output(std::shared_ptr< OutputTime > stream) override
Definition: field.impl.hh:331
double last_time_
const std::string & input_default() const
bool set_time(const TimeStep &time, LimitSide limit_side) override
Definition: field.impl.hh:236
const RegionDB & region_db() const
Definition: mesh.h:147
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
Definition: asserts.hh:347
Class for declaration of the integral input data.
Definition: type_base.hh:483
virtual FieldBasePtr create_field(Input::Record rec, const FieldCommon &field)
Definition: field.impl.hh:508
IT::Instance get_input_type() override
Definition: field.impl.hh:130
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) const
Definition: field.hh:364
Field()
Definition: field.impl.hh:36
Class for declaration of inputs sequences.
Definition: type_base.hh:339
std::shared_ptr< SharedData > data_
Definition: field.hh:313
static constexpr bool value
Definition: json.hpp:87
constexpr bool match(Mask mask) const
Definition: flag_array.hh:163
std::shared_ptr< SharedData > shared_
IteratorBase end() const
OutputTime::DiscreteSpace output_type() const
EI_Address ei_address() const
Definition: accessors.cc:178
#define OLD_ASSERT(...)
Definition: global_defs.h:131
bool opt_val(const string &key, Ret &value) const
double time() const
const std::string & name() const
bool ge(double other_time) const
unsigned int FieldEnum
Definition: field_values.hh:41
FieldFlag::Flags & flags()
Region find_id(unsigned int id, unsigned int dim) const
Definition: region.cc:180
const UnitSI & units() const
std::vector< string > get_and_check_operands(const Input::Array &operands) const
Definition: region.cc:312
T get_root_interface() const
Returns the root accessor.
Accessor to the data with type Type::Record.
Definition: accessors.hh:286
IT::Array get_multifield_input_type() override
Definition: field.impl.hh:137
#define xprintf(...)
Definition: system.hh:87
std::shared_ptr< ControlField > no_check_control_field_
Definition: field.hh:323
#define OLD_ASSERT_LESS(a, b)
Definition: global_defs.h:134
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm) const
Definition: field.hh:350
LimitSide last_limit_side_
double end() const
std::vector< FieldBasePtr > region_fields_
Definition: field.hh:328
Accessor to the polymorphic input data of a type given by an AbstracRecord object.
Definition: accessors.hh:453
FieldResult
FieldResult field_result(RegionSet region_set) const override
Indicates special field states.
Definition: field.impl.hh:348
Definition: system.hh:59
bool is_jump_time()
static std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > function_factory(const Input::AbstractRecord &rec, const struct FieldAlgoBaseInitData &init_data)
std::shared_ptr< FieldBaseType > FieldBasePtr
Definition: field.hh:66
std::vector< std::shared_ptr< FactoryBase > > factories_
Definition: field.hh:330
auto disable_where(const Field< spacedim, typename FieldValue< spacedim >::Enum > &control_field, const vector< FieldEnum > &value_list) -> Field &
Definition: field.impl.hh:147
boost::circular_buffer< HistoryPoint > RegionHistory
Nearest history of one region.
Definition: field.hh:301
void set_component_index(unsigned int idx)
bool is_constant(Region reg) override
Definition: field.impl.hh:187
void add_factory(std::shared_ptr< FactoryBase > factory)
Definition: field.impl.hh:502
void set_field(const RegionSet &domain, FieldBasePtr field, double time=0.0)
Definition: field.impl.hh:196
bool gt(double other_time) const
const Mesh * mesh() const
#define WarningOut()
Macro defining &#39;warning&#39; record of log.
Definition: logger.hh:234
FieldCommon & name(const string &name)
Definition: field_common.hh:86
unsigned int n_comp() const
#define OLD_ASSERT_EQUAL(a, b)
Definition: global_defs.h:133
bool changed() const
void set_mesh(const Mesh &mesh) override
Definition: field.impl.hh:157
void set_history_changed()
bool is_valid() const
Returns false if the region has undefined/invalid value.
Definition: region.hh:77
const std::string & input_name() const
void copy_from(const FieldCommon &other) override
Definition: field.impl.hh:314
static constexpr Mask equation_input
The field is data parameter of the owning equation. (default on)
Definition: field_flag.hh:33
bool is_bc() const
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Definition: exceptions.hh:45
Representation of one time step..
TimeStatus set_time_result_
Field & operator=(const Field &other)
Definition: field.impl.hh:95
static const unsigned int history_length_limit_
LimitSide
Definition: field_common.hh:47
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
unsigned int idx() const
Returns a global index of the region.
Definition: region.hh:81