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();
113 std::shared_ptr<DiscreteSpace>
ds_;
116 std::shared_ptr<DOFHandlerMultiDim>
dh_;
155 template<
class Model>
160 class EqData :
public Model::ModelEqData {
207 void zero_time_step()
override;
215 void update_solution()
override;
227 void initialize()
override;
229 void calculate_cumulative_balance();
232 {
return ls[sbi]->get_solution(); }
235 {
return solution_elem_; }
237 void calculate_concentration_matrix();
239 void update_after_reactions(
bool solution_changed);
252 inline typename Model::ModelEqData &
data() {
return data_; }
262 void assemble_mass_matrix();
267 template<
unsigned int dim>
268 void assemble_mass_matrix();
277 void assemble_stiffness_matrix();
282 template<
unsigned int dim>
283 void assemble_volume_integrals();
295 template<
unsigned int dim>
301 template<
unsigned int dim>
302 void assemble_fluxes_boundary();
307 template<
unsigned int dim>
308 void assemble_fluxes_element_element();
313 template<
unsigned int dim>
314 void assemble_fluxes_element_side();
322 void set_boundary_conditions();
328 template<
unsigned int dim>
329 void set_boundary_conditions();
339 template<
unsigned int dim>
370 void set_DG_parameters_boundary(
Side side,
382 void set_initial_condition();
388 template<
unsigned int dim>
389 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...
std::shared_ptr< DOFHandlerMultiDim > dh_
Object for distribution of dofs.