Flow123d  JB_transport-9331eee
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/darcy_flow_lmh.hh"
23 #include "fields/field_fe.hh" // for create_field_fe()
24 #include "fields/field_model.hh" // for Model
25 #include "assembly_hm.hh"
26 
27 
28 FLOW123D_FORCE_LINK_IN_CHILD(coupling_iterative)
29 
30 
31 namespace it = Input::Type;
32 
33 
35  inline double operator() (double alpha, double density, double gravity, double pressure)
36  {
37  return -alpha*density*gravity*pressure;
38  }
39 };
40 
41 
43 
44  fn_hm_coupling_beta(double beta_f) : beta_factor(beta_f) {}
45 
46 
47  inline double operator() (double alpha, double lame_mu, double lame_lambda, double density, double gravity)
48  {
49  return beta_factor*0.5*alpha*alpha/(2*lame_mu/3 + lame_lambda)*density*gravity;
50  }
51 
52 private:
53 
54  const double beta_factor; ///< User-defined factor for iteration parameter.
55 
56 };
57 
58 
60 
61  fn_fluid_source(const TimeGovernor *time) : time_(time) {}
62 
63  inline double operator() (double alpha, double beta, double pressure, double old_pressure, double div_u, double old_div_u)
64  {
65  return (beta*(pressure-old_pressure) + alpha*(old_div_u - div_u)) / time_->dt();
66  }
67 
68 private:
69 
71 };
72 
73 
75  std::string equation_name = "Coupling_Iterative";
76  return it::Record(equation_name,
77  "Record with data for iterative coupling of flow and mechanics.\n")
82  .declare_key("flow_equation", DarcyLMH::get_input_type(),
84  "Flow equation, provides the velocity field as a result.")
85  .declare_key("mechanics_equation", Elasticity::get_input_type(),
87  "Mechanics, provides the displacement field.")
88  .declare_key("input_fields", it::Array(
90  .make_field_descriptor_type(equation_name)),
92  "Input fields of the HM coupling.")
93  .declare_key( "iteration_parameter", it::Double(), it::Default("1"),
94  "Tuning parameter for iterative splitting. Its default value "
95  "corresponds to a theoretically optimal value with fastest convergence." )
96  .declare_key( "max_it", it::Integer(0), it::Default("100"),
97  "Maximal count of HM iterations." )
98  .declare_key( "min_it", it::Integer(0), it::Default("1"),
99  "Minimal count of HM iterations." )
100  .declare_key( "a_tol", it::Double(0), it::Default("0"),
101  "Absolute tolerance for difference in HM iteration." )
102  .declare_key( "r_tol", it::Double(0), it::Default("1e-7"),
103  "Relative tolerance for difference in HM iteration." )
104  .close();
105 }
106 
107 
108 const int HM_Iterative::registrar = Input::register_class< HM_Iterative, Mesh &, const Input::Record >("Coupling_Iterative")
110 
111 
113 {
114  *this += alpha.name("biot_alpha")
115  .description("Biot poroelastic coefficient.")
116  .units(UnitSI().dimensionless())
117  .input_default("0.0")
119 
120  *this += density.name("fluid_density")
121  .description("Volumetric mass density of the fluid.")
122  .units(UnitSI().kg().m(-3))
123  .input_default("0.0")
125 
126  *this += gravity.name("gravity")
127  .description("Gravitational acceleration constant.")
128  .units(UnitSI().m().s(-2))
129  .input_default("9.81")
131 
132  *this += beta.name("relaxation_beta")
133  .description("Parameter of numerical method for iterative solution of hydro-mechanical coupling.")
134  .units(UnitSI().dimensionless())
136 
137  *this += pressure_potential.name("pressure_potential")
138  .description("Coupling term entering the mechanics equation.")
139  .units(UnitSI().m())
141 
142  *this += old_pressure.name("old_pressure")
143  .description("Pressure from last computed time.")
144  .units(UnitSI().m())
146 
147  *this += old_iter_pressure.name("old_iter_pressure")
148  .description("Pressure from last computed iteration.")
149  .units(UnitSI().m())
151 
152  *this += old_div_u.name("old_displacement_divergence")
153  .description("Displacement divergence from last computed time.")
154  .units(UnitSI().dimensionless())
156 
157  *this += ref_pressure_potential.name("ref_pressure_potential")
158  .description("Pressure potential on boundary (taking into account the flow boundary condition.")
159  .units(UnitSI().m())
161 
162  *this += flow_source.name("extra_flow_source")
163  .description("Coupling term entering the flow equation.")
164  .units(UnitSI().s(-1))
166 
167  this->set_default_fieldset();
168 }
169 
170 
172 {
173  // initialize coupling fields with FieldFE
174  set_mesh(mesh);
175 
176  pressure_potential.set(Model<3, FieldValue<3>::Scalar>::create(
178  alpha,
179  density,
180  gravity,
181  eq_data.flow_->eq_fields().field_edge_pressure
182  ), 0.0);
183 
184  ref_potential_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(mesh, MixedPtr<FE_CR>());
185  ref_pressure_potential.set(ref_potential_ptr_, 0.0);
186 
187  beta.set(Model<3, FieldValue<3>::Scalar>::create(
188  fn_hm_coupling_beta(beta_),
189  alpha,
190  eq_data.mechanics_->eq_fields().lame_mu,
191  eq_data.mechanics_->eq_fields().lame_lambda,
192  density,
193  gravity
194  ), 0.0);
195 
196  auto old_pressure_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(eq_data.flow_->eq_data().dh_cr_, &eq_data.flow_->eq_data().p_edge_solution_previous_time);
197  old_pressure.set(old_pressure_ptr_, 0.0);
198 
199  old_iter_pressure_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(mesh, MixedPtr<FE_P_disc>(0));
200  old_iter_pressure.set(old_iter_pressure_ptr_, 0.0);
201 
202  old_div_u_ptr_ = create_field_fe<3, FieldValue<3>::Scalar>(eq_data.mechanics_->eq_fields().output_div_ptr->get_dofhandler());
203  old_div_u.set(old_div_u_ptr_, 0.0);
204 
205  flow_source.set(Model<3, FieldValue<3>::Scalar>::create(
207  alpha,
208  beta,
209  eq_data.flow_->eq_fields().field_edge_pressure,
210  old_pressure,
211  eq_data.mechanics_->eq_fields().output_divergence,
212  old_div_u
213  ), 0.0);
214 }
215 
216 
217 
219 : DarcyFlowInterface(mesh, in_record),
220  IterativeCoupling(in_record),
221  flow_potential_assembly_(nullptr),
222  residual_assembly_(nullptr)
223 {
224  START_TIMER("HM constructor");
225  using namespace Input;
226 
227  eq_fields_ = std::make_shared<EqFields>();
228  eq_data_ = std::make_shared<EqData>();
229 
230  time_ = new TimeGovernor(in_record.val<Record>("time"));
231  ASSERT( time_->is_default() == false ).error("Missing key 'time' in Coupling_Iterative.");
232 
233  // setup flow equation
234  Record flow_rec = in_record.val<Record>("flow_equation");
235  // Need explicit template types here, since reference is used (automatically passing by value)
236  eq_data_->flow_ = std::make_shared<DarcyLMH>(*mesh_, flow_rec, time_);
237 
238  // setup mechanics
239  Record mech_rec = in_record.val<Record>("mechanics_equation");
240  eq_data_->mechanics_ = std::make_shared<Elasticity>(*mesh_, mech_rec, this->time_);
241  eq_data_->mechanics_->initialize();
242 
243  // setup coupling fields and finish initialization of flow
244  eq_data_->mechanics_->eq_fields()["cross_section"].copy_from(eq_data_->flow_->eq_fields()["cross_section"]);
245  eq_data_->flow_->eq_fields() += eq_data_->mechanics_->eq_fields()["cross_section_updated"];
246  eq_data_->flow_->eq_fields() += eq_data_->mechanics_->eq_fields()["stress"];
247  eq_data_->flow_->eq_fields() += eq_data_->mechanics_->eq_fields()["von_mises_stress"];
248  eq_data_->flow_->eq_fields() += eq_data_->mechanics_->eq_fields()["mean_stress"];
249  eq_data_->flow_->initialize();
250  std::stringstream ss; // print warning message with table of uninitialized fields
251  if ( FieldCommon::print_message_table(ss, "flow") )
252  WarningOut() << ss.str();
253 
254  *eq_fields_ += *eq_data_->flow_->eq_fields().field("pressure_edge");
255 
256  this->eq_fieldset_ = eq_fields_;
257 
258  // setup input fields
259  eq_fields_->set_input_list( in_record.val<Input::Array>("input_fields"), time() );
260 
261  eq_fields_->initialize(*mesh_, *eq_data_, time_, input_record_.val<double>("iteration_parameter"));
262  eq_data_->mechanics_->set_potential_load(eq_fields_->pressure_potential, eq_fields_->ref_pressure_potential);
263 
264  eq_fields_->add_coords_field();
265 }
266 
267 
269 {
272 
273  Input::Array user_fields_arr;
274  if (input_record_.opt_val("user_fields", user_fields_arr)) {
275  FieldSet sham_eq_output; // only for correct call of init_user_fields method
276  this->init_user_fields(user_fields_arr, sham_eq_output);
277  }
278 }
279 
280 
281 template<int dim, class Value>
282 void copy_field(const FieldCommon &from_field_common, FieldFE<dim, Value> &to_field)
283 {
284  auto dh = to_field.get_dofhandler();
285  auto vec = to_field.vec();
286  Field<dim,Value> from_field;
287  from_field.copy_from(from_field_common);
288 
289  for ( auto cell : dh->own_range() )
290  vec.set( cell.local_idx(), from_field.value(cell.elm().centre(), cell.elm()) );
291 }
292 
293 
294 
296 {
297  eq_fields_->set_time(time_->step(), LimitSide::right);
298  std::stringstream ss;
299  if ( FieldCommon::print_message_table(ss, "coupling_iterative") )
300  WarningOut() << ss.str();
301 
302  eq_data_->mechanics_->update_output_fields(); // init field values for use in flow
303  eq_data_->flow_->zero_time_step();
305  eq_data_->mechanics_->zero_time_step();
306 
307  copy_field(*eq_data_->flow_->eq_fields().field("pressure_p0"), *eq_fields_->old_iter_pressure_ptr_);
308  copy_field(eq_data_->mechanics_->eq_fields().output_divergence, *eq_fields_->old_div_u_ptr_);
309  eq_fields_->old_iter_pressure.set_time_result_changed();
310 }
311 
312 
314 {
315  time_->next_time();
316  time_->view("HM");
317  eq_fields_->set_time(time_->step(), LimitSide::right);
318 
319  solve_step();
320 }
321 
323 {
324  // pass displacement (divergence) to flow
325  // and solve flow problem
327  eq_data_->flow_->solve_time_step(false);
328 
329  // pass pressure to mechanics and solve mechanics
331  eq_data_->mechanics_->solve_linear_system();
332 }
333 
334 
336 {
337  eq_data_->mechanics_->update_output_fields();
338  copy_field(*eq_data_->flow_->eq_fields().field("pressure_p0"), *eq_fields_->old_iter_pressure_ptr_);
339  eq_fields_->old_iter_pressure.set_time_result_changed();
340 }
341 
342 
344 {
345  eq_data_->flow_->accept_time_step();
346  eq_data_->flow_->output_data();
347  eq_data_->mechanics_->output_data();
348 
349  copy_field(eq_data_->mechanics_->eq_fields().output_divergence, *eq_fields_->old_div_u_ptr_);
350 }
351 
352 
354 {
355  auto ref_potential_vec_ = eq_fields_->ref_potential_ptr_->vec();
356  auto dh = eq_fields_->ref_potential_ptr_->get_dofhandler();
357 
358  ref_potential_vec_.zero_entries();
360 
361  ref_potential_vec_.local_to_ghost_begin();
362  ref_potential_vec_.local_to_ghost_end();
363  eq_fields_->pressure_potential.set_time_result_changed();
364  eq_fields_->ref_pressure_potential.set_time_result_changed();
365  eq_data_->mechanics_->set_potential_load(eq_fields_->pressure_potential, eq_fields_->ref_pressure_potential);
366 }
367 
368 
370 {
371  eq_fields_->beta.set_time_result_changed();
372  eq_fields_->flow_source.set_time_result_changed();
373  eq_data_->flow_->set_extra_storativity(eq_fields_->beta);
374  eq_data_->flow_->set_extra_source(eq_fields_->flow_source);
375 }
376 
377 
378 void HM_Iterative::compute_iteration_error(double& abs_error, double& rel_error)
379 {
380  auto dh = eq_fields_->old_iter_pressure_ptr_->get_dofhandler();
381  eq_data_->p_dif2 = 0;
382  eq_data_->p_norm2 = 0;
383 
385 
386  double send_data[] = { eq_data_->p_dif2, eq_data_->p_norm2 };
387  double recv_data[2];
388  MPI_Allreduce(&send_data, &recv_data, 2, MPI_DOUBLE, MPI_SUM, PETSC_COMM_WORLD);
389  abs_error = sqrt(recv_data[0]);
390  rel_error = abs_error / (sqrt(recv_data[1]) + std::numeric_limits<double>::min());
391 
392  MessageOut().fmt("HM Iteration {} abs. difference: {} rel. difference: {}\n"
393  "--------------------------------------------------------",
394  iteration(), abs_error, rel_error);
395 
396  if(iteration() >= max_it_ && (abs_error > a_tol_ || rel_error > r_tol_))
397  THROW(ExcSolverDiverge() << EI_Reason("Reached max_it."));
398 }
399 
400 
401 
403  eq_data_->flow_.reset();
404  eq_data_->mechanics_.reset();
405  if (flow_potential_assembly_ != nullptr) delete flow_potential_assembly_;
406  if (residual_assembly_ != nullptr) delete residual_assembly_;
407 }
408 
409 
410 
FieldCommon::units
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
Definition: field_common.hh:153
LimitSide::right
@ right
HM_Iterative::EqFields::alpha
Field< 3, FieldValue< 3 >::Scalar > alpha
Biot coefficient.
Definition: hm_iterative.hh:157
EquationBase::user_fields_template
static Input::Type::Record & user_fields_template(std::string equation_name)
Template Record with common key user_fields for derived equations.
Definition: equation.cc:46
HM_Iterative::get_input_type
static const Input::Type::Record & get_input_type()
Define input record.
Definition: hm_iterative.cc:74
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
IterativeCoupling::solve_step
void solve_step()
Definition: hm_iterative.hh:72
EquationBase::mesh_
Mesh * mesh_
Definition: equation.hh:240
HM_Iterative::EqFields::EqFields
EqFields()
Definition: hm_iterative.cc:112
IterativeCoupling::iteration
unsigned int iteration()
Definition: hm_iterative.hh:88
HM_Iterative::EqFields::beta
Field< 3, FieldValue< 3 >::Scalar > beta
Definition: hm_iterative.hh:160
fn_pressure_potential::operator()
double operator()(double alpha, double density, double gravity, double pressure)
Definition: hm_iterative.cc:35
Armor::vec
ArmaVec< double, N > vec
Definition: armor.hh:885
TimeGovernor::dt
double dt() const
Definition: time_governor.hh:565
HM_Iterative::EqFields::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:163
fn_pressure_potential
Definition: hm_iterative.cc:34
fn_hm_coupling_beta::beta_factor
const double beta_factor
User-defined factor for iteration parameter.
Definition: hm_iterative.cc:54
HM_Iterative::EqFields::density
Field< 3, FieldValue< 3 >::Scalar > density
Density of fluid.
Definition: hm_iterative.hh:158
EquationBase::eq_fieldset_
std::shared_ptr< FieldSet > eq_fieldset_
Definition: equation.hh:249
Input
Abstract linear system class.
Definition: balance.hh:40
HM_Iterative::EqFields::flow_source
Field< 3, FieldValue< 3 >::Scalar > flow_source
Definition: hm_iterative.hh:165
ASSERT
#define ASSERT(expr)
Definition: asserts.hh:351
EquationBase::time_
TimeGovernor * time_
Definition: equation.hh:241
Input::Type::Integer
Class for declaration of the integral input data.
Definition: type_base.hh:483
IterativeCoupling
Definition: hm_iterative.hh:42
Input::Record::val
const Ret val(const string &key) const
Definition: accessors_impl.hh:31
HM_Iterative::EqFields::old_iter_pressure
Field< 3, FieldValue< 3 >::Scalar > old_iter_pressure
Definition: hm_iterative.hh:167
EquationBase::time
TimeGovernor & time()
Definition: equation.hh:151
HM_Iterative::registrar
static const int registrar
Definition: hm_iterative.hh:199
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:104
MPI_DOUBLE
#define MPI_DOUBLE
Definition: mpi.h:156
HM_Iterative::zero_time_step
void zero_time_step() override
Definition: hm_iterative.cc:295
THROW
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Definition: exceptions.hh:53
HM_Iterative::EqFields
Definition: hm_iterative.hh:150
HM_Iterative::EqData
Definition: hm_iterative.hh:136
FieldCommon::flags
FieldCommon & flags(FieldFlag::Flags::Mask mask)
Definition: field_common.hh:192
HM_Iterative::EqFields::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:164
fn_fluid_source::operator()
double operator()(double alpha, double beta, double pressure, double old_pressure, double div_u, double old_div_u)
Definition: hm_iterative.cc:63
field_fe.hh
DarcyLMH::get_input_type
static const Input::Type::Record & get_input_type()
Definition: darcy_flow_lmh.cc:104
darcy_flow_lmh.hh
Lumped mixed-hybrid model of linear Darcy flow, possibly unsteady.
EquationBase::init_user_fields
void init_user_fields(Input::Array user_fields, FieldSet &output_fields)
Definition: equation.cc:84
copy_field
void copy_field(const FieldCommon &from_field_common, FieldFE< dim, Value > &to_field)
Definition: hm_iterative.cc:282
fn_hm_coupling_beta
Definition: hm_iterative.cc:42
GenericAssembly::assemble
void assemble(std::shared_ptr< DOFHandlerMultiDim > dh) override
General assemble methods.
Definition: generic_assembly.hh:209
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::EqFields::gravity
Field< 3, FieldValue< 3 >::Scalar > gravity
Standard gravity.
Definition: hm_iterative.hh:159
HM_Iterative::update_after_converged
void update_after_converged() override
Save data after iterations have finished.
Definition: hm_iterative.cc:343
FieldCommon::flags_add
FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
Definition: field_common.hh:198
HM_Iterative::EqFields::initialize
void initialize(Mesh &mesh, HM_Iterative::EqData &eq_data, const TimeGovernor *time_, double beta_)
Definition: hm_iterative.cc:171
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:113
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:181
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
fn_fluid_source::time_
const TimeGovernor * time_
Definition: hm_iterative.cc:70
FieldSet::set_default_fieldset
void set_default_fieldset()
Definition: field_set.hh:396
HM_Iterative::HM_Iterative
HM_Iterative(Mesh &mesh, Input::Record in_record)
Definition: hm_iterative.cc:218
HM_Iterative::flow_potential_assembly_
GenericAssembly< FlowPotentialAssemblyHM > * flow_potential_assembly_
Definition: hm_iterative.hh:201
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:49
sys_profiler.hh
field_model.hh
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:353
TimeGovernor::step
const TimeStep & step(int index=-1) const
Definition: time_governor.cc:756
fn_fluid_source::fn_fluid_source
fn_fluid_source(const TimeGovernor *time)
Definition: hm_iterative.cc:61
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:378
FieldCommon
Common abstract parent of all Field<...> classes.
Definition: field_common.hh:77
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
assembly_hm.hh
EquationBase::input_record_
Input::Record input_record_
Definition: equation.hh:242
Input::Record::opt_val
bool opt_val(const string &key, Ret &value) const
Definition: accessors_impl.hh:107
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::EqFields::old_pressure
Field< 3, FieldValue< 3 >::Scalar > old_pressure
Definition: hm_iterative.hh:166
FieldSet
Container for various descendants of FieldCommonBase.
Definition: field_set.hh:159
HM_Iterative::update_flow_fields
void update_flow_fields()
Definition: hm_iterative.cc:369
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:313
TimeGovernor::view
void view(const char *name="") const
Definition: time_governor.cc:772
HM_Iterative::residual_assembly_
GenericAssembly< ResidualAssemblyHM > * residual_assembly_
Definition: hm_iterative.hh:202
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
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:446
HM_Iterative::initialize
void initialize() override
Definition: hm_iterative.cc:268
FieldCommon::input_default
FieldCommon & input_default(const string &input_default)
Definition: field_common.hh:140
input_type.hh
FieldFE
Definition: field.hh:60
HM_Iterative::EqData::flow_
std::shared_ptr< DarcyLMH > flow_
steady or unsteady water flow simulator based on MH scheme
Definition: hm_iterative.hh:140
Mesh
Definition: mesh.h:362
HM_Iterative::~HM_Iterative
~HM_Iterative()
Definition: hm_iterative.cc:402
fn_hm_coupling_beta::operator()
double operator()(double alpha, double lame_mu, double lame_lambda, double density, double gravity)
Definition: hm_iterative.cc:47
HM_Iterative::eq_data_
std::shared_ptr< EqData > eq_data_
Definition: hm_iterative.hh:206
IterativeCoupling::r_tol_
double r_tol_
Relative tolerance for difference between two succeeding iterations.
Definition: hm_iterative.hh:116
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
Model
Definition: field_model.hh:338
MPI_Allreduce
#define MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm)
Definition: mpi.h:612
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
fn_fluid_source
Definition: hm_iterative.cc:59
lame_mu
double lame_mu(double young, double poisson)
Definition: elasticity.cc:80
EquationBase::record_template
static Input::Type::Record & record_template()
Template Record with common keys for derived equations.
Definition: equation.cc:39
MixedPtr
Definition: mixed.hh:247
TimeGovernor::is_default
bool is_default()
Definition: time_governor.hh:388
HM_Iterative::eq_fields_
std::shared_ptr< EqFields > eq_fields_
Definition: hm_iterative.hh:204
HM_Iterative::EqData::mechanics_
std::shared_ptr< Elasticity > mechanics_
solute transport with chemistry through operator splitting
Definition: hm_iterative.hh:143
HM_Iterative::update_after_iteration
void update_after_iteration() override
Save data (e.g. solution fields) for the next iteration.
Definition: hm_iterative.cc:335
Elasticity::get_input_type
static const Input::Type::Record & get_input_type()
Declare input record type for the equation TransportDG.
Definition: elasticity.cc:48
HM_Iterative::solve_iteration
void solve_iteration() override
Solve equations and update data (fields).
Definition: hm_iterative.cc:322
lame_lambda
double lame_lambda(double young, double poisson)
Definition: elasticity.cc:86
FieldCommon::description
FieldCommon & description(const string &description)
Definition: field_common.hh:128
Field
Class template representing a field with values dependent on: point, element, and region.
Definition: field.hh:92
fn_hm_coupling_beta::fn_hm_coupling_beta
fn_hm_coupling_beta(double beta_f)
Definition: hm_iterative.cc:44
HM_Iterative::EqFields::old_div_u
Field< 3, FieldValue< 3 >::Scalar > old_div_u
Definition: hm_iterative.hh:168
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:110
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
GenericAssembly< FlowPotentialAssemblyHM >
DarcyFlowInterface
Definition: darcy_flow_interface.hh:15
FieldCommon::name
FieldCommon & name(const string &name)
Definition: field_common.hh:121
FieldValue
Definition: field_values.hh:645
MessageOut
#define MessageOut()
Macro defining 'message' record of log.
Definition: logger.hh:275