Flow123d  JB_transport-112d700
darcy_flow_lmh.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 darcy_flow_lmh.hh
15  * @brief Lumped mixed-hybrid model of linear Darcy flow, possibly unsteady.
16  * @author Jan Brezina
17  *
18  * Main object for mixed-hybrid discretization of the linear elliptic PDE (Laplace)
19  * on a multidimensional domain. Discretization of saturated Darcy flow using
20  * RT0 approximation for the velocity
21  */
22 
23 /*
24  * list of files dependent on this one:
25  *
26  * posprocess.cc
27  * problem.cc
28  * main.hh
29  * transport.cc
30  */
31 
32 
33 #ifndef DARCY_FLOW_LMH_HH
34 #define DARCY_FLOW_LMH_HH
35 
36 #include <petscmat.h> // for Mat
37 #include <string.h> // for memcpy
38 #include <algorithm> // for swap
39 
40 #include <memory> // for shared_ptr, allocator...
41 #include <new> // for operator new[]
42 #include <string> // for string, operator<<
43 #include <vector> // for vector, vector<>::con...
44 #include <armadillo>
45 #include "fields/bc_field.hh" // for BCField
46 #include "fields/field.hh" // for Field
47 #include "fields/field_set.hh" // for FieldSet
48 #include "fields/field_values.hh" // for FieldValue<>::Scalar
49 #include "flow/darcy_flow_interface.hh" // for DarcyFlowInterface
50 #include "input/input_exception.hh" // for DECLARE_INPUT_EXCEPTION
51 #include "input/type_base.hh" // for Array
52 #include "input/type_generic.hh" // for Instance
53 #include "mesh/mesh.h" // for Mesh
54 #include "petscvec.h" // for Vec, _p_Vec, VecScatter
55 #include "system/exceptions.hh" // for ExcStream, operator<<
56 #include "tools/time_governor.hh" // for TimeGovernor
57 #include "la/vector_mpi.hh" // for VectorMPI
58 
59 
60 class Balance;
61 class DarcyFlowMHOutput;
62 class Element;
63 class Intersection;
64 class LinSys;
65 // class LinSys_BDDC;
66 class LocalSystem;
67 class LocalConstraint;
68 namespace Input {
69  class AbstractRecord;
70  class Record;
71  namespace Type {
72  class Record;
73  class Selection;
74  }
75 }
76 template<unsigned int dim> class ReadInitCondAssemblyLMH;
78 template< template<IntDim...> class DimAssembly> class GenericAssembly;
79 
80 
81 /**
82  * @brief Mixed-hybrid model of linear Darcy flow, possibly unsteady.
83  *
84  * Abstract class for various implementations of Darcy flow. In future there should be
85  * one further level of abstraction for general time dependent problem.
86  *
87  * maybe TODO:
88  * split compute_one_step to :
89  * 1) prepare_next_timestep
90  * 2) actualize_solution - this is for iterative nonlinear solvers
91  *
92  */
93 
94 
95 /**
96  * @brief Mixed-hybrid of steady Darcy flow with sources and variable density.
97  *
98  * solve equations:
99  * @f[
100  * q= -{\mathbf{K}} \nabla h -{\mathbf{K}} R \nabla z
101  * @f]
102  * @f[
103  * \mathrm{div} q = f
104  * @f]
105  *
106  * where
107  * - @f$ q @f$ is flux @f$[ms^{-1}]@f$ for 3d, @f$[m^2s^{-1}]@f$ for 2d and @f$[m^3s^{-1}]@f$ for 1d.
108  * - @f$ \mathbf{K} @f$ is hydraulic tensor ( its orientation for 2d, 1d case is questionable )
109  * - @f$ h = \frac{\pi}{\rho_0 g}+z @f$ is pressure head, @f$ \pi, \rho_0, g @f$ are the pressure, water density, and acceleration of gravity , respectively.
110  * Assumes gravity force acts counter to the direction of the @f$ z @f$ axis.
111  * - @f$ R @f$ is destity or gravity variability coefficient. For density driven flow it should be
112  * @f[
113  * R = \frac{\rho}{\rho_0} -1 = \rho_0^{-1}\sum_{i=1}^s c_i
114  * @f]
115  * where @f$ c_i @f$ is concentration in @f$ kg m^{-3} @f$.
116  *
117  * The time key is optional, when not specified the equation is forced to steady regime. Using Steady TimeGovernor which have no dt constraints.
118  *
119  *
120  * TODO:
121  * Make solution regular field (need FeSeystem and parallel DofHandler for edge pressures), then remove get_solution_vector from
122  * Equation interface.
123  */
124 /**
125  * Model for transition coefficients due to Martin, Jaffre, Roberts (see manual for full reference)
126  *
127  * TODO:
128  * - how we can reuse field values computed during assembly
129  *
130  */
131 
133 {
134 public:
135  TYPEDEF_ERR_INFO( EI_Reason, string);
136  DECLARE_EXCEPTION(ExcSolverDiverge,
137  << "Diverged nonlinear solver. Reason: " << EI_Reason::val
138  );
139  DECLARE_INPUT_EXCEPTION(ExcMissingTimeGovernor,
140  << "Missing the key 'time', obligatory for the transient problems.");
141 
142  /** Class with all fields used in the equation DarcyFlow.
143  * This is common to all implementations since this provides interface
144  * to this equation for possible coupling.
145  *
146  * This class uses the common output class DarcyFlowMHOutput.
147  * It is base class of RichardsLMH::EqFields.
148  * */
149  class EqFields : public FieldSet {
150  public:
151  /**
152  * For compatibility with old BCD file we have to assign integer codes starting from 1.
153  */
154  enum BC_Type {
155  none=0,
160  };
161 
162  /// Return a Selection corresponding to enum BC_Type.
164 
165  /// Creation of all fields.
166  EqFields();
167 
168  /// Return coords field
170  return this->X_;
171  }
172 
173 
179 
180  BCField<3, FieldValue<3>::Enum > bc_type; // Discrete need Selection for initialization
185 
188  Field<3, FieldValue<3>::Scalar > extra_storativity; /// Externally added storativity.
189  Field<3, FieldValue<3>::Scalar > extra_source; /// Externally added water source.
190 
196 
197  Field<3, FieldValue<3>::Vector > gravity_field; /// Holds gravity vector acceptable in FieldModel
198  BCField<3, FieldValue<3>::Vector > bc_gravity; /// Same as previous but used in boundary fields
202  };
203 
204  class EqData {
205  public:
206 
207  EqData();
208 
209  void init(); ///< Initialize vectors, ...
210  void reset(); ///< Reset data members
211 
212  /**
213  * Gravity vector and constant shift of pressure potential. Used to convert piezometric head
214  * to pressure head and vice versa.
215  */
216  arma::vec4 gravity_;
218 
219  // Mirroring the following members of DarcyLMH:
221  std::shared_ptr<DOFHandlerMultiDim> dh_; ///< full DOF handler represents DOFs of sides, elements and edges
222  std::shared_ptr<SubDOFHandlerMultiDim> dh_cr_; ///< DOF handler represents DOFs of edges
223  std::shared_ptr<DOFHandlerMultiDim> dh_cr_disc_; ///< DOF handler represents DOFs of sides
224  std::shared_ptr<SubDOFHandlerMultiDim> dh_p_; ///< DOF handler represents DOFs of element pressure
225 
226 
228 
229  // TODO: check usage of MortarMethod in LMH
231 
232  int is_linear; ///< Hack fo BDDC solver.
233  bool force_no_neumann_bc; ///< auxiliary flag for switchting Dirichlet like BC
234 
235  /// Idicator of dirichlet or neumann type of switch boundary conditions.
237 
238  VectorMPI full_solution; //< full solution [vel,press,lambda] from 2. Schur complement
239 
240  // Propagate test for the time term to the assembly.
241  // This flag is necessary for switching BC to avoid setting zero neumann on the whole boundary in the steady case.
243 
244  // for time term assembly
245  double time_step_;
246 
247  std::shared_ptr<LinSys> lin_sys_schur; //< Linear system of the 2. Schur complement.
248  VectorMPI p_edge_solution; //< 2. Schur complement solution
249  VectorMPI p_edge_solution_previous; //< 2. Schur complement previous solution (iterative)
250  VectorMPI p_edge_solution_previous_time; //< 2. Schur complement previous solution (time)
251 
253 
254  /// Shared Balance object
255  std::shared_ptr<Balance> balance_;
256 
257  unsigned int nonlinear_iteration_; //< Actual number of completed nonlinear iterations, need to pass this information into assembly.
258 
259  /// Following data members are stored in vectors, one item for every cell.
260 // /** TODO: Investigate why the hell do we need this flag.
261 // * If removed, it does not break any of the integration tests,
262 // * however it must influence the Dirichlet rows in matrix.
263 // */
264 // std::vector<unsigned int> dirichlet_edge;
265 
269  std::array<std::vector<unsigned int>, 3> loc_side_dofs;
270  std::array<std::vector<unsigned int>, 3> loc_edge_dofs;
271  std::array<unsigned int, 3> loc_ele_dof;
272 
273 // // std::shared_ptr<MortarAssemblyBase> mortar_assembly;
274 
275  std::vector<bool> save_local_system_; ///< Flag for saving the local system. Currently used only in case of seepage BC.
276  std::vector<bool> bc_fluxes_reconstruted; ///< Flag indicating whether the fluxes for seepage BC has been reconstructed already.
277  std::array<unsigned int, 3> schur_offset_; ///< Index offset in the local system for the Schur complement (of dim = 1,2,3).
278  };
279 
280  /// Selection for enum MortarMethod.
282 
283 
284 
285 
286 
287  DarcyLMH(Mesh &mesh, const Input::Record in_rec, TimeGovernor *tm = nullptr);
288 
290  static const Input::Type::Record & get_input_type();
291 
292  void init_eq_data();
293  void initialize() override;
294  virtual void initialize_specific();
295  void zero_time_step() override;
296  void update_solution() override;
297 
298  /// Solve the problem without moving to next time and without output.
299  void solve_time_step(bool output = true);
300 
301  /// postprocess velocity field (add sources)
302  virtual void accept_time_step();
303  virtual void postprocess();
304  virtual void output_data() override;
305 
306  virtual double solved_time() override;
307 
308  inline EqFields &eq_fields() { return *eq_fields_; }
309  inline EqData &eq_data() { return *eq_data_; }
310 
311  /// Sets external storarivity field (coupling with other equation).
313  { eq_fields_->extra_storativity = extra_stor; }
314 
315  /// Sets external source field (coupling with other equation).
316  void set_extra_source(const Field<3, FieldValue<3>::Scalar> &extra_src)
317  { eq_fields_->extra_source = extra_src; }
318 
319  virtual ~DarcyLMH() override;
320 
321 
322 protected:
323  /**
324  * Returns true is the fields involved in the time term have values that makes the time term zero.
325  * For time_global==true, it returns true if there are no field descriptors in the input list, so the
326  * fields )of the time ter) have their default values for whole simulation.
327  * If time_global==false (default), only the actual values are considered.
328  */
329  virtual bool zero_time_term(bool time_global=false);
330 
331  /// Solve method common to zero_time_step and update solution.
332  void solve_nonlinear();
333 
334  /**
335  * Create and preallocate MH linear system (including matrix, rhs and solution vectors)
336  */
338 
339  /**
340  * Read initial condition into solution vector.
341  * Must be called after create_linear_system.
342  *
343  * For the LMH scheme we have to be able to save edge pressures in order to
344  * restart simulation or use results of one simulation as initial condition for other one.
345  */
346 // void read_initial_condition();
347 
348  /**
349  * In some circumstances, the intial condition must be processed.
350  * It is called at the end of @p read_initial_condition().
351  * This is used in Richards equation due the update of water content.
352  */
353 // virtual void initial_condition_postprocess();
354 
355  /**
356  * Allocates linear system matrix for MH.
357  * TODO:
358  * - use general preallocation methods in DofHandler
359  */
360  void allocate_mh_matrix();
361 
362  /**
363  * Assembles linear system matrix for MH.
364  * Element by element assembly is done using dim-template assembly class.
365  * Assembles only steady part of the equation.
366  * TODO:
367  * - include time term - DONE
368  * - add support for Robin type sources
369  * - support for nonlinear solvers - assembly either residual vector, matrix, or both (using FADBAD++)
370  */
371 // void assembly_mh_matrix(MultidimAssembly& assembler);
372 
373 // void reconstruct_solution_from_schur(MultidimAssembly& assembler);
374 
375  /**
376  * Assembly or update whole linear system.
377  */
378  virtual void assembly_linear_system();
379 
380 // void set_mesh_data_for_bddc(LinSys_BDDC * bddc_ls);
381  /**
382  * Return a norm of residual vector.
383  * TODO: Introduce Equation::compute_residual() updating
384  * residual field, standard part of EqData.
385  */
386 // virtual double solution_precision() const;
387 
388  /// Print darcy flow matrix in matlab format into a file.
389  void print_matlab_matrix(string matlab_file);
390 
391  /// Get vector of all DOF indices of given component (0..side, 1..element, 2..edge)
392  std::vector<int> get_component_indices_vec(unsigned int component) const;
393 
394  /// Getter for the linear system of the 2. Schur complement.
396  { return *(eq_data_->lin_sys_schur); }
397 
398  /// Create and initialize assembly objects
399  virtual void initialize_asm();
400 
401  /// Call assemble of read_init_cond_assembly_
402  virtual void read_init_cond_asm();
403 
404  std::shared_ptr<Balance> balance_;
405 
407 
408  int size; // global size of MH matrix
409 
411 
412  // Setting of the nonlinear solver. TODO: Move to the solver class later on.
413  double tolerance_;
414  unsigned int min_n_it_;
415  unsigned int max_n_it_;
416 
417  std::shared_ptr<EqFields> eq_fields_;
418  std::shared_ptr<EqData> eq_data_;
419 
420 
421  friend class DarcyFlowMHOutput;
422  //friend class P0_CouplingAssembler;
423  //friend class P1_CouplingAssembler;
424 
425  /// general assembly objects, hold assembly objects of appropriate dimension
429 private:
430  /// Registrar of class to factory
431  static const int registrar;
432 
433  static std::string equation_name()
434  { return "Flow_Darcy_LMH";}
435 };
436 
437 #endif //DARCY_FLOW_LMH_HH
438 //-----------------------------------------------------------------------------
439 // vim: set cindent:
440 
bc_field.hh
DarcyLMH::EqData::save_local_system_
std::vector< bool > save_local_system_
Flag for saving the local system. Currently used only in case of seepage BC.
Definition: darcy_flow_lmh.hh:275
FieldCoords
Definition: field_coords.hh:36
ReadInitCondAssemblyLMH
Definition: assembly_lmh.hh:46
DarcyLMH::EqFields::bc_flux
BCField< 3, FieldValue< 3 >::Scalar > bc_flux
Definition: darcy_flow_lmh.hh:182
DarcyLMH::EqFields::field_ele_velocity
Field< 3, FieldValue< 3 >::Vector > field_ele_velocity
Definition: darcy_flow_lmh.hh:193
DarcyLMH::EqFields::conductivity
Field< 3, FieldValue< 3 >::Scalar > conductivity
Definition: darcy_flow_lmh.hh:175
DarcyLMH::print_matlab_matrix
void print_matlab_matrix(string matlab_file)
Print darcy flow matrix in matlab format into a file.
Definition: darcy_flow_lmh.cc:1271
DarcyLMH::zero_time_term
virtual bool zero_time_term(bool time_global=false)
Definition: darcy_flow_lmh.cc:749
DarcyLMH::EqData::reset
void reset()
Reset data members.
Definition: darcy_flow_lmh.cc:349
LocalConstraint
Definition: local_constraint.hh:34
DarcyLMH::EqData::dh_
std::shared_ptr< DOFHandlerMultiDim > dh_
full DOF handler represents DOFs of sides, elements and edges
Definition: darcy_flow_lmh.hh:221
LinSys
Definition: la_linsys_new.hh:169
vector_mpi.hh
DarcyLMH::output_object
DarcyFlowMHOutput * output_object
Definition: darcy_flow_lmh.hh:406
time_governor.hh
Basic time management class.
LocalSystem
Definition: local_system.hh:46
DarcyLMH::EqData
Definition: darcy_flow_lmh.hh:204
GenericAssemblyBase
Definition: generic_assembly.hh:52
DarcyLMH::EqData::p_edge_solution
VectorMPI p_edge_solution
Definition: darcy_flow_lmh.hh:248
Input
Abstract linear system class.
Definition: balance.hh:40
DarcyLMH::accept_time_step
virtual void accept_time_step()
postprocess velocity field (add sources)
Definition: darcy_flow_lmh.cc:852
string.h
DarcyLMH::EqData::bc_fluxes_reconstruted
std::vector< bool > bc_fluxes_reconstruted
Flag indicating whether the fluxes for seepage BC has been reconstructed already.
Definition: darcy_flow_lmh.hh:276
Balance
Definition: balance.hh:119
DarcyLMH::create_linear_system
void create_linear_system(Input::AbstractRecord rec)
Definition: darcy_flow_lmh.cc:1091
DarcyLMH::EqData::is_linear
int is_linear
Hack fo BDDC solver.
Definition: darcy_flow_lmh.hh:232
DarcyLMH::EqData::seepage_bc_systems
std::map< LongIdx, LocalSystem > seepage_bc_systems
Definition: darcy_flow_lmh.hh:252
DarcyLMH::TYPEDEF_ERR_INFO
TYPEDEF_ERR_INFO(EI_Reason, string)
DarcyLMH::EqFields::BC_Type
BC_Type
Definition: darcy_flow_lmh.hh:154
DarcyLMH::init_eq_data
void init_eq_data()
Definition: darcy_flow_lmh.cc:445
DarcyLMH::EqFields::EqFields
EqFields()
Creation of all fields.
Definition: darcy_flow_lmh.cc:157
DarcyLMH::EqFields::gravity_field
Field< 3, FieldValue< 3 >::Vector > gravity_field
Definition: darcy_flow_lmh.hh:197
DarcyLMH::EqFields::anisotropy
Field< 3, FieldValue< 3 >::Tensor > anisotropy
Definition: darcy_flow_lmh.hh:174
field_set.hh
DarcyLMH::EqData::schur_offset_
std::array< unsigned int, 3 > schur_offset_
Index offset in the local system for the Schur complement (of dim = 1,2,3).
Definition: darcy_flow_lmh.hh:277
DarcyLMH::max_n_it_
unsigned int max_n_it_
Definition: darcy_flow_lmh.hh:415
std::vector< char >
DarcyLMH::data_changed_
bool data_changed_
Definition: darcy_flow_lmh.hh:410
DarcyLMH::EqData::gravity_
arma::vec4 gravity_
Definition: darcy_flow_lmh.hh:216
arma::vec3
Definition: doxy_dummy_defs.hh:17
DarcyLMH::EqData::lin_sys_schur
std::shared_ptr< LinSys > lin_sys_schur
Definition: darcy_flow_lmh.hh:247
DarcyLMH::solve_time_step
void solve_time_step(bool output=true)
Solve the problem without moving to next time and without output.
Definition: darcy_flow_lmh.cc:697
DarcyLMH::update_solution
void update_solution() override
Definition: darcy_flow_lmh.cc:683
DarcyLMH::EqFields
Definition: darcy_flow_lmh.hh:149
uint
unsigned int uint
Definition: mh_dofhandler.hh:101
DarcyLMH::get_input_type
static const Input::Type::Record & get_input_type()
Definition: darcy_flow_lmh.cc:104
type_base.hh
DarcyLMH::initialize_asm
virtual void initialize_asm()
Create and initialize assembly objects.
Definition: darcy_flow_lmh.cc:1560
DarcyLMH::postprocess
virtual void postprocess()
Definition: darcy_flow_lmh.cc:1203
DarcyLMH::DECLARE_EXCEPTION
DECLARE_EXCEPTION(ExcSolverDiverge,<< "Diverged nonlinear solver. Reason: "<< EI_Reason::val)
DarcyLMH::assembly_linear_system
virtual void assembly_linear_system()
Definition: darcy_flow_lmh.cc:1231
DarcyLMH::set_extra_source
void set_extra_source(const Field< 3, FieldValue< 3 >::Scalar > &extra_src)
Sets external source field (coupling with other equation).
Definition: darcy_flow_lmh.hh:316
DarcyLMH::mh_matrix_assembly_
GenericAssemblyBase * mh_matrix_assembly_
Definition: darcy_flow_lmh.hh:427
DarcyLMH::min_n_it_
unsigned int min_n_it_
Definition: darcy_flow_lmh.hh:414
exceptions.hh
DarcyLMH::EqFields::cross_section
Field< 3, FieldValue< 3 >::Scalar > cross_section
Definition: darcy_flow_lmh.hh:176
Element
Definition: elements.h:40
DarcyLMH::EqFields::bc_switch_pressure
BCField< 3, FieldValue< 3 >::Scalar > bc_switch_pressure
Definition: darcy_flow_lmh.hh:184
DarcyLMH::type_field_descriptor
static const Input::Type::Record & type_field_descriptor()
Definition: darcy_flow_lmh.cc:89
DarcyLMH::zero_time_step
void zero_time_step() override
Definition: darcy_flow_lmh.cc:641
DarcyLMH::EqData::bc_switch_dirichlet
std::vector< char > bc_switch_dirichlet
Idicator of dirichlet or neumann type of switch boundary conditions.
Definition: darcy_flow_lmh.hh:236
FieldSet::X_
FieldCoords X_
Field holds coordinates for computing of FieldFormulas.
Definition: field_set.hh:424
EquationBase::mesh
Mesh & mesh()
Definition: equation.hh:181
DarcyLMH::EqFields::bc_robin_sigma
BCField< 3, FieldValue< 3 >::Scalar > bc_robin_sigma
Definition: darcy_flow_lmh.hh:183
DarcyLMH::EqFields::bc_switch_piezo_head
BCField< 3, FieldValue< 3 >::Scalar > bc_switch_piezo_head
Definition: darcy_flow_lmh.hh:201
DarcyLMH::EqFields::total_flux
@ total_flux
Definition: darcy_flow_lmh.hh:157
DarcyLMH::EqData::loc_edge_dofs
std::array< std::vector< unsigned int >, 3 > loc_edge_dofs
Definition: darcy_flow_lmh.hh:270
DarcyLMH::eq_fields
EqFields & eq_fields()
Definition: darcy_flow_lmh.hh:308
Intersection
Definition: intersectionquadrature.hh:146
Input::Record
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
DarcyLMH::EqData::mesh
Mesh * mesh
Definition: darcy_flow_lmh.hh:220
DarcyLMH::eq_data
EqData & eq_data()
Definition: darcy_flow_lmh.hh:309
DarcyLMH::EqFields::bc_piezo_head
BCField< 3, FieldValue< 3 >::Scalar > bc_piezo_head
Definition: darcy_flow_lmh.hh:200
DarcyLMH::EqData::postprocess_solution_
std::vector< arma::vec > postprocess_solution_
Definition: darcy_flow_lmh.hh:268
type_generic.hh
DarcyLMH::EqData::dh_p_
std::shared_ptr< SubDOFHandlerMultiDim > dh_p_
DOF handler represents DOFs of element pressure.
Definition: darcy_flow_lmh.hh:224
DarcyLMH::EqData::mortar_method_
MortarMethod mortar_method_
Definition: darcy_flow_lmh.hh:230
DarcyLMH::solve_nonlinear
void solve_nonlinear()
Solve method common to zero_time_step and update solution.
Definition: darcy_flow_lmh.cc:758
DarcyLMH::EqData::loc_system_
std::vector< LocalSystem > loc_system_
Following data members are stored in vectors, one item for every cell.
Definition: darcy_flow_lmh.hh:266
DarcyLMH::balance_
std::shared_ptr< Balance > balance_
Definition: darcy_flow_lmh.hh:404
DarcyLMH::registrar
static const int registrar
Registrar of class to factory.
Definition: darcy_flow_lmh.hh:431
DarcyLMH::set_extra_storativity
void set_extra_storativity(const Field< 3, FieldValue< 3 >::Scalar > &extra_stor)
Sets external storarivity field (coupling with other equation).
Definition: darcy_flow_lmh.hh:312
TimeGovernor
Basic time management functionality for unsteady (and steady) solvers (class Equation).
Definition: time_governor.hh:317
DarcyLMH::EqData::EqData
EqData()
Definition: darcy_flow_lmh.cc:333
DarcyLMH::EqFields::get_bc_type_selection
static const Input::Type::Selection & get_bc_type_selection()
Return a Selection corresponding to enum BC_Type.
Definition: darcy_flow_lmh.cc:302
DarcyLMH::solved_time
virtual double solved_time() override
Definition: darcy_flow_lmh.cc:422
DarcyLMH::EqFields::init_piezo_head
Field< 3, FieldValue< 3 >::Scalar > init_piezo_head
Same as previous but used in boundary fields.
Definition: darcy_flow_lmh.hh:199
field_values.hh
Input::AbstractRecord
Accessor to the polymorphic input data of a type given by an AbstracRecord object.
Definition: accessors.hh:458
DarcyLMH::EqFields::bc_pressure
BCField< 3, FieldValue< 3 >::Scalar > bc_pressure
Definition: darcy_flow_lmh.hh:181
DarcyLMH::EqFields::bc_gravity
BCField< 3, FieldValue< 3 >::Vector > bc_gravity
Holds gravity vector acceptable in FieldModel.
Definition: darcy_flow_lmh.hh:198
DarcyLMH::EqData::dh_cr_disc_
std::shared_ptr< DOFHandlerMultiDim > dh_cr_disc_
DOF handler represents DOFs of sides.
Definition: darcy_flow_lmh.hh:223
input_exception.hh
FieldSet
Container for various descendants of FieldCommonBase.
Definition: field_set.hh:159
DarcyLMH::equation_name
static std::string equation_name()
Definition: darcy_flow_lmh.hh:433
mesh.h
Input::Type::Selection
Template for classes storing finite set of named values.
Definition: type_selection.hh:65
std::map< LongIdx, LocalSystem >
DarcyLMH::initialize_specific
virtual void initialize_specific()
Definition: darcy_flow_lmh.cc:598
DarcyFlowInterface::MortarMethod
MortarMethod
Type of experimental Mortar-like method for non-compatible 1d-2d interaction.
Definition: darcy_flow_interface.hh:30
DarcyLMH::eq_data_
std::shared_ptr< EqData > eq_data_
Definition: darcy_flow_lmh.hh:418
DarcyLMH::~DarcyLMH
virtual ~DarcyLMH() override
Definition: darcy_flow_lmh.cc:1510
DarcyLMH::EqData::nonlinear_iteration_
unsigned int nonlinear_iteration_
Definition: darcy_flow_lmh.hh:257
DarcyLMH::initialize
void initialize() override
Definition: darcy_flow_lmh.cc:489
DarcyLMH::EqFields::field_ele_pressure
Field< 3, FieldValue< 3 >::Scalar > field_ele_pressure
Externally added water source.
Definition: darcy_flow_lmh.hh:191
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
DarcyLMH::EqFields::river
@ river
Definition: darcy_flow_lmh.hh:159
DarcyLMH::get_component_indices_vec
std::vector< int > get_component_indices_vec(unsigned int component) const
Get vector of all DOF indices of given component (0..side, 1..element, 2..edge)
Definition: darcy_flow_lmh.cc:1546
DarcyLMH::EqFields::dirichlet
@ dirichlet
Definition: darcy_flow_lmh.hh:156
DarcyLMH::EqData::init
void init()
Initialize vectors, ...
Definition: darcy_flow_lmh.cc:339
DarcyLMH::EqData::time_step_
double time_step_
Definition: darcy_flow_lmh.hh:245
DarcyLMH::EqFields::extra_source
Field< 3, FieldValue< 3 >::Scalar > extra_source
Externally added storativity.
Definition: darcy_flow_lmh.hh:189
DarcyLMH::lin_sys_schur
LinSys & lin_sys_schur()
Getter for the linear system of the 2. Schur complement.
Definition: darcy_flow_lmh.hh:395
DarcyLMH::EqData::use_steady_assembly_
bool use_steady_assembly_
Definition: darcy_flow_lmh.hh:242
DarcyLMH::EqFields::flux
Field< 3, FieldValue< 3 >::Vector > flux
Definition: darcy_flow_lmh.hh:194
DarcyLMH::EqFields::sigma
Field< 3, FieldValue< 3 >::Scalar > sigma
Definition: darcy_flow_lmh.hh:178
Mesh
Definition: mesh.h:362
DarcyLMH::EqData::gravity_vec_
arma::vec3 gravity_vec_
Definition: darcy_flow_lmh.hh:217
DarcyLMH::tolerance_
double tolerance_
Definition: darcy_flow_lmh.hh:413
DarcyLMH::EqData::loc_side_dofs
std::array< std::vector< unsigned int >, 3 > loc_side_dofs
Definition: darcy_flow_lmh.hh:269
DarcyLMH::get_mh_mortar_selection
static const Input::Type::Selection & get_mh_mortar_selection()
Selection for enum MortarMethod.
Definition: darcy_flow_lmh.cc:81
DarcyLMH::EqData::water_balance_idx
uint water_balance_idx
Definition: darcy_flow_lmh.hh:227
DarcyLMH::EqFields::field_ele_piezo_head
Field< 3, FieldValue< 3 >::Scalar > field_ele_piezo_head
Definition: darcy_flow_lmh.hh:192
DarcyLMH::allocate_mh_matrix
void allocate_mh_matrix()
Definition: darcy_flow_lmh.cc:916
DarcyLMH
Mixed-hybrid model of linear Darcy flow, possibly unsteady.
Definition: darcy_flow_lmh.hh:132
DarcyLMH::EqData::force_no_neumann_bc
bool force_no_neumann_bc
auxiliary flag for switchting Dirichlet like BC
Definition: darcy_flow_lmh.hh:233
DarcyLMH::EqData::dh_cr_
std::shared_ptr< SubDOFHandlerMultiDim > dh_cr_
DOF handler represents DOFs of edges.
Definition: darcy_flow_lmh.hh:222
DarcyLMH::EqFields::init_pressure
Field< 3, FieldValue< 3 >::Scalar > init_pressure
Definition: darcy_flow_lmh.hh:186
DarcyLMH::reconstruct_schur_assembly_
GenericAssemblyBase * reconstruct_schur_assembly_
Definition: darcy_flow_lmh.hh:428
DarcyLMH::EqFields::water_source_density
Field< 3, FieldValue< 3 >::Scalar > water_source_density
Definition: darcy_flow_lmh.hh:177
DarcyLMH::size
int size
Definition: darcy_flow_lmh.hh:408
DarcyLMH::EqFields::none
@ none
Definition: darcy_flow_lmh.hh:155
DarcyLMH::EqFields::X
FieldCoords & X()
Return coords field.
Definition: darcy_flow_lmh.hh:169
DarcyLMH::read_init_cond_assembly_
GenericAssembly< ReadInitCondAssemblyLMH > * read_init_cond_assembly_
general assembly objects, hold assembly objects of appropriate dimension
Definition: darcy_flow_lmh.hh:426
DarcyLMH::EqData::p_edge_solution_previous
VectorMPI p_edge_solution_previous
Definition: darcy_flow_lmh.hh:249
DarcyLMH::EqData::loc_constraint_
std::vector< LocalConstraint > loc_constraint_
Definition: darcy_flow_lmh.hh:267
DarcyLMH::EqFields::seepage
@ seepage
Definition: darcy_flow_lmh.hh:158
DarcyLMH::EqFields::field_edge_pressure
Field< 3, FieldValue< 3 >::Scalar > field_edge_pressure
Definition: darcy_flow_lmh.hh:195
DarcyLMH::EqData::balance_
std::shared_ptr< Balance > balance_
Shared Balance object.
Definition: darcy_flow_lmh.hh:255
BCField
Definition: bc_field.hh:32
DarcyLMH::DECLARE_INPUT_EXCEPTION
DECLARE_INPUT_EXCEPTION(ExcMissingTimeGovernor,<< "Missing the key 'time', obligatory for the transient problems.")
VectorMPI
Definition: vector_mpi.hh:43
DarcyLMH::EqFields::storativity
Field< 3, FieldValue< 3 >::Scalar > storativity
Definition: darcy_flow_lmh.hh:187
Field
Class template representing a field with values dependent on: point, element, and region.
Definition: field.hh:92
DarcyLMH::read_init_cond_asm
virtual void read_init_cond_asm()
Call assemble of read_init_cond_assembly_.
Definition: darcy_flow_lmh.cc:1567
DarcyLMH::EqFields::bc_type
BCField< 3, FieldValue< 3 >::Enum > bc_type
Definition: darcy_flow_lmh.hh:180
DarcyFlowMHOutput
Definition: darcy_flow_mh_output.hh:74
DarcyLMH::eq_fields_
std::shared_ptr< EqFields > eq_fields_
Definition: darcy_flow_lmh.hh:417
DarcyLMH::EqFields::extra_storativity
Field< 3, FieldValue< 3 >::Scalar > extra_storativity
Definition: darcy_flow_lmh.hh:188
DarcyLMH::EqData::loc_ele_dof
std::array< unsigned int, 3 > loc_ele_dof
Definition: darcy_flow_lmh.hh:271
DarcyLMH::output_data
virtual void output_data() override
Write computed fields.
Definition: darcy_flow_lmh.cc:860
GenericAssembly
Generic class of assemblation.
Definition: generic_assembly.hh:165
DarcyLMH::DarcyLMH
DarcyLMH(Mesh &mesh, const Input::Record in_rec, TimeGovernor *tm=nullptr)
CREATE AND FILL GLOBAL MH MATRIX OF THE WATER MODEL.
Definition: darcy_flow_lmh.cc:372
darcy_flow_interface.hh
field.hh
DarcyFlowInterface
Definition: darcy_flow_interface.hh:15
DarcyLMH::EqData::full_solution
VectorMPI full_solution
Definition: darcy_flow_lmh.hh:238
FieldValue
Definition: field_values.hh:645
DarcyLMH::EqData::p_edge_solution_previous_time
VectorMPI p_edge_solution_previous_time
Definition: darcy_flow_lmh.hh:250
IntDim
unsigned int IntDim
A dimension index type.
Definition: mixed.hh:19