Flow123d  release_2.2.1-10-gb9fad4d
sorption_base.cc
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 sorption_base.cc
15  * @brief
16  */
17 
18 #include <boost/foreach.hpp>
19 
26 #include "reaction/isotherm.hh"
27 
28 #include "system/system.hh"
29 #include "system/sys_profiler.hh"
30 
31 #include "la/distribution.hh"
32 #include "mesh/mesh.h"
33 #include "mesh/elements.h"
34 #include "input/type_selection.hh"
35 
36 #include "fields/field_set.hh"
38 
39 using namespace Input::Type;
40 
42  return Selection("SorptionType")
43  .add_value(Isotherm::none,"none", "No sorption considered.")
44  .add_value(Isotherm::linear, "linear",
45  "Linear isotherm runs the concentration exchange between liquid and solid.")
46  .add_value(Isotherm::langmuir, "langmuir",
47  "Langmuir isotherm runs the concentration exchange between liquid and solid.")
48  .add_value(Isotherm::freundlich, "freundlich",
49  "Freundlich isotherm runs the concentration exchange between liquid and solid.")
50  .close();
51 }
52 
53 
54 
56  return Record("SorptionAux", "AUXILIARY RECORD. Should not be directly part of the input tree.")
57  .declare_key("substances", Array(String(),1), Default::obligatory(),
58  "Names of the substances that take part in the sorption model.")
59  .declare_key("solvent_density", Double(0.0), Default("1.0"),
60  "Density of the solvent.")
61  .declare_key("substeps", Integer(1), Default("1000"),
62  "Number of equidistant substeps, molar mass and isotherm intersections")
63  .declare_key("solubility", Array(Double(0.0)), Default::optional(), //("-1.0"), //
64  "Specifies solubility limits of all the sorbing species.")
65  .declare_key("table_limits", Array(Double(0.0)), Default::optional(), //("-1.0"), //
66  "Specifies highest aqueous concentration in interpolation table.")
67  .declare_key("input_fields", Array(EqData("","").input_data_set_.make_field_descriptor_type("Sorption")), Default::obligatory(), //
68  "Containes region specific data necessary to construct isotherms.")//;
69  .declare_key("reaction_liquid", ReactionTerm::it_abstract_reaction(), Default::optional(), "Reaction model following the sorption in the liquid.")
70  .declare_key("reaction_solid", ReactionTerm::it_abstract_reaction(), Default::optional(), "Reaction model following the sorption in the solid.")
71  .close();
72 }
73 
74 
75 SorptionBase::EqData::EqData(const string &output_field_name, const string &output_field_desc)
76 {
77  *this += rock_density.name("rock_density")
78  .description("Rock matrix density.")
79  .input_default("0.0")
80  .units( UnitSI().kg().m(-3) );
81 
82  *this += sorption_type.name("sorption_type")
83  .description("Considered sorption is described by selected isotherm.\n"
84  "If porosity on an element is equal to 1.0 (or even higher), meaning no sorbing surface, then type 'none' will be selected automatically.")
85  .input_selection(get_sorption_type_selection())
86  .units( UnitSI::dimensionless() );
87 
88  *this += distribution_coefficient.name("distribution_coefficient")
89  .description("Distribution coefficient (( $k_l, k_F, k_L $)) of linear, Freundlich or Langmuir isotherm respectively.")
90  .input_default("1.0")
91  .units( UnitSI().m(3).kg(-1) );
92 
93  *this += isotherm_other.name("isotherm_other")
94  .description("Additional parameter (($ \\alpha $)) of nonlinear isotherms.")
95  .input_default("1.0")
96  .units( UnitSI::dimensionless() );
97 
98  *this += init_conc_solid.name("init_conc_solid")
99  .description("Initial solid concentration of substances. It is a vector: one value for every substance.")
100  .input_default("0")
101  .units( UnitSI().dimensionless() );
102 
103  input_data_set_ += *this;
104 
105  // porosity field is set from governing equation (transport) later
106  // hence we do not add it to the input_data_set_
107  *this += porosity
108  .name("porosity")
109  .units( UnitSI::dimensionless() )
110  .flags(FieldFlag::input_copy)
111  .set_limits(0.0);
112 
113  output_fields += *this;
114  output_fields += conc_solid.name(output_field_name)
115  .description(output_field_desc)
116  .units( UnitSI().dimensionless() )
118 }
119 
120 
122  : ReactionTerm(init_mesh, in_rec),
123  data_(nullptr)
124 {
125  // creating reaction from input and setting their parameters
126  make_reactions();
127 }
128 
129 
131 {
132  if (data_ != nullptr) delete data_;
133 
134  VecScatterDestroy(&(vconc_out_scatter));
135  if (vconc_solid != NULL) {
136 
137 
138  for (unsigned int sbi = 0; sbi < substances_.size(); sbi++)
139  {
140  //no mpi vectors
141  VecDestroy( &(vconc_solid[sbi]) );
142  delete [] conc_solid[sbi];
143  }
144  delete [] vconc_solid;
145  delete [] conc_solid;
146  }
147 }
148 
150 {
152 
153  reactions_it = input_record_.find<Input::AbstractRecord>("reaction_liquid");
154  if ( reactions_it )
155  {
156  // TODO: allowed instances in this case are only
157  // FirstOrderReaction, RadioactiveDecay
158  reaction_liquid = (*reactions_it).factory< ReactionTerm, Mesh &, Input::Record >(*mesh_, *reactions_it);
159  } else
160  {
161  reaction_liquid = nullptr;
162  }
163 
164  reactions_it = input_record_.find<Input::AbstractRecord>("reaction_solid");
165  if ( reactions_it )
166  {
167  // TODO: allowed instances in this case are only
168  // FirstOrderReaction, RadioactiveDecay
169  reaction_solid = (*reactions_it).factory< ReactionTerm, Mesh &, Input::Record >(*mesh_, *reactions_it);
170  } else
171  {
172  reaction_solid = nullptr;
173  }
174 }
175 
177 {
178  OLD_ASSERT(distribution_ != nullptr, "Distribution has not been set yet.\n");
179  OLD_ASSERT(time_ != nullptr, "Time governor has not been set yet.\n");
180  OLD_ASSERT(output_stream_,"Null output stream.");
182 
183  initialize_substance_ids(); //computes present substances and sets indices
184  initialize_from_input(); //reads non-field data from input
185 
186  //isotherms array resized bellow
187  unsigned int nr_of_regions = mesh_->region_db().bulk_size();
188  isotherms.resize(nr_of_regions);
189  for(unsigned int i_reg = 0; i_reg < nr_of_regions; i_reg++)
190  {
191  isotherms[i_reg].resize(n_substances_);
192  for(unsigned int i_subst = 0; i_subst < n_substances_; i_subst++)
193  {
194  isotherms[i_reg][i_subst] = Isotherm();
195  }
196  }
197 
198  //allocating new array for sorbed concentrations
199  conc_solid = new double* [substances_.size()];
200  conc_solid_out.clear();
201  conc_solid_out.resize( substances_.size() );
202  for (unsigned int sbi = 0; sbi < substances_.size(); sbi++)
203  {
204  conc_solid[sbi] = new double [distribution_->lsize()];
205  conc_solid_out[sbi].resize( distribution_->size() );
206  //zero initialization of solid concentration for all substances
207  for(unsigned int i=0; i < distribution_->lsize(); i++)
208  conc_solid[sbi][i] = 0;
209  }
210 
212 
214 
215  if(reaction_liquid)
216  {
217  reaction_liquid->substances(substances_)
218  .concentration_matrix(concentration_matrix_, distribution_, el_4_loc_, row_4_el_)
219  .set_time_governor(*time_);
220  reaction_liquid->initialize();
221  }
222  if(reaction_solid)
223  {
224  reaction_solid->substances(substances_)
225  .concentration_matrix(conc_solid, distribution_, el_4_loc_, row_4_el_)
226  .set_time_governor(*time_);
227  reaction_solid->initialize();
228  }
229 }
230 
231 
233 {
234  Input::Array substances_array = input_record_.val<Input::Array>("substances");
235  unsigned int k, global_idx, i_subst = 0;
236  bool found;
237  Input::Iterator<string> spec_iter = substances_array.begin<string>();
238 
239  for(; spec_iter != substances_array.end(); ++spec_iter, i_subst++)
240  {
241  //finding the name of a substance in the global array of names
242  found = false;
243  for(k = 0; k < substances_.size(); k++)
244  {
245  if (*spec_iter == substances_[k].name())
246  {
247  global_idx = k;
248  found = true;
249  break;
250  }
251  }
252 
253  if(!found)
254  THROW(ReactionTerm::ExcUnknownSubstance()
255  << ReactionTerm::EI_Substance(*spec_iter)
256  << substances_array.ei_address());
257 
258  //finding the global index of substance in the local array
259  found = false;
260  for(k = 0; k < substance_global_idx_.size(); k++)
261  {
262  if(substance_global_idx_[k] == global_idx)
263  {
264  found = true;
265  break;
266  }
267  }
268 
269  if(!found)
270  {
271  substance_global_idx_.push_back(global_idx);
272  }
273 
274  }
276 }
277 
279 {
280  // read number of interpolation steps - value checked by the record definition
281  n_interpolation_steps_ = input_record_.val<int>("substeps");
282 
283  // read the density of solvent - value checked by the record definition
284  solvent_density_ = input_record_.val<double>("solvent_density");
285 
286  // read the solubility vector
287  Input::Iterator<Input::Array> solub_iter = input_record_.find<Input::Array>("solubility");
288  if( solub_iter )
289  {
290  if (solub_iter->Array::size() != n_substances_)
291  {
292  THROW(SorptionBase::ExcSubstanceCountMatch()
293  << SorptionBase::EI_ArrayName("solubility")
295  // there is no way to get ei_address from 'solub_iter', only as a string
296  }
297 
298  else solub_iter->copy_to(solubility_vec_);
299  }
300  else{
301  // fill solubility_vec_ with zeros
302  solubility_vec_.clear();
303  solubility_vec_.resize(n_substances_,0.0);
304  }
305 
306  // read the interpolation table limits
307  Input::Iterator<Input::Array> interp_table_limits = input_record_.find<Input::Array>("table_limits");
308  if( interp_table_limits )
309  {
310  if (interp_table_limits->Array::size() != n_substances_)
311  {
312  THROW(SorptionBase::ExcSubstanceCountMatch()
313  << SorptionBase::EI_ArrayName("table_limits")
315  // there is no way to get ei_address from 'interp_table_limits', only as a string
316  }
317 
318  else interp_table_limits->copy_to(table_limit_);
319  }
320  else{
321  // fill table_limit_ with zeros
322  table_limit_.clear();
323  table_limit_.resize(n_substances_,0.0);
324  }
325 }
326 
328 {
329  OLD_ASSERT(n_substances_ > 0, "Number of substances is wrong, they might have not been set yet.\n");
330 
331  // create vector of substances that are involved in sorption
332  // and initialize data_ with their names
333  std::vector<std::string> substances_sorption;
334  for (unsigned int i : substance_global_idx_)
335  substances_sorption.push_back(substances_[i].name());
336  data_->set_components(substances_sorption);
337 
338  // read fields from input file
340 
341  data_->set_mesh(*mesh_);
342 
343  //initialization of output
344  //output_array = input_record_.val<Input::Array>("output_fields");
349  for (unsigned int sbi=0; sbi<substances_.size(); sbi++)
350  {
351  // create shared pointer to a FieldElementwise and push this Field to output_field on all regions
352  auto output_field_ptr = conc_solid_out[sbi].create_field<3, FieldValue<3>::Scalar>(substances_.size());
353  data_->conc_solid[sbi].set_field(mesh_->region_db().get_region_set("ALL"), output_field_ptr, 0);
354  }
355  //output_stream_->add_admissible_field_names(output_array);
357 }
358 
359 
361 {
362  OLD_ASSERT(distribution_ != nullptr, "Distribution has not been set yet.\n");
363  OLD_ASSERT(time_ != nullptr, "Time governor has not been set yet.\n");
364  OLD_ASSERT(output_stream_,"Null output stream.");
366 
368  std::stringstream ss; // print warning message with table of uninitialized fields
369  if ( FieldCommon::print_message_table(ss, "sorption") ) {
370  WarningOut() << ss.str();
371  }
373  make_tables();
374 
375  // write initial condition
376  //output_vector_gather();
377  //data_->output_fields.set_time(time_->step(), LimitSide::right);
378  //data_->output_fields.output(output_stream_);
379 
380  if(reaction_liquid) reaction_liquid->zero_time_step();
381  if(reaction_solid) reaction_solid->zero_time_step();
382 
383  output_data();
384 }
385 
387 {
388  for (unsigned int loc_el = 0; loc_el < distribution_->lsize(); loc_el++)
389  {
390  unsigned int index = el_4_loc_[loc_el];
391  ElementAccessor<3> ele_acc = mesh_->element_accessor(index);
392 
393  //setting initial solid concentration for substances involved in adsorption
394  for (unsigned int sbi = 0; sbi < n_substances_; sbi++)
395  {
396  int subst_id = substance_global_idx_[sbi];
397  conc_solid[subst_id][loc_el] = data_->init_conc_solid[sbi].value(ele_acc.centre(), ele_acc);
398  }
399  }
400 }
401 
402 
404 {
405  data_->set_time(time_->step(), LimitSide::right); // set to the last computed time
406 
407  // if parameters changed during last time step, reinit isotherms and eventualy
408  // update interpolation tables in the case of constant rock matrix parameters
409  if(data_->changed())
410  make_tables();
411 
412 
413  START_TIMER("Sorption");
414  for (unsigned int loc_el = 0; loc_el < distribution_->lsize(); loc_el++)
415  {
417  }
418  END_TIMER("Sorption");
419 
420  if(reaction_liquid) reaction_liquid->update_solution();
421  if(reaction_solid) reaction_solid->update_solution();
422 }
423 
425 {
426  try
427  {
428  ElementAccessor<3> elm;
429  BOOST_FOREACH(const Region &reg_iter, this->mesh_->region_db().get_region_set("BULK") )
430  {
431  int reg_idx = reg_iter.bulk_idx();
432 
433  if(data_->is_constant(reg_iter))
434  {
435  ElementAccessor<3> elm(this->mesh_, reg_iter); // constant element accessor
436  isotherm_reinit(isotherms[reg_idx],elm);
437  for(unsigned int i_subst = 0; i_subst < n_substances_; i_subst++)
438  {
439  isotherms[reg_idx][i_subst].make_table(n_interpolation_steps_);
440  }
441  }
442  }
443  }
444  catch(ExceptionBase const &e)
445  {
446  e << input_record_.ei_address();
447  throw;
448  }
449 }
450 
451 double **SorptionBase::compute_reaction(double **concentrations, int loc_el)
452 {
453  ElementFullIter elem = mesh_->element(el_4_loc_[loc_el]);
454  int reg_idx = elem->region().bulk_idx();
455  unsigned int i_subst, subst_id;
456 
457  std::vector<Isotherm> & isotherms_vec = isotherms[reg_idx];
458 
459  try{
460  // Constant value of rock density and mobile porosity over the whole region
461  // => interpolation_table is precomputed
462  if (isotherms_vec[0].is_precomputed())
463  {
464  for(i_subst = 0; i_subst < n_substances_; i_subst++)
465  {
466  subst_id = substance_global_idx_[i_subst];
467 
468  isotherms_vec[i_subst].interpolate(concentration_matrix_[subst_id][loc_el],
469  conc_solid[subst_id][loc_el]);
470  }
471  }
472  else
473  {
474  isotherm_reinit(isotherms_vec, elem->element_accessor());
475 
476  for(i_subst = 0; i_subst < n_substances_; i_subst++)
477  {
478  subst_id = substance_global_idx_[i_subst];
479  isotherms_vec[i_subst].compute(concentration_matrix_[subst_id][loc_el],
480  conc_solid[subst_id][loc_el]);
481  }
482  }
483  }
484  catch(ExceptionBase const &e)
485  {
486  e << input_record_.ei_address();
487  throw;
488  }
489 
490  return concentrations;
491 }
492 
493 
494 /**************************************** OUTPUT ***************************************************/
495 
497 {
498  int sbi, n_subst;
499  n_subst = substances_.size();
500 
501  vconc_solid = new Vec [n_subst];
502 
503  for (sbi = 0; sbi < n_subst; sbi++) {
504  VecCreateMPIWithArray(PETSC_COMM_WORLD,1, distribution_->lsize(), mesh_->n_elements(), conc_solid[sbi],
505  &vconc_solid[sbi]);
506  VecZeroEntries(vconc_solid[sbi]);
507 
508  VecZeroEntries(conc_solid_out[sbi].get_data_petsc());
509  }
510 
511  // creating output vector scatter
512  IS is;
513  ISCreateGeneral(PETSC_COMM_SELF, mesh_->n_elements(), row_4_el_, PETSC_COPY_VALUES, &is); //WithArray
514  VecScatterCreate(vconc_solid[0], is, conc_solid_out[0].get_data_petsc(), PETSC_NULL, &vconc_out_scatter);
515  ISDestroy(&(is));
516 }
517 
518 
520 {
521  unsigned int sbi;
522 
523  for (sbi = 0; sbi < substances_.size(); sbi++) {
524  VecScatterBegin(vconc_out_scatter, vconc_solid[sbi], conc_solid_out[sbi].get_data_petsc(), INSERT_VALUES, SCATTER_FORWARD);
525  VecScatterEnd(vconc_out_scatter, vconc_solid[sbi], conc_solid_out[sbi].get_data_petsc(), INSERT_VALUES, SCATTER_FORWARD);
526  }
527 }
528 
529 
531 {
535  }
536 
537  // Register fresh output data
538  data_->output_fields.output(time().step());
539 }
TimeGovernor & time()
Definition: equation.hh:148
void output_type(OutputTime::DiscreteSpace rt)
Definition: field_set.hh:201
unsigned int size() const
get global size
void set_input_list(Input::Array input_list)
Definition: field_set.hh:180
std::shared_ptr< ReactionTerm > reaction_solid
Iterator< ValueType > begin() const
void allocate_output_mpi(void)
Allocates petsc vectors, prepares them for output and creates vector scatter.
MultiField< 3, FieldValue< 3 >::Scalar > conc_solid
Calculated sorbed concentrations, for output only.
void make_reactions()
std::vector< VectorSeqDouble > conc_solid_out
sorbed concentration array output (gathered - sequential)
Accessor to input data conforming to declared Array.
Definition: accessors.hh:567
double solvent_density_
EI_Address ei_address() const
Definition: accessors.cc:314
std::vector< std::vector< Isotherm > > isotherms
virtual ~SorptionBase(void)
void initialize_substance_ids()
Reads names of substances from input and creates indexing to global vector of substance.
double ** concentration_matrix_
unsigned int bulk_size() const
Definition: region.cc:268
const std::vector< std::string > & names()
Definition: substance.hh:85
Class Input::Type::Default specifies default value of keys of a Input::Type::Record.
Definition: type_record.hh:61
void output(TimeStep step)
static Default obligatory()
The factory function to make an empty default value which is obligatory.
Definition: type_record.hh:110
SubstanceList substances_
Names belonging to substances.
void zero_time_step() override
RegionSet get_region_set(const string &set_name) const
Definition: region.cc:328
Definition: mesh.h:97
Iterator< Ret > find(const string &key) const
int * row_4_el_
Indices of rows belonging to elements.
void initialize(std::shared_ptr< OutputTime > stream, Input::Record in_rec, const TimeGovernor &tg)
EquationOutput output_fields
Fields indended for output, i.e. all input fields plus those representing solution.
static const Input::Type::Selection & get_sorption_type_selection()
const RegionDB & region_db() const
Definition: mesh.h:155
ElementAccessor< 3 > element_accessor(unsigned int idx, bool boundary=false)
Definition: mesh.cc:669
const TimeStep & step(int index=-1) const
std::vector< double > table_limit_
Class for declaration of the integral input data.
Definition: type_base.hh:489
static Input::Type::Abstract & it_abstract_reaction()
unsigned int size() const
Definition: substance.hh:87
Class for declaration of inputs sequences.
Definition: type_base.hh:345
std::shared_ptr< OutputTime > output_stream_
Pointer to a transport output stream.
ReactionTerm(Mesh &init_mesh, Input::Record in_rec)
Constructor.
Class ReactionTerm is an abstract class representing reaction term in transport.
std::vector< unsigned int > substance_global_idx_
Mapping from local indexing of substances to global.
void initialize_fields()
Initializes field sets.
Class Dual_por_exchange implements the model of dual porosity.
IteratorBase end() const
EI_Address ei_address() const
Definition: accessors.cc:178
static Default optional()
The factory function to make an empty default value which is optional.
Definition: type_record.hh:124
#define OLD_ASSERT(...)
Definition: global_defs.h:131
void setup_components()
unsigned int n_elements() const
Definition: mesh.h:141
Class for declaration of the input data that are floating point numbers.
Definition: type_base.hh:540
Distribution * distribution_
Pointer to reference to distribution of elements between processors.
static constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
Definition: field_flag.hh:55
void output_data(void) override
Output method.
static constexpr Mask input_copy
Definition: field_flag.hh:44
Vec * vconc_solid
PETSC sorbed concentration vector (parallel).
MultiField< 3, FieldValue< 3 >::Scalar > init_conc_solid
Initial sorbed concentrations.
void initialize_from_input()
Initializes private members of sorption from the input record.
std::vector< double > solubility_vec_
Accessor to the data with type Type::Record.
Definition: accessors.hh:292
unsigned int n_interpolation_steps_
const Ret val(const string &key) const
void make_tables(void)
#define START_TIMER(tag)
Starts a timer with specified tag.
#define OLD_ASSERT_LESS(a, b)
Definition: global_defs.h:134
Mesh * mesh_
Definition: equation.hh:223
virtual void isotherm_reinit(std::vector< Isotherm > &isotherms, const ElementAccessor< 3 > &elm)=0
Reinitializes the isotherm.
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.
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:490
void output_vector_gather(void) override
Gathers all the parallel vectors to enable them to be output.
void update_solution(void) override
Updates the solution.
Accessor to the polymorphic input data of a type given by an AbstracRecord object.
Definition: accessors.hh:459
double ** compute_reaction(double **concentrations, int loc_el) override
Support classes for parallel programing.
Class SorptionBase is abstract class representing model of sorption in transport. ...
const Selection & close() const
Close the Selection, no more values can be added.
Input::Record input_record_
Definition: equation.hh:225
void set_components(const std::vector< string > &names)
Definition: field_set.hh:167
int * el_4_loc_
Indices of elements belonging to local dofs.
void set_initial_condition()
Reads and sets initial condition for concentration in solid.
EqData(const string &output_field_name, const string &output_field_desc)
Collect all fields.
bool set_time(const TimeStep &time, LimitSide limit_side)
Definition: field_set.cc:149
bool is_constant(Region reg) const
Definition: field_set.cc:165
unsigned int bulk_idx() const
Returns index of the region in the bulk set.
Definition: region.hh:90
#define WarningOut()
Macro defining &#39;warning&#39; record of log.
Definition: logger.hh:236
#define END_TIMER(tag)
Ends a timer with specified tag.
arma::vec::fixed< spacedim > centre() const
Definition: accessors.hh:91
double ** conc_solid
void set_mesh(const Mesh &mesh)
Definition: field_set.hh:173
void set_components(const std::vector< string > &names)
Record type proxy class.
Definition: type_record.hh:182
static const Input::Type::Record & get_input_type()
VecScatter vconc_out_scatter
Output vector scatter.
bool is_field_output_time(const FieldCommon &field, TimeStep step) const
Base of exceptions used in Flow123d.
Definition: exceptions.hh:75
unsigned int n_substances_
Class for representation SI units of Fields.
Definition: unit_si.hh:40
EqData * data_
Pointer to equation data. The object is constructed in descendants.
static UnitSI & dimensionless()
Returns dimensionless unit.
Definition: unit_si.cc:55
static bool print_message_table(ostream &stream, std::string equation_name)
Definition: field_common.cc:91
Other possible transformation of coordinates:
Class for declaration of the input data that are in string format.
Definition: type_base.hh:588
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Definition: exceptions.hh:53
bool changed() const
Definition: field_set.cc:157
Template for classes storing finite set of named values.
Input::Type::Record make_field_descriptor_type(const std::string &equation_name) const
Definition: field_set.cc:61
TimeGovernor * time_
Definition: equation.hh:224
ElementVector element
Vector of elements of the mesh.
Definition: mesh.h:228
FieldSet input_data_set_
Input data set - fields in this set are read from the input file.
std::shared_ptr< ReactionTerm > reaction_liquid
unsigned int lsize(int proc) const
get local size
void initialize() override
Prepares the object to usage.