Flow123d  release_2.2.0-41-g0958a8d
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  ADD_FIELD(rock_density, "Rock matrix density.", "0.0");
78  rock_density.units( UnitSI().kg().m(-3) );
79 
80  ADD_FIELD(sorption_type,"Considered sorption is described by selected isotherm. If porosity on an element is equal or even higher than 1.0 (meaning no sorbing surface), then type 'none' will be selected automatically."); //
81  sorption_type.input_selection(get_sorption_type_selection());
82  sorption_type.units( UnitSI::dimensionless() );
83 
84  ADD_FIELD(distribution_coefficient,"Multiplication parameters (k, omega) in either Langmuir c_s = omega * (alpha*c_a)/(1- alpha*c_a) or in linear c_s = k * c_a isothermal description.","1.0");
85  distribution_coefficient.units( UnitSI().m(3).kg(-1) );
86 
87  ADD_FIELD(isotherm_other,"Second parameters (alpha, ...) defining isotherm c_s = omega * (alpha*c_a)/(1- alpha*c_a).","1.0");
88  isotherm_other.units( UnitSI::dimensionless() );
89 
90  ADD_FIELD(init_conc_solid, "Initial solid concentration of substances."
91  " Vector, one value for every substance.", "0");
92  init_conc_solid.units( UnitSI().mol().kg(-1) );
93 
94  input_data_set_ += *this;
95 
96  // porosity field is set from governing equation (transport) later
97  // hence we do not add it to the input_data_set_
98  *this += porosity
99  .name("porosity")
100  .units( UnitSI::dimensionless() )
101  .flags(FieldFlag::input_copy)
102  .set_limits(0.0);
103 
104  output_fields += *this;
105  output_fields += conc_solid.name(output_field_name)
106  .description(output_field_desc)
107  .units( UnitSI().dimensionless() )
109 }
110 
111 
113  : ReactionTerm(init_mesh, in_rec),
114  data_(nullptr)
115 {
116  // creating reaction from input and setting their parameters
117  make_reactions();
118 }
119 
120 
122 {
123  if (data_ != nullptr) delete data_;
124 
125  VecScatterDestroy(&(vconc_out_scatter));
126  if (vconc_solid != NULL) {
127 
128 
129  for (unsigned int sbi = 0; sbi < substances_.size(); sbi++)
130  {
131  //no mpi vectors
132  VecDestroy( &(vconc_solid[sbi]) );
133  delete [] conc_solid[sbi];
134  }
135  delete [] vconc_solid;
136  delete [] conc_solid;
137  }
138 }
139 
141 {
143 
144  reactions_it = input_record_.find<Input::AbstractRecord>("reaction_liquid");
145  if ( reactions_it )
146  {
147  // TODO: allowed instances in this case are only
148  // FirstOrderReaction, RadioactiveDecay
149  reaction_liquid = (*reactions_it).factory< ReactionTerm, Mesh &, Input::Record >(*mesh_, *reactions_it);
150  } else
151  {
152  reaction_liquid = nullptr;
153  }
154 
155  reactions_it = input_record_.find<Input::AbstractRecord>("reaction_solid");
156  if ( reactions_it )
157  {
158  // TODO: allowed instances in this case are only
159  // FirstOrderReaction, RadioactiveDecay
160  reaction_solid = (*reactions_it).factory< ReactionTerm, Mesh &, Input::Record >(*mesh_, *reactions_it);
161  } else
162  {
163  reaction_solid = nullptr;
164  }
165 }
166 
168 {
169  OLD_ASSERT(distribution_ != nullptr, "Distribution has not been set yet.\n");
170  OLD_ASSERT(time_ != nullptr, "Time governor has not been set yet.\n");
171  OLD_ASSERT(output_stream_,"Null output stream.");
173 
174  initialize_substance_ids(); //computes present substances and sets indices
175  initialize_from_input(); //reads non-field data from input
176 
177  //isotherms array resized bellow
178  unsigned int nr_of_regions = mesh_->region_db().bulk_size();
179  isotherms.resize(nr_of_regions);
180  for(unsigned int i_reg = 0; i_reg < nr_of_regions; i_reg++)
181  {
182  isotherms[i_reg].resize(n_substances_);
183  for(unsigned int i_subst = 0; i_subst < n_substances_; i_subst++)
184  {
185  isotherms[i_reg][i_subst] = Isotherm();
186  }
187  }
188 
189  //allocating new array for sorbed concentrations
190  conc_solid = new double* [substances_.size()];
191  conc_solid_out.clear();
192  conc_solid_out.resize( substances_.size() );
193  for (unsigned int sbi = 0; sbi < substances_.size(); sbi++)
194  {
195  conc_solid[sbi] = new double [distribution_->lsize()];
196  conc_solid_out[sbi].resize( distribution_->size() );
197  //zero initialization of solid concentration for all substances
198  for(unsigned int i=0; i < distribution_->lsize(); i++)
199  conc_solid[sbi][i] = 0;
200  }
201 
203 
205 
206  if(reaction_liquid)
207  {
208  reaction_liquid->substances(substances_)
209  .concentration_matrix(concentration_matrix_, distribution_, el_4_loc_, row_4_el_)
210  .set_time_governor(*time_);
211  reaction_liquid->initialize();
212  }
213  if(reaction_solid)
214  {
215  reaction_solid->substances(substances_)
216  .concentration_matrix(conc_solid, distribution_, el_4_loc_, row_4_el_)
217  .set_time_governor(*time_);
218  reaction_solid->initialize();
219  }
220 }
221 
222 
224 {
225  Input::Array substances_array = input_record_.val<Input::Array>("substances");
226  unsigned int k, global_idx, i_subst = 0;
227  bool found;
228  Input::Iterator<string> spec_iter = substances_array.begin<string>();
229 
230  for(; spec_iter != substances_array.end(); ++spec_iter, i_subst++)
231  {
232  //finding the name of a substance in the global array of names
233  found = false;
234  for(k = 0; k < substances_.size(); k++)
235  {
236  if (*spec_iter == substances_[k].name())
237  {
238  global_idx = k;
239  found = true;
240  break;
241  }
242  }
243 
244  if(!found)
245  THROW(ReactionTerm::ExcUnknownSubstance()
246  << ReactionTerm::EI_Substance(*spec_iter)
247  << substances_array.ei_address());
248 
249  //finding the global index of substance in the local array
250  found = false;
251  for(k = 0; k < substance_global_idx_.size(); k++)
252  {
253  if(substance_global_idx_[k] == global_idx)
254  {
255  found = true;
256  break;
257  }
258  }
259 
260  if(!found)
261  {
262  substance_global_idx_.push_back(global_idx);
263  }
264 
265  }
267 }
268 
270 {
271  // read number of interpolation steps - value checked by the record definition
272  n_interpolation_steps_ = input_record_.val<int>("substeps");
273 
274  // read the density of solvent - value checked by the record definition
275  solvent_density_ = input_record_.val<double>("solvent_density");
276 
277  // read the solubility vector
278  Input::Iterator<Input::Array> solub_iter = input_record_.find<Input::Array>("solubility");
279  if( solub_iter )
280  {
281  if (solub_iter->Array::size() != n_substances_)
282  {
283  THROW(SorptionBase::ExcSubstanceCountMatch()
284  << SorptionBase::EI_ArrayName("solubility")
286  // there is no way to get ei_address from 'solub_iter', only as a string
287  }
288 
289  else solub_iter->copy_to(solubility_vec_);
290  }
291  else{
292  // fill solubility_vec_ with zeros
293  solubility_vec_.clear();
294  solubility_vec_.resize(n_substances_,0.0);
295  }
296 
297  // read the interpolation table limits
298  Input::Iterator<Input::Array> interp_table_limits = input_record_.find<Input::Array>("table_limits");
299  if( interp_table_limits )
300  {
301  if (interp_table_limits->Array::size() != n_substances_)
302  {
303  THROW(SorptionBase::ExcSubstanceCountMatch()
304  << SorptionBase::EI_ArrayName("table_limits")
306  // there is no way to get ei_address from 'interp_table_limits', only as a string
307  }
308 
309  else interp_table_limits->copy_to(table_limit_);
310  }
311  else{
312  // fill table_limit_ with zeros
313  table_limit_.clear();
314  table_limit_.resize(n_substances_,0.0);
315  }
316 }
317 
319 {
320  OLD_ASSERT(n_substances_ > 0, "Number of substances is wrong, they might have not been set yet.\n");
321 
322  // create vector of substances that are involved in sorption
323  // and initialize data_ with their names
324  std::vector<std::string> substances_sorption;
325  for (unsigned int i : substance_global_idx_)
326  substances_sorption.push_back(substances_[i].name());
327  data_->set_components(substances_sorption);
328 
329  // read fields from input file
331 
332  data_->set_mesh(*mesh_);
333 
334  //initialization of output
335  //output_array = input_record_.val<Input::Array>("output_fields");
340  for (unsigned int sbi=0; sbi<substances_.size(); sbi++)
341  {
342  // create shared pointer to a FieldElementwise and push this Field to output_field on all regions
343  auto output_field_ptr = conc_solid_out[sbi].create_field<3, FieldValue<3>::Scalar>(substances_.size());
344  data_->conc_solid[sbi].set_field(mesh_->region_db().get_region_set("ALL"), output_field_ptr, 0);
345  }
346  //output_stream_->add_admissible_field_names(output_array);
348 }
349 
350 
352 {
353  OLD_ASSERT(distribution_ != nullptr, "Distribution has not been set yet.\n");
354  OLD_ASSERT(time_ != nullptr, "Time governor has not been set yet.\n");
355  OLD_ASSERT(output_stream_,"Null output stream.");
357 
359  std::stringstream ss; // print warning message with table of uninitialized fields
360  if ( FieldCommon::print_message_table(ss, "sorption") ) {
361  WarningOut() << ss.str();
362  }
364  make_tables();
365 
366  // write initial condition
367  //output_vector_gather();
368  //data_->output_fields.set_time(time_->step(), LimitSide::right);
369  //data_->output_fields.output(output_stream_);
370 
371  if(reaction_liquid) reaction_liquid->zero_time_step();
372  if(reaction_solid) reaction_solid->zero_time_step();
373 
374  output_data();
375 }
376 
378 {
379  for (unsigned int loc_el = 0; loc_el < distribution_->lsize(); loc_el++)
380  {
381  unsigned int index = el_4_loc_[loc_el];
382  ElementAccessor<3> ele_acc = mesh_->element_accessor(index);
383 
384  //setting initial solid concentration for substances involved in adsorption
385  for (unsigned int sbi = 0; sbi < n_substances_; sbi++)
386  {
387  int subst_id = substance_global_idx_[sbi];
388  conc_solid[subst_id][loc_el] = data_->init_conc_solid[sbi].value(ele_acc.centre(), ele_acc);
389  }
390  }
391 }
392 
393 
395 {
396  data_->set_time(time_->step(), LimitSide::right); // set to the last computed time
397 
398  // if parameters changed during last time step, reinit isotherms and eventualy
399  // update interpolation tables in the case of constant rock matrix parameters
400  if(data_->changed())
401  make_tables();
402 
403 
404  START_TIMER("Sorption");
405  for (unsigned int loc_el = 0; loc_el < distribution_->lsize(); loc_el++)
406  {
408  }
409  END_TIMER("Sorption");
410 
411  if(reaction_liquid) reaction_liquid->update_solution();
412  if(reaction_solid) reaction_solid->update_solution();
413 }
414 
416 {
417  try
418  {
419  ElementAccessor<3> elm;
420  BOOST_FOREACH(const Region &reg_iter, this->mesh_->region_db().get_region_set("BULK") )
421  {
422  int reg_idx = reg_iter.bulk_idx();
423 
424  if(data_->is_constant(reg_iter))
425  {
426  ElementAccessor<3> elm(this->mesh_, reg_iter); // constant element accessor
427  isotherm_reinit(isotherms[reg_idx],elm);
428  for(unsigned int i_subst = 0; i_subst < n_substances_; i_subst++)
429  {
430  isotherms[reg_idx][i_subst].make_table(n_interpolation_steps_);
431  }
432  }
433  }
434  }
435  catch(ExceptionBase const &e)
436  {
437  e << input_record_.ei_address();
438  throw;
439  }
440 }
441 
442 double **SorptionBase::compute_reaction(double **concentrations, int loc_el)
443 {
444  ElementFullIter elem = mesh_->element(el_4_loc_[loc_el]);
445  int reg_idx = elem->region().bulk_idx();
446  unsigned int i_subst, subst_id;
447 
448  std::vector<Isotherm> & isotherms_vec = isotherms[reg_idx];
449 
450  try{
451  // Constant value of rock density and mobile porosity over the whole region
452  // => interpolation_table is precomputed
453  if (isotherms_vec[0].is_precomputed())
454  {
455  for(i_subst = 0; i_subst < n_substances_; i_subst++)
456  {
457  subst_id = substance_global_idx_[i_subst];
458 
459  isotherms_vec[i_subst].interpolate(concentration_matrix_[subst_id][loc_el],
460  conc_solid[subst_id][loc_el]);
461  }
462  }
463  else
464  {
465  isotherm_reinit(isotherms_vec, elem->element_accessor());
466 
467  for(i_subst = 0; i_subst < n_substances_; i_subst++)
468  {
469  subst_id = substance_global_idx_[i_subst];
470  isotherms_vec[i_subst].compute(concentration_matrix_[subst_id][loc_el],
471  conc_solid[subst_id][loc_el]);
472  }
473  }
474  }
475  catch(ExceptionBase const &e)
476  {
477  e << input_record_.ei_address();
478  throw;
479  }
480 
481  return concentrations;
482 }
483 
484 
485 /**************************************** OUTPUT ***************************************************/
486 
488 {
489  int sbi, n_subst;
490  n_subst = substances_.size();
491 
492  vconc_solid = new Vec [n_subst];
493 
494  for (sbi = 0; sbi < n_subst; sbi++) {
495  VecCreateMPIWithArray(PETSC_COMM_WORLD,1, distribution_->lsize(), mesh_->n_elements(), conc_solid[sbi],
496  &vconc_solid[sbi]);
497  VecZeroEntries(vconc_solid[sbi]);
498 
499  VecZeroEntries(conc_solid_out[sbi].get_data_petsc());
500  }
501 
502  // creating output vector scatter
503  IS is;
504  ISCreateGeneral(PETSC_COMM_SELF, mesh_->n_elements(), row_4_el_, PETSC_COPY_VALUES, &is); //WithArray
505  VecScatterCreate(vconc_solid[0], is, conc_solid_out[0].get_data_petsc(), PETSC_NULL, &vconc_out_scatter);
506  ISDestroy(&(is));
507 }
508 
509 
511 {
512  unsigned int sbi;
513 
514  for (sbi = 0; sbi < substances_.size(); sbi++) {
515  VecScatterBegin(vconc_out_scatter, vconc_solid[sbi], conc_solid_out[sbi].get_data_petsc(), INSERT_VALUES, SCATTER_FORWARD);
516  VecScatterEnd(vconc_out_scatter, vconc_solid[sbi], conc_solid_out[sbi].get_data_petsc(), INSERT_VALUES, SCATTER_FORWARD);
517  }
518 }
519 
520 
522 {
526  }
527 
528  // Register fresh output data
529  data_->output_fields.output(time().step());
530 }
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()
#define ADD_FIELD(name,...)
Definition: field_set.hh:269
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.