19 #ifndef TRANSPORT_DG_HH_ 20 #define TRANSPORT_DG_HH_ 25 #include <boost/exception/info.hpp> 57 template<
unsigned int dim,
unsigned int spacedim>
class FEValuesBase;
59 template<
unsigned int dim,
unsigned int spacedim>
class Mapping;
61 namespace Input {
namespace Type {
class Selection; } }
76 template<
unsigned int dim>
79 template<
unsigned int dim>
82 template<
unsigned int dim>
85 template<
unsigned int dim>
88 inline std::shared_ptr<DOFHandlerMultiDim> dh();
111 std::shared_ptr<DiscreteSpace>
ds_;
114 std::shared_ptr<DOFHandlerMultiDim>
dh_;
153 template<
class Model>
158 class EqData :
public Model::ModelEqData {
205 void zero_time_step()
override;
213 void update_solution()
override;
225 void initialize()
override;
227 void calculate_cumulative_balance();
230 {
return ls[sbi]->get_solution(); }
233 {
return solution_elem_; }
235 void calculate_concentration_matrix();
237 void update_after_reactions(
bool solution_changed);
250 inline typename Model::ModelEqData &
data() {
return data_; }
260 void assemble_mass_matrix();
265 template<
unsigned int dim>
266 void assemble_mass_matrix();
275 void assemble_stiffness_matrix();
280 template<
unsigned int dim>
281 void assemble_volume_integrals();
293 template<
unsigned int dim>
299 template<
unsigned int dim>
300 void assemble_fluxes_boundary();
305 template<
unsigned int dim>
306 void assemble_fluxes_element_element();
311 template<
unsigned int dim>
312 void assemble_fluxes_element_side();
320 void set_boundary_conditions();
326 template<
unsigned int dim>
327 void set_boundary_conditions();
337 template<
unsigned int dim>
368 void set_DG_parameters_boundary(
Side side,
380 void set_initial_condition();
386 template<
unsigned int dim>
387 void prepare_initial_condition();
390 void output_region_statistics();
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.
bool evaluate_time_constraint(double &)
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.
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...
std::shared_ptr< DOFHandlerMultiDim > dh_
Object for distribution of dofs.