Flow123d
release_3.0.0-968-gc87a28e79
|
Go to the documentation of this file.
19 #ifndef TRANSPORT_DG_HH_
20 #define TRANSPORT_DG_HH_
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 {
255 inline typename Model::ModelEqData &
data() {
return data_; }
270 template<
unsigned int dim>
285 template<
unsigned int dim>
298 template<
unsigned int dim>
304 template<
unsigned int dim>
310 template<
unsigned int dim>
316 template<
unsigned int dim>
331 template<
unsigned int dim>
342 template<
unsigned int dim>
389 double &transport_flux);
422 template<
unsigned int dim>
FEObjects(Mesh *mesh_, unsigned int fe_order)
void assemble_mass_matrix()
Assembles the mass matrix.
const Vec & get_solution()
vector< VectorMPI > output_vec
Array for storing the output solution data.
EquationOutput output_fields
int dg_variant
DG variant ((non-)symmetric/incomplete.
~TransportDG()
Destructor.
void set_DG_parameters_edge(const Edge &edg, const int s1, const int s2, const int K_size, const std::vector< arma::mat33 > &K1, const std::vector< arma::mat33 > &K2, const std::vector< double > &fluxes, const arma::vec3 &normal_vector, const double alpha1, const double alpha2, double &gamma, double *omega, double &transport_flux)
Calculates the dispersivity (diffusivity) tensor from the velocity field.
void set_boundary_conditions()
Assembles the r.h.s. components corresponding to the Dirichlet boundary conditions.
vector< double > mm_coef
Mass matrix coefficients.
FiniteElement< dim > * fe_rt()
vector< vector< arma::vec3 > > ad_coef
Advection coefficients.
void assemble_fluxes_element_side()
Assembles the fluxes between elements of different dimensions.
MappingP1< 1, 3 > * map1_
Auxiliary mappings of reference elements.
MultiField< 3, FieldValue< 3 >::Scalar > fracture_sigma
Transition parameter for diffusive transfer on fractures (for each substance).
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
FiniteElement< 1 > * fe1_
Input::Record input_rec
Record with input specification.
void prepare_initial_condition()
Assembles the auxiliary linear system to calculate the initial solution as L^2-projection of the pres...
const Vec & get_solution(unsigned int sbi)
void assemble_fluxes_element_element()
Assembles the fluxes between elements of the same dimension.
void get_par_info(LongIdx *&el_4_loc, Distribution *&el_ds)
Wrappers for linear systems based on MPIAIJ and MATIS format.
MultiField< 3, FieldValue< 3 >::Scalar > dg_penalty
Penalty enforcing inter-element continuity of solution (for each substance).
FiniteElement< 0 > * fe0_
Finite elements for the solution of the advection-diffusion equation.
void update_solution() override
Computes the solution in one time instant.
Field< 3, FieldValue< 3 >::Scalar > region_id
vector< vector< vector< arma::mat33 > > > dif_coef_edg
Diffusion coefficients on edges.
FiniteElement< dim > * fe()
vector< double > ret_sources_prev
void set_initial_condition()
Sets the initial condition.
std::vector< Mat > mass_matrix
The mass matrix.
void calculate_cumulative_balance()
void assemble_fluxes_boundary()
Assembles the fluxes on the boundary.
TransportDG(Mesh &init_mesh, const Input::Record in_rec)
Constructor.
void assemble_stiffness_matrix()
Assembles the stiffness matrix.
std::vector< Vec > rhs
Vector of right hand side.
void output_data()
Postprocesses the solution and writes to output file.
bool evaluate_time_constraint(double &time_constraint)
double ** get_concentration_matrix()
Abstract class for the mapping between reference and actual cell.
unsigned int dg_order
Polynomial order of finite elements.
FiniteElement< 2 > * fe2_
FiniteElement< 3 > * fe_rt3_
vector< vector< double > > ret_coef
Retardation coefficient due to sorption.
Provides the numbering of the finite element degrees of freedom on the computational mesh.
void initialize() override
MappingP1< 3, 3 > * map3_
static const Input::Type::Selection & get_dg_variant_selection_input_type()
Input type for the DG variant selection.
FEObjects * feo
Finite element objects.
The class for outputting data during time.
std::shared_ptr< DOFHandlerMultiDim > dh()
EqData data_
Field data for model parameters.
bool allocation_done
Indicates whether matrices have been preallocated.
FiniteElement< 3 > * fe3_
vector< vector< vector< arma::vec3 > > > ad_coef_edg
Advection coefficients on edges.
Discontinuous Galerkin method for equation of transport with dispersion.
MappingP1< 2, 3 > * map2_
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
vector< vector< arma::mat33 > > dif_coef
Diffusion coefficients.
Base class for FEValues and FESideValues.
static const int registrar
Registrar of class to factory.
Transport with dispersion implemented using discontinuous Galerkin method.
Field< 3, FieldValue< 3 >::Scalar > subdomain
std::vector< Mat > stiffness_matrix
The stiffness matrix.
std::shared_ptr< DiscreteSpace > ds_
FiniteElement< 2 > * fe_rt2_
void update_after_reactions(bool solution_changed)
void assemble_volume_integrals()
Assembles the volume integrals into the stiffness matrix.
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.
std::vector< Vec > ret_vec
Auxiliary vectors for calculation of sources in balance due to retardation (e.g. sorption).
double ** solution_elem_
Element averages of solution (the array is passed to reactions in operator splitting).
std::shared_ptr< DOFHandlerMultiDim > dh_
Object for distribution of dofs.
Class for representation of a vector of fields of the same physical quantity.
LinSys ** ls
Linear algebra system for the transport equation.
std::vector< std::vector< double > > gamma
Penalty parameters.
LinSys ** ls_dt
Linear algebra system for the time derivative (actually it is used only for handling the matrix struc...
void set_DG_parameters_boundary(const SideIter side, const int K_size, const std::vector< arma::mat33 > &K, const double flux, const arma::vec3 &normal_vector, const double alpha, double &gamma)
Sets up parameters of the DG method on a given boundary edge.
Quadrature< 0 > * q0_
Quadratures used in assembling methods.
std::vector< Vec > mass_vec
Mass from previous time instant (necessary when coefficients of mass matrix change in time).
Discontinuous Galerkin method for equation of transport with dispersion.
void zero_time_step() override
Initialize solution in the zero time.
Class MappingP1 implements the affine transformation of the unit cell onto the actual cell.
Model::ModelEqData & data()
Class template representing a field with values dependent on: point, element, and region.
void calculate_velocity(const ElementAccessor< 3 > &cell, std::vector< arma::vec3 > &velocity, FEValuesBase< dim, 3 > &fv)
Calculates the velocity field on a given dim dimensional cell.
static const Input::Type::Record & get_input_type()
Declare input record type for the equation TransportDG.
Base class for quadrature rules on simplices in arbitrary dimensions.
vector< double > ret_sources
Temporary values of increments due to retardation (e.g. sorption)
MappingP1< dim, 3 > * mapping()
void calculate_concentration_matrix()
FiniteElement< 1 > * fe_rt1_
Finite elements for the water velocity field.
void set_sources()
Assembles the right hand side due to volume sources.