Flow123d  jenkins-Flow123d-windows-release-multijob-285
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DualPorosity Class Reference

Class representing dual porosity model in transport. More...

#include <dual_porosity.hh>

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

Classes

class  EqData
 DualPorosity data. More...
 

Public Member Functions

 DualPorosity (Mesh &init_mesh, Input::Record in_rec)
 Constructor. More...
 
 ~DualPorosity (void)
 Destructor. More...
 
void initialize () override
 Prepares the object to usage. More...
 
void zero_time_step () override
 
void update_solution (void) override
 
void output_data (void) override
 Main output routine. More...
 
- Public Member Functions inherited from ReactionTerm
 TYPEDEF_ERR_INFO (EI_Substance, std::string)
 
 TYPEDEF_ERR_INFO (EI_Model, std::string)
 
 DECLARE_INPUT_EXCEPTION (ExcUnknownSubstance,<< "Unknown substance name: "<< EI_Substance::qval)
 
 DECLARE_INPUT_EXCEPTION (ExcWrongDescendantModel,<< "Impossible descendant model: "<< EI_Model::qval)
 
 ReactionTerm (Mesh &init_mesh, Input::Record in_rec)
 Constructor. More...
 
 ~ReactionTerm (void)
 Destructor. More...
 
void choose_next_time (void) override
 Disable changes in TimeGovernor by empty method. More...
 
ReactionTermsubstances (SubstanceList &substances)
 Sets the names of substances considered in transport. More...
 
ReactionTermoutput_stream (OutputTime &ostream)
 Sets the output stream which is given from transport class. More...
 
ReactionTermconcentration_matrix (double **concentration, Distribution *conc_distr, int *el_4_loc, int *row_4_el)
 
- Public Member Functions inherited from EquationBase
 EquationBase ()
 
 EquationBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~EquationBase ()
 
virtual void set_time_upper_constraint (double dt)
 
virtual void set_time_lower_constraint (double dt)
 
TimeGovernor const & time ()
 
virtual void set_time_governor (TimeGovernor &time)
 
double planned_time ()
 
double solved_time ()
 
Meshmesh ()
 
TimeMark::Type mark_type ()
 
FieldSetdata ()
 
virtual void get_solution_vector (double *&vector, unsigned int &size)
 
virtual void get_parallel_solution_vector (Vec &vector)
 

Static Public Attributes

static Input::Type::Record input_type
 
- Static Public Attributes inherited from ReactionTerm
static Input::Type::AbstractRecord input_type = AbstractRecord("ReactionTerm", "Equation for reading information about simple chemical reactions.")
 
static Input::Type::Record input_type_output_record
 Specification of the output record. More...
 

Protected Member Functions

 DualPorosity ()
 
void make_reactions ()
 Resolves construction of following reactions. More...
 
void set_initial_condition ()
 Sets initial condition from input. More...
 
void initialize_fields ()
 Initializes field sets. More...
 
void allocate_output_mpi (void)
 Allocates petsc vectors, prepares them for output and creates output vector scatter. More...
 
double ** compute_reaction (double **concentrations, int loc_el) override
 
void output_vector_gather (void) override
 Gathers all the parallel vectors to enable them to be output. More...
 

Protected Attributes

double ** conc_immobile
 
EqData data_
 
Input::Array output_array
 
FieldSet input_data_set_
 
ReactionTermreaction_mobile
 Reaction running in mobile zone. More...
 
ReactionTermreaction_immobile
 Reaction running in immobile zone. More...
 
double scheme_tolerance_
 Dual porosity computational scheme tolerance. More...
 
members used in output routines
VecScatter vconc_out_scatter
 Output vector scatter. More...
 
Vec * vconc_immobile
 PETSC concentration vector for immobile phase (parallel). More...
 
std::vector< VectorSeqDoubleconc_immobile_out
 concentration array output for immobile phase (gathered - sequential) More...
 
- Protected Attributes inherited from ReactionTerm
double ** concentration_matrix_
 
int * el_4_loc_
 Indices of elements belonging to local dofs. More...
 
int * row_4_el_
 Indices of rows belonging to elements. More...
 
Distributiondistribution_
 Pointer to reference to distribution of elements between processors. More...
 
SubstanceList substances_
 Names belonging to substances. More...
 
OutputTimeoutput_stream_
 Pointer to a transport output stream. 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_data_
 

Detailed Description

Class representing dual porosity model in transport.

Definition at line 24 of file dual_porosity.hh.

Constructor & Destructor Documentation

DualPorosity::DualPorosity ( Mesh init_mesh,
Input::Record  in_rec 
)

Constructor.

Definition at line 75 of file dual_porosity.cc.

DualPorosity::~DualPorosity ( void  )

Destructor.

Definition at line 87 of file dual_porosity.cc.

DualPorosity::DualPorosity ( )
protected

This method disables to use constructor without parameters.

Member Function Documentation

void DualPorosity::allocate_output_mpi ( void  )
protected

Allocates petsc vectors, prepares them for output and creates output vector scatter.

Definition at line 374 of file dual_porosity.cc.

Here is the caller graph for this function:

double ** DualPorosity::compute_reaction ( double **  concentrations,
int  loc_el 
)
overrideprotectedvirtual

Computation of reaction term on a single element. Inputs should be loc_el and local copies of concentrations of the element, which is then returned.

Implements ReactionTerm.

Definition at line 312 of file dual_porosity.cc.

Here is the caller graph for this function:

void DualPorosity::initialize ( )
overridevirtual

Prepares the object to usage.

Allocating memory, reading input, initialization of fields.

Reimplemented from EquationBase.

Definition at line 176 of file dual_porosity.cc.

void DualPorosity::initialize_fields ( )
protected

Initializes field sets.

Definition at line 216 of file dual_porosity.cc.

Here is the caller graph for this function:

void DualPorosity::make_reactions ( )
protected

Resolves construction of following reactions.

Definition at line 105 of file dual_porosity.cc.

Here is the caller graph for this function:

void DualPorosity::output_data ( void  )
overridevirtual

Main output routine.

Reimplemented from ReactionTerm.

Definition at line 410 of file dual_porosity.cc.

void DualPorosity::output_vector_gather ( void  )
overrideprotectedvirtual

Gathers all the parallel vectors to enable them to be output.

Reimplemented from ReactionTerm.

Definition at line 399 of file dual_porosity.cc.

Here is the caller graph for this function:

void DualPorosity::set_initial_condition ( )
protected

Sets initial condition from input.

Definition at line 280 of file dual_porosity.cc.

Here is the caller graph for this function:

void DualPorosity::update_solution ( void  )
overridevirtual

Updates the solution according to the dual porosity model.

Reimplemented from EquationBase.

Definition at line 296 of file dual_porosity.cc.

void DualPorosity::zero_time_step ( )
overridevirtual

Does first computation after initialization process. The time is set and initial condition is set and output.

Reimplemented from EquationBase.

Definition at line 244 of file dual_porosity.cc.

Member Data Documentation

double** DualPorosity::conc_immobile
protected

Pointer to twodimensional array[substance][elements] containing concentrations either in immobile.

Definition at line 105 of file dual_porosity.hh.

std::vector<VectorSeqDouble> DualPorosity::conc_immobile_out
protected

concentration array output for immobile phase (gathered - sequential)

Definition at line 132 of file dual_porosity.hh.

EqData DualPorosity::data_
protected

Equation data - all data fields are in this set.

Definition at line 110 of file dual_porosity.hh.

FieldSet DualPorosity::input_data_set_
protected

Input data set - fields in this set are read from the input file.

Definition at line 117 of file dual_porosity.hh.

Record DualPorosity::input_type
static
Initial value:
= Record("DualPorosity",
"Dual porosity model in transport problems.\n"
"Provides computing the concentration of substances in mobile and immobile zone.\n"
)
.declare_key("input_fields", Array(DualPorosity::EqData().make_field_descriptor_type("DualPorosity")), Default::obligatory(),
"Containes region specific data necessary to construct dual porosity model.")
.declare_key("scheme_tolerance", Double(0.0), Default("1e-3"),
"Tolerance according to which the explicit Euler scheme is used or not."
"Set 0.0 to use analytic formula only (can be slower).")
.declare_key("reaction_mobile", ReactionTerm::input_type, Default::optional(), "Reaction model in mobile zone.")
.declare_key("reaction_immobile", ReactionTerm::input_type, Default::optional(), "Reaction model in immobile zone.")
.declare_key("output_fields", Array(EqData::output_selection),
Default("conc_immobile"), "List of fields to write to output stream.")

Static variable for new input data types input

Definition at line 30 of file dual_porosity.hh.

Input::Array DualPorosity::output_array
protected

Definition at line 112 of file dual_porosity.hh.

ReactionTerm* DualPorosity::reaction_immobile
protected

Reaction running in immobile zone.

Definition at line 120 of file dual_porosity.hh.

ReactionTerm* DualPorosity::reaction_mobile
protected

Reaction running in mobile zone.

Definition at line 119 of file dual_porosity.hh.

double DualPorosity::scheme_tolerance_
protected

Dual porosity computational scheme tolerance.

According to this tolerance the analytical solution of dual porosity concentrations or simple forward difference approximation of concentrations is chosen for computation.

Definition at line 126 of file dual_porosity.hh.

Vec* DualPorosity::vconc_immobile
protected

PETSC concentration vector for immobile phase (parallel).

Definition at line 131 of file dual_porosity.hh.

VecScatter DualPorosity::vconc_out_scatter
protected

Output vector scatter.

Definition at line 130 of file dual_porosity.hh.


The documentation for this class was generated from the following files: