Flow123d  JS_before_hm-2196-g9bdbf60c0
hm_iterative.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 hm_iterative.cc
15  * @brief
16  * @author Jan Stebel
17  */
18 
19 #include "hm_iterative.hh"
20 #include "system/sys_profiler.hh"
21 #include "input/input_type.hh"
22 #include "flow/richards_lmh.hh"
23 #include "fields/field_fe.hh" // for create_field_fe()
24 
25 
26 FLOW123D_FORCE_LINK_IN_CHILD(coupling_iterative)
27 
28 
29 namespace it = Input::Type;
30 
31 
33  return it::Record("Coupling_Iterative",
34  "Record with data for iterative coupling of flow and mechanics.\n")
38  .declare_key("flow_equation", RichardsLMH::get_input_type(),
40  "Flow equation, provides the velocity field as a result.")
41  .declare_key("mechanics_equation", Elasticity::get_input_type(),
42  "Mechanics, provides the displacement field.")
43  .declare_key("input_fields", it::Array(
45  .make_field_descriptor_type("Coupling_Iterative")),
47  "Input fields of the HM coupling.")
48  .declare_key( "iteration_parameter", it::Double(), it::Default("1"),
49  "Tuning parameter for iterative splitting. Its default value "
50  "corresponds to a theoretically optimal value with fastest convergence." )
51  .declare_key( "max_it", it::Integer(0), it::Default("100"),
52  "Maximal count of HM iterations." )
53  .declare_key( "min_it", it::Integer(0), it::Default("1"),
54  "Minimal count of HM iterations." )
55  .declare_key( "a_tol", it::Double(0), it::Default("0"),
56  "Absolute tolerance for difference in HM iteration." )
57  .declare_key( "r_tol", it::Double(0), it::Default("1e-7"),
58  "Relative tolerance for difference in HM iteration." )
59  .close();
60 }
61 
62 
63 const int HM_Iterative::registrar = Input::register_class< HM_Iterative, Mesh &, const Input::Record >("Coupling_Iterative")
65 
66 
68 {
69  *this += alpha.name("biot_alpha")
70  .description("Biot poroelastic coefficient.")
71  .units(UnitSI().dimensionless())
72  .input_default("0.0")
74 
75  *this += density.name("fluid_density")
76  .description("Volumetric mass density of the fluid.")
77  .units(UnitSI().kg().m(-3))
78  .input_default("0.0")
80 
81  *this += gravity.name("gravity")
82  .description("Gravitational acceleration constant.")
83  .units(UnitSI().m().s(-2))
84  .input_default("9.81")
86 
87  *this += beta.name("relaxation_beta")
88  .description("Parameter of numerical method for iterative solution of hydro-mechanical coupling.")
89  .units(UnitSI().dimensionless())
91 
92  *this += pressure_potential.name("pressure_potential")
93  .description("Coupling term entering the mechanics equation.")
94  .units(UnitSI().m())
96 
97  *this += ref_pressure_potential.name("ref_pressure_potential")
98  .description("Pressure potential on boundary (taking into account the flow boundary condition.")
99  .units(UnitSI().m())
101 
102  *this += flow_source.name("extra_flow_source")
103  .description("Coupling term entering the flow equation.")
104  .units(UnitSI().s(-1))
106 }
107 
108 
110 {
111  // initialize coupling fields with FieldFE
112  set_mesh(mesh);
113 
114  potential_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(mesh, MixedPtr<FE_CR>());
115  pressure_potential.set(potential_ptr_, 0.0);
116 
117  ref_potential_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(mesh, MixedPtr<FE_CR>());
118  ref_pressure_potential.set(ref_potential_ptr_, 0.0);
119 
120  beta_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(mesh, MixedPtr<FE_P_disc>(0));
121  beta.set(beta_ptr_, 0.0);
122 
123  flow_source_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(beta_ptr_->get_dofhandler());
124  flow_source.set(flow_source_ptr_, 0.0);
125 
126  old_pressure_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(beta_ptr_->get_dofhandler());
127  old_iter_pressure_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(beta_ptr_->get_dofhandler());
128  div_u_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(beta_ptr_->get_dofhandler());
129  old_div_u_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(beta_ptr_->get_dofhandler());
130 }
131 
132 
133 
135 : DarcyFlowInterface(mesh, in_record),
136  IterativeCoupling(in_record)
137 {
138  START_TIMER("HM constructor");
139  using namespace Input;
140 
141  time_ = new TimeGovernor(in_record.val<Record>("time"));
142  ASSERT( time_->is_default() == false ).error("Missing key 'time' in Coupling_Iterative.");
143 
144  // setup flow equation
145  Record flow_rec = in_record.val<Record>("flow_equation");
146  // Need explicit template types here, since reference is used (automatically passing by value)
147  flow_ = std::make_shared<RichardsLMH>(*mesh_, flow_rec, time_);
148 
149  // setup mechanics
150  Record mech_rec = in_record.val<Record>("mechanics_equation");
151  mechanics_ = std::make_shared<Elasticity>(*mesh_, mech_rec, this->time_);
152  mechanics_->initialize();
153 
154  // setup coupling fields and finish initialization of flow
155  mechanics_->eq_fields()["cross_section"].copy_from(flow_->eq_fields()["cross_section"]);
156  // flow_->eq_fields()["cross_section_updated"].copy_from(mechanics_->eq_fields()["cross_section_updated"]);
157  // flow_->eq_fields()["stress"].copy_from(mechanics_->eq_fields()["stress"]);
158  // flow_->eq_fields()["von_mises_stress"].copy_from(mechanics_->eq_fields()["von_mises_stress"]);
159 
160  flow_->eq_fields() += mechanics_->eq_fields()["cross_section_updated"];
161  // cross_section_updated.name("cross_section_updated")
162  // .description("Cross-section after deformation.")
163  // .units( UnitSI().m() )
164  // .flags(input_copy);
165 
166  flow_->eq_fields() += mechanics_->eq_fields()["stress"];
167  // stress
168  // .name("stress")
169  // .description("Stress tensor.")
170  // .units( UnitSI().Pa() )
171  // .flags(input_copy);
172 
173  flow_->eq_fields() += mechanics_->eq_fields()["von_mises_stress"];
174  // von_mises_stress
175  // .name("von_mises_stress")
176  // .description("von Mises stress output.")
177  // .units( UnitSI().Pa() )
178  // .flags(input_copy);
179  flow_->initialize();
180  std::stringstream ss; // print warning message with table of uninitialized fields
181  if ( FieldCommon::print_message_table(ss, "flow") )
182  WarningOut() << ss.str();
183 
184  // read parameters controlling the iteration
185  beta_ = in_record.val<double>("iteration_parameter");
186 
187  this->eq_fieldset_ = &data_;
188 
189  // setup input fields
190  data_.set_input_list( in_record.val<Input::Array>("input_fields"), time() );
191 
194 }
195 
196 
198 {
199 }
200 
201 
202 template<int dim, class Value>
203 void copy_field(const FieldCommon &from_field_common, FieldFE<dim, Value> &to_field)
204 {
205  auto dh = to_field.get_dofhandler();
206  auto vec = to_field.vec();
207  Field<dim,Value> from_field;
208  from_field.copy_from(from_field_common);
209 
210  for ( auto cell : dh->own_range() )
211  vec.set( cell.local_idx(), from_field.value(cell.elm().centre(), cell.elm()) );
212 }
213 
214 
215 
217 {
219  std::stringstream ss;
220  if ( FieldCommon::print_message_table(ss, "coupling_iterative") )
221  WarningOut() << ss.str();
222 
223  mechanics_->update_output_fields(); // init field values for use in flow
224  flow_->zero_time_step();
226  mechanics_->zero_time_step();
227 
228  copy_field(*flow_->eq_fields().field("pressure_p0"), *data_.old_pressure_ptr_);
229  copy_field(*flow_->eq_fields().field("pressure_p0"), *data_.old_iter_pressure_ptr_);
230  copy_field(mechanics_->eq_fields().output_divergence, *data_.old_div_u_ptr_);
231  copy_field(mechanics_->eq_fields().output_divergence, *data_.div_u_ptr_);
232 }
233 
234 
236 {
237  time_->next_time();
238  time_->view("HM");
240 
241  solve_step();
242 }
243 
245 {
246  // pass displacement (divergence) to flow
247  // and solve flow problem
249  flow_->solve_time_step(false);
250 
251  // pass pressure to mechanics and solve mechanics
253  mechanics_->solve_linear_system();
254 }
255 
256 
258 {
259  mechanics_->update_output_fields();
260  copy_field(mechanics_->eq_fields().output_divergence, *data_.div_u_ptr_);
261  copy_field(*flow_->eq_fields().field("pressure_p0"), *data_.old_iter_pressure_ptr_);
262 }
263 
264 
266 {
267  flow_->accept_time_step();
268  flow_->output_data();
269  mechanics_->output_data();
270 
271  copy_field(*flow_->eq_fields().field("pressure_p0"), *data_.old_pressure_ptr_);
272  copy_field(mechanics_->eq_fields().output_divergence, *data_.old_div_u_ptr_);
273 }
274 
275 
277 {
278  auto potential_vec_ = data_.potential_ptr_->vec();
279  auto ref_potential_vec_ = data_.ref_potential_ptr_->vec();
280  auto dh = data_.potential_ptr_->get_dofhandler();
281  Field<3, FieldValue<3>::Scalar> field_edge_pressure;
282  field_edge_pressure.copy_from(*flow_->eq_fields().field("pressure_edge"));
283 
284  for ( auto ele : dh->local_range() )
285  {
286  auto elm = ele.elm();
287  LocDofVec dof_indices = ele.get_loc_dof_indices();
288  for ( auto side : ele.side_range() )
289  {
290  double alpha = data_.alpha.value(side.centre(), elm);
291  double density = data_.density.value(side.centre(), elm);
292  double gravity = data_.gravity.value(side.centre(), elm);
293  double pressure = field_edge_pressure.value(side.centre(), elm);
294  double potential = -alpha*density*gravity*pressure;
295 
296  potential_vec_.set( dof_indices[side.side_idx()], potential );
297 
298  // The reference potential is applied only on dirichlet and total_flux b.c.,
299  // i.e. where only mechanical traction is prescribed.
300  if (side.side().is_boundary() &&
301  (flow_->eq_fields().bc_type.value(side.centre(), side.cond().element_accessor()) == DarcyMH::EqFields::dirichlet ||
302  flow_->eq_fields().bc_type.value(side.centre(), side.cond().element_accessor()) == DarcyMH::EqFields::total_flux)
303  )
304  {
305  double bc_pressure = flow_->eq_fields().bc_pressure.value(side.centre(), side.cond().element_accessor());
306  ref_potential_vec_.set(dof_indices[side.side_idx()], -alpha*density*gravity*bc_pressure);
307  }
308  else
309  ref_potential_vec_.set(dof_indices[side.side_idx()], 0);
310  }
311  }
312 
313  potential_vec_.local_to_ghost_begin();
314  potential_vec_.local_to_ghost_end();
315  ref_potential_vec_.local_to_ghost_begin();
316  ref_potential_vec_.local_to_ghost_end();
320 }
321 
322 
324 {
325  auto beta_vec = data_.beta_ptr_->vec();
326  auto src_vec = data_.flow_source_ptr_->vec();
327  auto dh = data_.beta_ptr_->get_dofhandler();
328  Field<3,FieldValue<3>::Scalar> field_ele_pressure;
329  field_ele_pressure.copy_from(*flow_->eq_fields().field("pressure_p0"));
330  for ( auto ele : dh->local_range() )
331  {
332  auto elm = ele.elm();
333 
334  double alpha = data_.alpha.value(elm.centre(), elm);
335  double young = mechanics_->eq_fields().young_modulus.value(elm.centre(), elm);
336  double poisson = mechanics_->eq_fields().poisson_ratio.value(elm.centre(), elm);
337  double beta = beta_*0.5*alpha*alpha/(2*lame_mu(young, poisson)/elm.dim() + lame_lambda(young, poisson));
338 
339  double old_p = data_.old_pressure_ptr_->value(elm.centre(), elm);
340  double p = field_ele_pressure.value(elm.centre(), elm);
341  double div_u = data_.div_u_ptr_->value(elm.centre(), elm);
342  double old_div_u = data_.old_div_u_ptr_->value(elm.centre(), elm);
343  double src = (beta*(p-old_p) + alpha*(old_div_u - div_u)) / time_->dt();
344 
345  beta_vec.set(ele.local_idx(), beta);
346  src_vec.set(ele.local_idx(), src);
347  }
348 
349  beta_vec.local_to_ghost_begin();
350  src_vec.local_to_ghost_begin();
351  beta_vec.local_to_ghost_end();
352  src_vec.local_to_ghost_end();
355  flow_->set_extra_storativity(data_.beta);
356  flow_->set_extra_source(data_.flow_source);
357 }
358 
359 
360 void HM_Iterative::compute_iteration_error(double& abs_error, double& rel_error)
361 {
362  auto dh = data_.beta_ptr_->get_dofhandler();
363  double p_dif2 = 0, p_norm2 = 0;
364  Field<3,FieldValue<3>::Scalar> field_ele_pressure;
365  field_ele_pressure.copy_from(*flow_->eq_fields().field("pressure_p0"));
366  for (auto cell : dh->own_range())
367  {
368  auto elm = cell.elm();
369  double new_p = field_ele_pressure.value(elm.centre(), elm);
370  double old_p = data_.old_iter_pressure_ptr_->value(elm.centre(), elm);
371  p_dif2 += pow(new_p - old_p, 2)*elm.measure();
372  p_norm2 += pow(old_p, 2)*elm.measure();
373  }
374 
375  double send_data[] = { p_dif2, p_norm2 };
376  double recv_data[2];
377  MPI_Allreduce(&send_data, &recv_data, 2, MPI_DOUBLE, MPI_SUM, PETSC_COMM_WORLD);
378  abs_error = sqrt(recv_data[0]);
379  rel_error = abs_error / (sqrt(recv_data[1]) + std::numeric_limits<double>::min());
380 
381  MessageOut().fmt("HM Iteration {} abs. difference: {} rel. difference: {}\n"
382  "--------------------------------------------------------",
383  iteration(), abs_error, rel_error);
384 
385  if(iteration() >= max_it_ && (abs_error > a_tol_ || rel_error > r_tol_))
386  MessageOut().fmt("HM solver did not converge in {} iterations.\n", iteration());
387 }
388 
389 
390 
392  flow_.reset();
393  mechanics_.reset();
394 }
395 
396 
397 
FieldCommon::units
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
Definition: field_common.hh:152
LimitSide::right
@ right
HM_Iterative::get_input_type
static const Input::Type::Record & get_input_type()
Define input record.
Definition: hm_iterative.cc:32
HM_Iterative::EqData::old_iter_pressure_ptr_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > old_iter_pressure_ptr_
Definition: hm_iterative.hh:151
FieldFlag::in_rhs
static constexpr Mask in_rhs
A field is part of the right hand side of the equation.
Definition: field_flag.hh:51
LocDofVec
arma::Col< IntIdx > LocDofVec
Definition: index_types.hh:28
IterativeCoupling::solve_step
void solve_step()
Definition: hm_iterative.hh:64
EquationBase::mesh_
Mesh * mesh_
Definition: equation.hh:220
HM_Iterative::EqData::beta_ptr_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > beta_ptr_
Definition: hm_iterative.hh:148
HM_Iterative::EqData::old_div_u_ptr_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > old_div_u_ptr_
Definition: hm_iterative.hh:153
IterativeCoupling::iteration
unsigned int iteration()
Definition: hm_iterative.hh:80
Armor::vec
ArmaVec< double, N > vec
Definition: armor.hh:885
TimeGovernor::dt
double dt() const
Definition: time_governor.hh:565
FieldSet::set_time
bool set_time(const TimeStep &time, LimitSide limit_side)
Definition: field_set.cc:245
Input
Abstract linear system class.
Definition: balance.hh:40
HM_Iterative::flow_
std::shared_ptr< RichardsLMH > flow_
steady or unsteady water flow simulator based on MH scheme
Definition: hm_iterative.hh:182
ASSERT
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
Definition: asserts.hh:347
EquationBase::time_
TimeGovernor * time_
Definition: equation.hh:221
Input::Type::Integer
Class for declaration of the integral input data.
Definition: type_base.hh:483
IterativeCoupling
Definition: hm_iterative.hh:38
Input::Record::val
const Ret val(const string &key) const
Definition: accessors_impl.hh:31
richards_lmh.hh
EquationBase::time
TimeGovernor & time()
Definition: equation.hh:149
FieldSet::set_input_list
void set_input_list(Input::Array input_list, const TimeGovernor &tg)
Definition: field_set.hh:289
HM_Iterative::registrar
static const int registrar
Definition: hm_iterative.hh:179
Input::Type::Double
Class for declaration of the input data that are floating point numbers.
Definition: type_base.hh:534
FLOW123D_FORCE_LINK_IN_CHILD
#define FLOW123D_FORCE_LINK_IN_CHILD(x)
Definition: global_defs.h:157
MPI_DOUBLE
#define MPI_DOUBLE
Definition: mpi.h:156
HM_Iterative::zero_time_step
void zero_time_step() override
Definition: hm_iterative.cc:216
HM_Iterative::EqData::ref_pressure_potential
Field< 3, FieldValue< 3 >::Scalar > ref_pressure_potential
Potential of reference (prescribed) pressure from flow b.c. TODO: Swith to BCField when possible.
Definition: hm_iterative.hh:142
HM_Iterative::EqData
Definition: hm_iterative.hh:128
FieldCommon::flags
FieldCommon & flags(FieldFlag::Flags::Mask mask)
Definition: field_common.hh:191
HM_Iterative::mechanics_
std::shared_ptr< Elasticity > mechanics_
solute transport with chemistry through operator splitting
Definition: hm_iterative.hh:185
field_fe.hh
FieldCommon::set_time_result_changed
void set_time_result_changed()
Manually mark flag that the field has been changed.
Definition: field_common.hh:734
copy_field
void copy_field(const FieldCommon &from_field_common, FieldFE< dim, Value > &to_field)
Definition: hm_iterative.cc:203
HM_Iterative::EqData::pressure_potential
Field< 3, FieldValue< 3 >::Scalar > pressure_potential
Potential -alpha*pressure whose gradient is passed to mechanics as additional load.
Definition: hm_iterative.hh:141
FieldFlag::equation_external_output
static constexpr Mask equation_external_output
Match an output field, that can be also copy of other field.
Definition: field_flag.hh:58
HM_Iterative::EqData::flow_source_ptr_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > flow_source_ptr_
Definition: hm_iterative.hh:149
HM_Iterative::EqData::initialize
void initialize(Mesh &mesh)
Definition: hm_iterative.cc:109
HM_Iterative::update_after_converged
void update_after_converged() override
Save data after iterations have finished.
Definition: hm_iterative.cc:265
FieldCommon::flags_add
FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
Definition: field_common.hh:197
HM_Iterative::EqData::div_u_ptr_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > div_u_ptr_
Definition: hm_iterative.hh:152
FieldFE::get_dofhandler
std::shared_ptr< DOFHandlerMultiDim > get_dofhandler() const
Definition: field_fe.hh:177
IterativeCoupling::a_tol_
double a_tol_
Absolute tolerance for difference between two succeeding iterations.
Definition: hm_iterative.hh:105
Input::Type::Record::size
unsigned int size() const
Returns number of keys in the Record.
Definition: type_record.hh:602
EquationBase::mesh
Mesh & mesh()
Definition: equation.hh:179
Input::Type::Default
Class Input::Type::Default specifies default value of keys of a Input::Type::Record.
Definition: type_record.hh:61
Input::Type::Record::derive_from
virtual Record & derive_from(Abstract &parent)
Method to derive new Record from an AbstractRecord parent.
Definition: type_record.cc:196
hm_iterative.hh
HM_Iterative::HM_Iterative
HM_Iterative(Mesh &mesh, Input::Record in_record)
Definition: hm_iterative.cc:134
HM_Iterative::EqData::old_pressure_ptr_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > old_pressure_ptr_
Definition: hm_iterative.hh:150
Input::Record
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
FieldFlag::equation_result
static constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
Definition: field_flag.hh:55
IterativeCoupling::record_template
static const Input::Type::Record & record_template()
Definition: hm_iterative.hh:41
sys_profiler.hh
HM_Iterative::EqData::potential_ptr_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > potential_ptr_
FieldFE for pressure_potential field.
Definition: hm_iterative.hh:146
RichardsLMH::get_input_type
static const Input::Type::Record & get_input_type()
Definition: richards_lmh.cc:82
TimeGovernor
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Definition: time_governor.hh:317
HM_Iterative::update_potential
void update_potential()
Definition: hm_iterative.cc:276
TimeGovernor::step
const TimeStep & step(int index=-1) const
Definition: time_governor.cc:756
FieldFE::vec
VectorMPI & vec()
Definition: field_fe.hh:181
Input::Type::Default::obligatory
static Default obligatory()
The factory function to make an empty default value which is obligatory.
Definition: type_record.hh:110
HM_Iterative::compute_iteration_error
void compute_iteration_error(double &abs_error, double &rel_error) override
Compute absolute and relative error in the solution.
Definition: hm_iterative.cc:360
FieldCommon
Common abstract parent of all Field<...> classes.
Definition: field_common.hh:76
FieldCommon::print_message_table
static bool print_message_table(ostream &stream, std::string equation_name)
Definition: field_common.cc:96
UnitSI
Class for representation SI units of Fields.
Definition: unit_si.hh:40
HM_Iterative::EqData::ref_potential_ptr_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > ref_potential_ptr_
Definition: hm_iterative.hh:147
Input::Type::Record::declare_key
Record & declare_key(const string &key, std::shared_ptr< TypeBase > type, const Default &default_value, const string &description, TypeBase::attribute_map key_attributes=TypeBase::attribute_map())
Declares a new key of the Record.
Definition: type_record.cc:503
HM_Iterative::update_flow_fields
void update_flow_fields()
Definition: hm_iterative.cc:323
DarcyFlowInterface::get_input_type
static Input::Type::Abstract & get_input_type()
Definition: darcy_flow_interface.hh:23
HM_Iterative::update_solution
void update_solution() override
Definition: hm_iterative.cc:235
TimeGovernor::view
void view(const char *name="") const
Definition: time_governor.cc:772
Input::Type::Record::close
Record & close() const
Close the Record for further declarations of keys.
Definition: type_record.cc:304
Input::Type
Definition: balance.hh:41
HM_Iterative::beta_
double beta_
Tuning parameter for iterative splitting.
Definition: hm_iterative.hh:190
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
MPI_SUM
#define MPI_SUM
Definition: mpi.h:196
Field::value
virtual const Value::return_type & value(const Point &p, const ElementAccessor< spacedim > &elm) const
Definition: field.hh:449
HM_Iterative::initialize
void initialize() override
Definition: hm_iterative.cc:197
FieldCommon::input_default
FieldCommon & input_default(const string &input_default)
Definition: field_common.hh:139
input_type.hh
FieldFE
Definition: field.hh:61
Mesh
Definition: mesh.h:355
DarcyMH::EqFields::total_flux
@ total_flux
Definition: darcy_flow_mh.hh:152
HM_Iterative::~HM_Iterative
~HM_Iterative()
Definition: hm_iterative.cc:391
HM_Iterative::EqData::alpha
Field< 3, FieldValue< 3 >::Scalar > alpha
Biot coefficient.
Definition: hm_iterative.hh:135
IterativeCoupling::r_tol_
double r_tol_
Relative tolerance for difference between two succeeding iterations.
Definition: hm_iterative.hh:108
Input::Type::Record::copy_keys
Record & copy_keys(const Record &other)
Copy keys from other record.
Definition: type_record.cc:216
Input::Type::Array
Class for declaration of inputs sequences.
Definition: type_base.hh:339
MPI_Allreduce
#define MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm)
Definition: mpi.h:612
HM_Iterative::EqData::gravity
Field< 3, FieldValue< 3 >::Scalar > gravity
Standard gravity.
Definition: hm_iterative.hh:137
Input::Array
Accessor to input data conforming to declared Array.
Definition: accessors.hh:566
WarningOut
#define WarningOut()
Macro defining 'warning' record of log.
Definition: logger.hh:278
lame_mu
double lame_mu(double young, double poisson)
Definition: elasticity.cc:77
EquationBase::record_template
static Input::Type::Record & record_template()
Template Record with common keys for derived equations.
Definition: equation.cc:35
HM_Iterative::EqData::flow_source
Field< 3, FieldValue< 3 >::Scalar > flow_source
Definition: hm_iterative.hh:143
MixedPtr
Definition: mixed.hh:247
HM_Iterative::EqData::beta
Field< 3, FieldValue< 3 >::Scalar > beta
Definition: hm_iterative.hh:138
TimeGovernor::is_default
bool is_default()
Definition: time_governor.hh:388
HM_Iterative::data_
EqData data_
Definition: hm_iterative.hh:187
EquationBase::eq_fieldset_
FieldSet * eq_fieldset_
Definition: equation.hh:229
HM_Iterative::update_after_iteration
void update_after_iteration() override
Save data (e.g. solution fields) for the next iteration.
Definition: hm_iterative.cc:257
HM_Iterative::EqData::EqData
EqData()
Definition: hm_iterative.cc:67
Elasticity::get_input_type
static const Input::Type::Record & get_input_type()
Declare input record type for the equation TransportDG.
Definition: elasticity.cc:47
HM_Iterative::solve_iteration
void solve_iteration() override
Solve equations and update data (fields).
Definition: hm_iterative.cc:244
lame_lambda
double lame_lambda(double young, double poisson)
Definition: elasticity.cc:83
FieldCommon::description
FieldCommon & description(const string &description)
Definition: field_common.hh:127
Field
Class template representing a field with values dependent on: point, element, and region.
Definition: field.hh:93
DarcyMH::EqFields::dirichlet
@ dirichlet
Definition: darcy_flow_mh.hh:151
HM_Iterative::EqData::density
Field< 3, FieldValue< 3 >::Scalar > density
Density of fluid.
Definition: hm_iterative.hh:136
TimeGovernor::next_time
void next_time()
Proceed to the next time according to current estimated time step.
Definition: time_governor.cc:670
IterativeCoupling::max_it_
unsigned int max_it_
Maximal number of iterations.
Definition: hm_iterative.hh:102
Field::copy_from
void copy_from(const FieldCommon &other) override
Definition: field.impl.hh:367
START_TIMER
#define START_TIMER(tag)
Starts a timer with specified tag.
Definition: sys_profiler.hh:115
DarcyFlowInterface
Definition: darcy_flow_interface.hh:15
FieldCommon::name
FieldCommon & name(const string &name)
Definition: field_common.hh:120
MessageOut
#define MessageOut()
Macro defining 'message' record of log.
Definition: logger.hh:275