Flow123d
release_3.0.0-973-g92f55e826
|
Edge lumped mixed-hybrid solution of unsteady Darcy flow. More...
#include <richards_lmh.hh>
Classes | |
class | EqData |
Public Member Functions | |
RichardsLMH (Mesh &mesh, const Input::Record in_rec) | |
Public Member Functions inherited from DarcyMH | |
TYPEDEF_ERR_INFO (EI_Reason, string) | |
DECLARE_EXCEPTION (ExcSolverDiverge,<< "Diverged nonlinear solver. Reason: "<< EI_Reason::val) | |
DECLARE_INPUT_EXCEPTION (ExcMissingTimeGovernor,<< "Missing the key 'time', obligatory for the transient problems.") | |
DarcyMH (Mesh &mesh, const Input::Record in_rec) | |
CREATE AND FILL GLOBAL MH MATRIX OF THE WATER MODEL. More... | |
const MH_DofHandler & | get_mh_dofhandler () override |
void | init_eq_data () |
void | initialize () override |
void | zero_time_step () override |
void | update_solution () override |
void | get_solution_vector (double *&vec, unsigned int &vec_size) override |
void | get_parallel_solution_vector (Vec &vector) override |
virtual void | output_data () override |
Write computed fields. More... | |
virtual | ~DarcyMH () override |
Public Member Functions inherited from DarcyFlowInterface | |
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) |
TimeGovernor & | time () |
virtual void | set_time_governor (TimeGovernor &time) |
double | planned_time () |
double | solved_time () |
Mesh & | mesh () |
TimeMark::Type | mark_type () |
FieldSet & | data () |
Static Public Member Functions | |
static const Input::Type::Record & | get_input_type () |
Static Public Member Functions inherited from DarcyMH | |
static const Input::Type::Selection & | get_mh_mortar_selection () |
Selection for enum MortarMethod. More... | |
static const Input::Type::Record & | type_field_descriptor () |
static const Input::Type::Record & | get_input_type () |
Static Public Member Functions inherited from DarcyFlowInterface | |
static Input::Type::Abstract & | get_input_type () |
Protected Member Functions | |
bool | zero_time_term (bool time_global=false) override |
void | initialize_specific () override |
void | assembly_source_term () override |
Source term is implemented differently in LMH version. More... | |
void | read_initial_condition () override |
void | assembly_linear_system () override |
void | setup_time_term () override |
void | prepare_new_time_step () override |
postprocess velocity field (add sources) More... | |
void | postprocess () override |
Protected Member Functions inherited from DarcyMH | |
void | solve_nonlinear () |
Solve method common to zero_time_step and update solution. More... | |
void | make_serial_scatter () |
void | modify_system () |
void | create_linear_system (Input::AbstractRecord rec) |
Initialize global_row_4_sub_row. More... | |
void | allocate_mh_matrix () |
void | assembly_mh_matrix (MultidimAssembly &assembler) |
void | set_mesh_data_for_bddc (LinSys_BDDC *bddc_ls) |
virtual double | solution_precision () const |
void | print_matlab_matrix (string matlab_file) |
Print darcy flow matrix in matlab format into a file. More... | |
Static Protected Attributes | |
static const int | registrar |
Registrar of class to factory. More... | |
Private Attributes | |
std::shared_ptr< EqData > | data_ |
VecScatter | solution_2_edge_scatter_ |
PETSC scatter from the solution vector to the parallel edge vector with ghost values. More... | |
Additional Inherited Members | |
Public Types inherited from DarcyMH | |
enum | MortarMethod { NoMortar = 0, MortarP0 = 1, MortarP1 = 2 } |
Type of experimental Mortar-like method for non-compatible 1d-2d interaction. More... | |
typedef std::vector< std::shared_ptr< AssemblyBase > > | MultidimAssembly |
Public Types inherited from DarcyFlowInterface | |
typedef DarcyFlowInterface | FactoryBaseType |
Typedef for usage of Input::Factory in child classes. More... | |
Protected Attributes inherited from DarcyMH | |
bool | solution_changed_for_scatter |
MH_DofHandler | mh_dh |
std::shared_ptr< Balance > | balance_ |
DarcyFlowMHOutput * | output_object |
int | size |
int | n_schur_compls |
double * | solution |
bool | use_steady_assembly_ |
bool | data_changed_ |
double | tolerance_ |
unsigned int | min_n_it_ |
unsigned int | max_n_it_ |
unsigned int | nonlinear_iteration_ |
LinSys * | schur0 |
Vec | sol_vec |
VecScatter | par_to_all |
Vec | steady_diagonal |
Vec | steady_rhs |
Vec | new_diagonal |
Vec | previous_solution |
std::shared_ptr< EqData > | data_ |
Protected Attributes inherited from EquationBase | |
bool | equation_empty_ |
flag is true if only default constructor was called More... | |
Mesh * | mesh_ |
TimeGovernor * | time_ |
Input::Record | input_record_ |
FieldSet * | eq_data_ |
std::shared_ptr< Balance > | balance_ |
object for calculation and writing the mass balance to file. More... | |
Edge lumped mixed-hybrid solution of unsteady Darcy flow.
The time term and sources are evenly distributed form an element to its edges. This applies directly to the second Schur complement. After this system for pressure traces is solved we reconstruct pressures and side flows as follows:
This lumping technique preserves discrete maximum principle for any time step provided one use acute mesh. But in practice even worse meshes are tractable.
Ideas how to unify steady and unsteady flow: zero_time_step:
update solution:
Definition at line 61 of file richards_lmh.hh.
RichardsLMH::RichardsLMH | ( | Mesh & | mesh, |
const Input::Record | in_rec | ||
) |
Definition at line 109 of file richards_lmh.cc.
|
overrideprotectedvirtual |
Assembly or update whole linear system.
Reimplemented from DarcyMH.
Definition at line 218 of file richards_lmh.cc.
|
overrideprotectedvirtual |
Source term is implemented differently in LMH version.
Reimplemented from DarcyMH.
Definition at line 155 of file richards_lmh.cc.
|
static |
Definition at line 72 of file richards_lmh.cc.
|
overrideprotectedvirtual |
Reimplemented from DarcyMH.
Definition at line 118 of file richards_lmh.cc.
|
overrideprotectedvirtual |
Reimplemented from DarcyMH.
Definition at line 274 of file richards_lmh.cc.
|
overrideprotectedvirtual |
postprocess velocity field (add sources)
Reimplemented from DarcyMH.
Definition at line 197 of file richards_lmh.cc.
|
overrideprotectedvirtual |
Read initial condition into solution vector. Must be called after create_linear_system.
For the LMH scheme we have to be able to save edge pressures in order to restart simulation or use results of one simulation as initial condition for other one.
Reimplemented from DarcyMH.
Definition at line 161 of file richards_lmh.cc.
|
overrideprotectedvirtual |
Reimplemented from DarcyMH.
Definition at line 265 of file richards_lmh.cc.
|
overrideprotectedvirtual |
Returns true is the fields involved in the time term have values that makes the time term zero. For time_global==true, it returns true if there are no field descriptors in the input list, so the fields )of the time ter) have their default values for whole simulation. If time_global==false (default), only the actual values are considered.
Reimplemented from DarcyMH.
Definition at line 204 of file richards_lmh.cc.
|
private |
Definition at line 114 of file richards_lmh.hh.
|
staticprotected |
Registrar of class to factory.
Definition at line 99 of file richards_lmh.hh.
|
private |
PETSC scatter from the solution vector to the parallel edge vector with ghost values.
Definition at line 116 of file richards_lmh.hh.