19 #ifndef TRANSPORT_DG_HH_ 20 #define TRANSPORT_DG_HH_ 25 #include <boost/exception/info.hpp> 59 template<
unsigned int dim,
unsigned int spacedim>
class FEValuesBase;
61 template<
unsigned int dim,
unsigned int spacedim>
class Mapping;
63 namespace Input {
namespace Type {
class Selection; } }
78 template<
unsigned int dim>
81 template<
unsigned int dim>
84 template<
unsigned int dim>
87 template<
unsigned int dim>
90 inline std::shared_ptr<DOFHandlerMultiDim> dh();
116 std::shared_ptr<DiscreteSpace>
ds_;
119 std::shared_ptr<DOFHandlerMultiDim>
dh_;
158 template<
class Model>
163 class EqData :
public Model::ModelEqData {
210 void zero_time_step()
override;
218 void update_solution()
override;
230 void initialize()
override;
232 void calculate_cumulative_balance();
235 {
return ls[sbi]->get_solution(); }
238 {
return solution_elem_; }
240 void calculate_concentration_matrix();
242 void update_after_reactions(
bool solution_changed);
255 inline typename Model::ModelEqData &
data() {
return data_; }
265 void assemble_mass_matrix();
270 template<
unsigned int dim>
271 void assemble_mass_matrix();
280 void assemble_stiffness_matrix();
285 template<
unsigned int dim>
286 void assemble_volume_integrals();
298 template<
unsigned int dim>
304 template<
unsigned int dim>
305 void assemble_fluxes_boundary();
310 template<
unsigned int dim>
311 void assemble_fluxes_element_element();
316 template<
unsigned int dim>
317 void assemble_fluxes_element_side();
325 void set_boundary_conditions();
331 template<
unsigned int dim>
332 void set_boundary_conditions();
342 template<
unsigned int dim>
373 void set_DG_parameters_boundary(
Side side,
385 void set_initial_condition();
391 template<
unsigned int dim>
392 void prepare_initial_condition();
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
Input::Record input_rec
Record with input specification.
Class MappingP1 implements the affine transformation of the unit cell onto the actual cell...
FiniteElement< 2 > * fe_rt2_
vector< double > mm_coef
Mass matrix coefficients.
MappingP1< 3, 3 > * map3_
Transport with dispersion implemented using discontinuous Galerkin method.
Wrappers for linear systems based on MPIAIJ and MATIS format.
Class template representing a field with values dependent on: point, element, and region...
vector< VectorMPI > output_vec
Array for storing the output solution data.
int dg_variant
DG variant ((non-)symmetric/incomplete.
vector< vector< arma::vec3 > > ad_coef
Advection coefficients.
vector< vector< vector< arma::mat33 > > > dif_coef_edg
Diffusion coefficients on edges.
Discontinuous Galerkin method for equation of transport with dispersion.
const Vec & get_solution(unsigned int sbi)
vector< double > ret_sources_prev
MultiField< 3, FieldValue< 3 >::Scalar > dg_penalty
Penalty enforcing inter-element continuity of solution (for each substance).
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell...
EquationOutput output_fields
std::vector< Mat > mass_matrix
The mass matrix.
Base class for quadrature rules on simplices in arbitrary dimensions.
vector< vector< double > > ret_coef
Retardation coefficient due to sorption.
vector< vector< vector< arma::vec3 > > > ad_coef_edg
Advection coefficients on edges.
double ** get_concentration_matrix()
FiniteElement< 0 > * fe0_
Finite elements for the solution of the advection-diffusion equation.
MultiField< 3, FieldValue< 3 >::Scalar > fracture_sigma
Transition parameter for diffusive transfer on fractures (for each substance).
vector< vector< arma::mat33 > > dif_coef
Diffusion coefficients.
FEObjects * feo
Finite element objects.
static const int registrar
Registrar of class to factory.
FiniteElement< 2 > * fe2_
Abstract class for the mapping between reference and actual cell.
Field< 3, FieldValue< 3 >::Scalar > subdomain
Provides the numbering of the finite element degrees of freedom on the computational mesh...
std::shared_ptr< DiscreteSpace > ds_
std::vector< Vec > rhs
Vector of right hand side.
bool evaluate_time_constraint(double &time_constraint)
Field< 3, FieldValue< 3 >::Scalar > region_id
unsigned int dg_order
Polynomial order of finite elements.
The class for outputting data during time.
FiniteElement< 1 > * fe_rt1_
Finite elements for the water velocity field.
MappingP1< 2, 3 > * map2_
double ** solution_elem_
Element averages of solution (the array is passed to reactions in operator splitting).
Model::ModelEqData & data()
std::vector< Mat > stiffness_matrix
The stiffness matrix.
EqData data_
Field data for model parameters.
bool allocation_done
Indicates whether matrices have been preallocated.
std::vector< std::vector< double > > gamma
Penalty parameters.
FiniteElement< 1 > * fe1_
std::vector< Vec > ret_vec
Auxiliary vectors for calculation of sources in balance due to retardation (e.g. sorption).
FiniteElement< 3 > * fe3_
FiniteElement< 3 > * fe_rt3_
Discontinuous Galerkin method for equation of transport with dispersion.
std::vector< Vec > mass_vec
Mass from previous time instant (necessary when coefficients of mass matrix change in time)...
Class for representation of a vector of fields of the same physical quantity.
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
Base class for FEValues and FESideValues.
MappingP1< 1, 3 > * map1_
Auxiliary mappings of reference elements.
LinSys ** ls
Linear algebra system for the transport equation.
LinSys ** ls_dt
Linear algebra system for the time derivative (actually it is used only for handling the matrix struc...
Quadrature< 0 > * q0_
Quadratures used in assembling methods.
std::shared_ptr< DOFHandlerMultiDim > dh_
Object for distribution of dofs.