19 #ifndef TRANSPORT_DG_HH_ 20 #define TRANSPORT_DG_HH_ 35 template<
unsigned int dim,
unsigned int spacedim>
class FEValuesBase;
36 template<
unsigned int dim,
unsigned int spacedim>
class FiniteElement;
37 template<
unsigned int dim,
unsigned int spacedim>
class Mapping;
53 template<
unsigned int dim>
56 template<
unsigned int dim>
59 template<
unsigned int dim>
62 template<
unsigned int dim>
65 inline std::shared_ptr<DOFHandlerMultiDim>
dh();
91 std::shared_ptr<DOFHandlerMultiDim>
dh_;
130 template<
class Model>
135 class EqData :
public Model::ModelEqData {
182 void zero_time_step()
override;
190 void update_solution()
override;
202 void initialize()
override;
204 void calculate_cumulative_balance();
207 {
return ls[sbi]->get_solution(); }
210 {
return solution_elem_; }
212 void calculate_concentration_matrix();
214 void update_after_reactions(
bool solution_changed);
227 inline typename Model::ModelEqData &
data() {
return data_; }
229 void output_vector_gather();
239 void assemble_mass_matrix();
244 template<
unsigned int dim>
245 void assemble_mass_matrix();
254 void assemble_stiffness_matrix();
259 template<
unsigned int dim>
260 void assemble_volume_integrals();
272 template<
unsigned int dim>
278 template<
unsigned int dim>
279 void assemble_fluxes_boundary();
284 template<
unsigned int dim>
285 void assemble_fluxes_element_element();
290 template<
unsigned int dim>
291 void assemble_fluxes_element_side();
299 void set_boundary_conditions();
305 template<
unsigned int dim>
306 void set_boundary_conditions();
316 template<
unsigned int dim>
351 void set_DG_parameters_edge(
const Edge &edg,
363 double &transport_flux);
378 void set_DG_parameters_boundary(
const SideIter side,
390 void set_initial_condition();
396 template<
unsigned int dim>
397 void prepare_initial_condition();
Input::Record input_rec
Record with input specification.
Class MappingP1 implements the affine transformation of the unit cell onto the actual cell...
int IdxInt
Define integers that are indices into large arrays (elements, nodes, dofs etc.)
vector< VectorSeqDouble > output_vec
Array for storing the output solution data.
FiniteElement< dim, 3 > * fe()
vector< double > mm_coef
Mass matrix coefficients.
MappingP1< 3, 3 > * map3_
Transport with dispersion implemented using discontinuous Galerkin method.
Field< 3, FieldValue< 3 >::Integer > region_id
FiniteElement< 2, 3 > * fe_rt2_
Wrappers for linear systems based on MPIAIJ and MATIS format.
Class template representing a field with values dependent on: point, element, and region...
FiniteElement< 2, 3 > * fe2_
int dg_variant
DG variant ((non-)symmetric/incomplete.
FiniteElement< 3, 3 > * fe3_
vector< vector< arma::vec3 > > ad_coef
Advection coefficients.
std::shared_ptr< DOFHandlerMultiDim > dh()
vector< vector< vector< arma::mat33 > > > dif_coef_edg
Diffusion coefficients on edges.
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).
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()
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< 1, 3 > * fe_rt1_
Finite elements for the water velocity field.
Abstract class for the mapping between reference and actual cell.
FiniteElement< 1, 3 > * fe1_
Finite elements for the solution of the advection-diffusion equation.
Provides the numbering of the finite element degrees of freedom on the computational mesh...
std::vector< Vec > rhs
Vector of right hand side.
bool evaluate_time_constraint(double &time_constraint)
FiniteElement< dim, 3 > * fe_rt()
unsigned int dg_order
Polynomial order of finite elements.
The class for outputting data during time.
MappingP1< 2, 3 > * map2_
double ** solution_elem_
Element averages of solution (the array is passed to reactions in operator splitting).
Model::ModelEqData & data()
FiniteElement< 3, 3 > * fe_rt3_
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.
MappingP1< dim, 3 > * mapping()
std::vector< Vec > ret_vec
Auxiliary vectors for calculation of sources in balance due to retardation (e.g. sorption).
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.
Field< 3, FieldValue< 3 >::Integer > subdomain
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.
FEObjects(Mesh *mesh_, unsigned int fe_order)