Flow123d  release_3.0.0-967-g1590fa8
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 
30 class Mesh;
31 class FieldCommon;
32 class RichardsLMH;
33 
34 
35 /**
36  * @brief Class for solution of fully coupled flow and mechanics using fixed-stress iterative splitting.
37  *
38  * Flow and mechanics are solved separately and within each iteration the coupling terms are updated.
39  * Here we use the fixed-stress splitting [see Mikelic&Wheeler, Comput. Geosci. 17(3), 2013] which uses
40  * a tuning parameter "beta" to speed up the convergence.
41  *
42  * TODO: The class is currently inherited from DarcyFlowInterface in order to provide MH_DofHandler for
43  * transport processes. This should be changed as soon as we replace MH_DofHandler by fields for velocity
44  * and pressure.
45  */
47 public:
48  /// Define input record.
49  static const Input::Type::Record & get_input_type();
50 
51  HM_Iterative(Mesh &mesh, Input::Record in_record);
52  void zero_time_step() override;
53  void update_solution() override;
54  const MH_DofHandler & get_mh_dofhandler() override;
55  ~HM_Iterative();
56 
57 private:
58 
59  static const int registrar;
60 
61  /// steady or unsteady water flow simulator based on MH scheme
62  std::shared_ptr<RichardsLMH> flow_;
63 
64  /// solute transport with chemistry through operator splitting
65  std::shared_ptr<EquationBase> mechanics_;
66 
67  /// Tuning parameter for iterative splitting.
68  double beta_;
69 
70  /// Minimal number of iterations to perform.
71  unsigned int min_it_;
72 
73  /// Maximal number of iterations.
74  unsigned int max_it_;
75 
76  /// Absolute tolerance for difference between two succeeding iterations.
77  double a_tol_;
78 
79  /// Relative tolerance for difference between two succeeding iterations.
80  double r_tol_;
81 
82 };
83 
84 #endif /* HC_EXPLICIT_SEQUENTIAL_HH_ */
Abstract base class for equation clasess.
Common abstract parent of all Field<...> classes.
Definition: field_common.hh:73
unsigned int max_it_
Maximal number of iterations.
Definition: hm_iterative.hh:74
Class for solution of fully coupled flow and mechanics using fixed-stress iterative splitting...
Definition: hm_iterative.hh:46
double beta_
Tuning parameter for iterative splitting.
Definition: hm_iterative.hh:68
double r_tol_
Relative tolerance for difference between two succeeding iterations.
Definition: hm_iterative.hh:80
static const int registrar
Definition: hm_iterative.hh:59
std::shared_ptr< EquationBase > mechanics_
solute transport with chemistry through operator splitting
Definition: hm_iterative.hh:65
const MH_DofHandler & get_mh_dofhandler() override
Definition: mesh.h:76
void zero_time_step() override
Definition: hm_iterative.cc:93
double a_tol_
Absolute tolerance for difference between two succeeding iterations.
Definition: hm_iterative.hh:77
static const Input::Type::Record & get_input_type()
Define input record.
Definition: hm_iterative.cc:32
void update_solution() override
Definition: hm_iterative.cc:99
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
unsigned int min_it_
Minimal number of iterations to perform.
Definition: hm_iterative.hh:71
HM_Iterative(Mesh &mesh, Input::Record in_record)
Definition: hm_iterative.cc:61
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:62