Flow123d  release_3.0.0-1073-g8f35d56
hm_iterative.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file hm_iterative.hh
15  * @brief
16  * @author Jan Stebel
17  */
18 
19 #ifndef HM_ITERATIVE_HH_
20 #define HM_ITERATIVE_HH_
21 
22 #include <memory>
23 #include <string>
24 #include <vector>
27 #include "coupling/equation.hh"
29 #include "mechanics/elasticity.hh"
30 
31 class Mesh;
32 class FieldCommon;
33 class RichardsLMH;
34 
35 
36 /**
37  * @brief Class for solution of fully coupled flow and mechanics using fixed-stress iterative splitting.
38  *
39  * Flow and mechanics are solved separately and within each iteration the coupling terms are updated.
40  * Here we use the fixed-stress splitting [see Mikelic&Wheeler, Comput. Geosci. 17(3), 2013] which uses
41  * a tuning parameter "beta" to speed up the convergence.
42  *
43  * TODO: The class is currently inherited from DarcyFlowInterface in order to provide MH_DofHandler for
44  * transport processes. This should be changed as soon as we replace MH_DofHandler by fields for velocity
45  * and pressure.
46  */
48 public:
49 
50  class EqData : public FieldSet
51  {
52  public:
53  EqData();
54 
55  };
56 
57  /// Define input record.
58  static const Input::Type::Record & get_input_type();
59 
60  HM_Iterative(Mesh &mesh, Input::Record in_record);
61  void initialize() override;
62  void zero_time_step() override;
63  void update_solution() override;
64  const MH_DofHandler & get_mh_dofhandler() override;
65  ~HM_Iterative();
66 
67 private:
68 
69  static const int registrar;
70 
71  /// steady or unsteady water flow simulator based on MH scheme
72  std::shared_ptr<RichardsLMH> flow_;
73 
74  /// solute transport with chemistry through operator splitting
75  std::shared_ptr<Elasticity> mechanics_;
76 
78 
79  /// Tuning parameter for iterative splitting.
80  double beta_;
81 
82  /// Minimal number of iterations to perform.
83  unsigned int min_it_;
84 
85  /// Maximal number of iterations.
86  unsigned int max_it_;
87 
88  /// Absolute tolerance for difference between two succeeding iterations.
89  double a_tol_;
90 
91  /// Relative tolerance for difference between two succeeding iterations.
92  double r_tol_;
93 
94 };
95 
96 #endif /* HC_EXPLICIT_SEQUENTIAL_HH_ */
Abstract base class for equation clasess.
Common abstract parent of all Field<...> classes.
Definition: field_common.hh:73
Container for various descendants of FieldCommonBase.
Definition: field_set.hh:71
unsigned int max_it_
Maximal number of iterations.
Definition: hm_iterative.hh:86
Class for solution of fully coupled flow and mechanics using fixed-stress iterative splitting...
Definition: hm_iterative.hh:47
double beta_
Tuning parameter for iterative splitting.
Definition: hm_iterative.hh:80
double r_tol_
Relative tolerance for difference between two succeeding iterations.
Definition: hm_iterative.hh:92
static const int registrar
Definition: hm_iterative.hh:69
const MH_DofHandler & get_mh_dofhandler() override
Definition: mesh.h:76
void zero_time_step() override
double a_tol_
Absolute tolerance for difference between two succeeding iterations.
Definition: hm_iterative.hh:89
static const Input::Type::Record & get_input_type()
Define input record.
Definition: hm_iterative.cc:32
FEM for linear elasticity.
void update_solution() override
Mesh & mesh()
Definition: equation.hh:176
Edge lumped mixed-hybrid solution of unsteady Darcy flow.
Definition: richards_lmh.hh:61
Accessor to the data with type Type::Record.
Definition: accessors.hh:292
std::shared_ptr< Elasticity > mechanics_
solute transport with chemistry through operator splitting
Definition: hm_iterative.hh:75
void initialize() override
unsigned int min_it_
Minimal number of iterations to perform.
Definition: hm_iterative.hh:83
HM_Iterative(Mesh &mesh, Input::Record in_record)
Definition: hm_iterative.cc:66
Record type proxy class.
Definition: type_record.hh:182
std::shared_ptr< RichardsLMH > flow_
steady or unsteady water flow simulator based on MH scheme
Definition: hm_iterative.hh:72