Flow123d  3.9.0-be1f591da
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
HM_Iterative Class Reference

Class for solution of fully coupled flow and mechanics using fixed-stress iterative splitting. More...

#include <hm_iterative.hh>

Inheritance diagram for HM_Iterative:
Inheritance graph
[legend]
Collaboration diagram for HM_Iterative:
Collaboration graph
[legend]

Classes

class  EqData
 
class  EqFields
 

Public Member Functions

 HM_Iterative (Mesh &mesh, Input::Record in_record)
 
void initialize () override
 
void zero_time_step () override
 
void update_solution () override
 
 ~HM_Iterative ()
 
- Public Member Functions inherited from DarcyFlowInterface
 DECLARE_EXCEPTION (ExcBddcmlNotSupported,<< "Flow123d was not build with BDDCML support.\n")
 
 DECLARE_EXCEPTION (ExcUnknownSolver,<< "Unknown solver type. Internal error.\n")
 
 DarcyFlowInterface (Mesh &mesh, const Input::Record in_rec)
 
virtual ~DarcyFlowInterface ()
 
- Public Member Functions inherited from EquationBase
 EquationBase ()
 
 EquationBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~EquationBase ()
 
virtual void choose_next_time ()
 
virtual void set_time_upper_constraint (double dt, std::string message)
 
virtual void set_time_lower_constraint (double dt, std::string message)
 
TimeGovernortime ()
 
virtual void set_time_governor (TimeGovernor &time)
 
double planned_time ()
 
virtual double solved_time ()
 
Meshmesh ()
 
std::shared_ptr< Balancebalance () const
 
TimeMark::Type mark_type ()
 
FieldSeteq_fieldset ()
 
virtual void output_data ()
 Write computed fields. More...
 
- Public Member Functions inherited from IterativeCoupling
 TYPEDEF_ERR_INFO (EI_Reason, string)
 
 DECLARE_EXCEPTION (ExcSolverDiverge,<< "Nonlinear solver did not converge. Reason: "<< EI_Reason::val)
 
 IterativeCoupling (Input::Record in_record)
 
void solve_step ()
 
unsigned int iteration ()
 

Static Public Member Functions

static const Input::Type::Recordget_input_type ()
 Define input record. More...
 
- Static Public Member Functions inherited from DarcyFlowInterface
static Input::Type::Abstractget_input_type ()
 
- Static Public Member Functions inherited from EquationBase
static Input::Type::Recordrecord_template ()
 Template Record with common keys for derived equations. More...
 
- Static Public Member Functions inherited from IterativeCoupling
static const Input::Type::Recordrecord_template ()
 

Private Member Functions

void update_potential ()
 
void update_flow_fields ()
 
void solve_iteration () override
 Solve equations and update data (fields). More...
 
void update_after_iteration () override
 Save data (e.g. solution fields) for the next iteration. More...
 
void update_after_converged () override
 Save data after iterations have finished. More...
 
void compute_iteration_error (double &abs_error, double &rel_error) override
 Compute absolute and relative error in the solution. More...
 

Private Attributes

GenericAssembly< FlowPotentialAssemblyHM > * flow_potential_assembly_
 
GenericAssembly< ResidualAssemblyHM > * residual_assembly_
 
EqFields eq_fields_
 
EqData eq_data_
 

Static Private Attributes

static const int registrar
 

Additional Inherited Members

- Public Types inherited from DarcyFlowInterface
enum  MortarMethod { NoMortar = 0, MortarP0 = 1, MortarP1 = 2 }
 Type of experimental Mortar-like method for non-compatible 1d-2d interaction. More...
 
typedef DarcyFlowInterface FactoryBaseType
 Typedef for usage of Input::Factory in child classes. More...
 
- Protected Attributes inherited from EquationBase
bool equation_empty_
 flag is true if only default constructor was called More...
 
Meshmesh_
 
TimeGovernortime_
 
Input::Record input_record_
 
FieldSeteq_fieldset_
 
std::shared_ptr< Balancebalance_
 object for calculation and writing the mass balance to file. More...
 
- Protected Attributes inherited from IterativeCoupling
unsigned int min_it_
 Minimal number of iterations to perform. More...
 
unsigned int max_it_
 Maximal number of iterations. More...
 
double a_tol_
 Absolute tolerance for difference between two succeeding iterations. More...
 
double r_tol_
 Relative tolerance for difference between two succeeding iterations. More...
 

Detailed Description

Class for solution of fully coupled flow and mechanics using fixed-stress iterative splitting.

Flow and mechanics are solved separately and within each iteration the coupling terms are updated. Here we use the fixed-stress splitting [see Mikelic&Wheeler, Comput. Geosci. 17(3), 2013] which uses a tuning parameter "beta" to speed up the convergence.

Definition at line 133 of file hm_iterative.hh.

Constructor & Destructor Documentation

◆ HM_Iterative()

HM_Iterative::HM_Iterative ( Mesh mesh,
Input::Record  in_record 
)

Definition at line 214 of file hm_iterative.cc.

◆ ~HM_Iterative()

HM_Iterative::~HM_Iterative ( )

Definition at line 389 of file hm_iterative.cc.

Member Function Documentation

◆ compute_iteration_error()

void HM_Iterative::compute_iteration_error ( double &  abs_error,
double &  rel_error 
)
overrideprivatevirtual

Compute absolute and relative error in the solution.

Implements IterativeCoupling.

Definition at line 365 of file hm_iterative.cc.

◆ get_input_type()

const it::Record & HM_Iterative::get_input_type ( )
static

Define input record.

Definition at line 74 of file hm_iterative.cc.

◆ initialize()

void HM_Iterative::initialize ( )
overridevirtual

This method should initialize fields of the equation. All members (e.g. number of components) that are necessary for the field initialization must be set between construction and call of initialize. After this method the upper level coupling may set sharing of some fields between equations.

Reimplemented from EquationBase.

Definition at line 261 of file hm_iterative.cc.

◆ solve_iteration()

void HM_Iterative::solve_iteration ( )
overrideprivatevirtual

Solve equations and update data (fields).

Implements IterativeCoupling.

Definition at line 309 of file hm_iterative.cc.

◆ update_after_converged()

void HM_Iterative::update_after_converged ( )
overrideprivatevirtual

Save data after iterations have finished.

Implements IterativeCoupling.

Definition at line 330 of file hm_iterative.cc.

◆ update_after_iteration()

void HM_Iterative::update_after_iteration ( )
overrideprivatevirtual

Save data (e.g. solution fields) for the next iteration.

Implements IterativeCoupling.

Definition at line 322 of file hm_iterative.cc.

◆ update_flow_fields()

void HM_Iterative::update_flow_fields ( )
private

Definition at line 356 of file hm_iterative.cc.

Here is the caller graph for this function:

◆ update_potential()

void HM_Iterative::update_potential ( )
private

Definition at line 340 of file hm_iterative.cc.

Here is the caller graph for this function:

◆ update_solution()

void HM_Iterative::update_solution ( )
overridevirtual

Calculation of the next time step and its output.

Reimplemented from EquationBase.

Definition at line 300 of file hm_iterative.cc.

◆ zero_time_step()

void HM_Iterative::zero_time_step ( )
overridevirtual

Initialization of the solution in the zero time.

There may be fields that can not be initialized in the initialize method as they are provided by the coupling. Fields coming from coupling has to be set after the initialize method and before zero_time_step.

Reimplemented from EquationBase.

Definition at line 282 of file hm_iterative.cc.

Member Data Documentation

◆ eq_data_

EqData HM_Iterative::eq_data_
private

Definition at line 206 of file hm_iterative.hh.

◆ eq_fields_

EqFields HM_Iterative::eq_fields_
private

Definition at line 204 of file hm_iterative.hh.

◆ flow_potential_assembly_

GenericAssembly<FlowPotentialAssemblyHM>* HM_Iterative::flow_potential_assembly_
private

Definition at line 201 of file hm_iterative.hh.

◆ registrar

const int HM_Iterative::registrar
staticprivate
Initial value:
= Input::register_class< HM_Iterative, Mesh &, const Input::Record >("Coupling_Iterative")

Definition at line 199 of file hm_iterative.hh.

◆ residual_assembly_

GenericAssembly<ResidualAssemblyHM>* HM_Iterative::residual_assembly_
private

Definition at line 202 of file hm_iterative.hh.


The documentation for this class was generated from the following files:
HM_Iterative::get_input_type
static const Input::Type::Record & get_input_type()
Define input record.
Definition: hm_iterative.cc:74
Input::Type::Record::size
unsigned int size() const
Returns number of keys in the Record.
Definition: type_record.hh:602