|
| DiffusionAdvectionReaction (const constructor_value_type &tau=1.) |
| Constructor for local solver. More...
|
|
template<typename hyEdgeT , typename SmallMatInT , typename SmallMatOutT > |
SmallMatOutT & | trace_to_flux (const SmallMatInT &lambda_values_in, SmallMatOutT &lambda_values_out, hyEdgeT &hyper_edge, const lSol_float_t time=0.) const |
| Evaluate local contribution to matrix–vector multiplication. More...
|
|
template<typename hyEdgeT > |
std::array< unsigned int, 2 *hyEdge_dimT > | node_types (hyEdgeT &hyper_edge) const |
| Fill an array with 1 if the node is Dirichlet and 0 otherwise. More...
|
|
template<typename hyEdgeT , typename SmallMatInT , typename SmallMatOutT > |
SmallMatOutT & | residual_flux (const SmallMatInT &lambda_values_in, SmallMatOutT &lambda_values_out, hyEdgeT &hyper_edge, const lSol_float_t time=0.) const |
| Evaluate local contribution to residual \( A x - b \). More...
|
|
template<typename hyEdgeT , typename SmallMatT > |
SmallMatT & | make_initial (SmallMatT &lambda_values, hyEdgeT &hyper_edge, const lSol_float_t time=0.) const |
| Evaluate L2 projected lambda values at initial state. More...
|
|
template<typename hyEdgeT , typename SmallMatInT , typename SmallMatOutT > |
SmallMatOutT & | trace_to_mass_flux (const SmallMatInT &lambda_values_in, SmallMatOutT &lambda_values_out, hyEdgeT &hyper_edge, const lSol_float_t time=0.) const |
| Evaluate local contribution to mass matrix–vector multiplication. More...
|
|
template<typename hyEdgeT , typename SmallMatInT , typename SmallMatOutT > |
SmallMatOutT & | total_numerical_flux_mass (const SmallMatInT &lambda_values_in, SmallMatOutT &lambda_values_out, hyEdgeT &hyper_edge, const lSol_float_t time=0.) const |
| Evaluate local contribution to mass matrix–vector residual. More...
|
|
template<typename hyEdgeT , typename SmallMatT > |
std::array< lSol_float_t, 1U > | errors (const SmallMatT &lambda_values, hyEdgeT &hy_edge, const lSol_float_t time=0.) const |
| Calculate squared local contribution of L2 error. More...
|
|
template<typename hyEdgeT , typename SmallMatT > |
lSol_float_t | errors_temp (const SmallMatT &lambda_values_new, const SmallMatT &lambda_values_old, hyEdgeT &hy_edge, const lSol_float_t delta_t, const lSol_float_t time) const |
| Parabolic approximation version of local squared L2 error. More...
|
|
template<typename abscissa_float_t , std::size_t abscissas_sizeT, class input_array_t , class hyEdgeT > |
std::array< std::array< lSol_float_t, Hypercube< hyEdge_dimT >::pow(abscissas_sizeT)>, system_dim > | bulk_values (const std::array< abscissa_float_t, abscissas_sizeT > &abscissas, const input_array_t &lambda_values, hyEdgeT &hyper_edge, const lSol_float_t time=0.) const |
| Evaluate local reconstruction at tensorial products of abscissas. More...
|
|
|
template<typename hyEdgeT > |
SmallSquareMat< n_loc_dofs_, lSol_float_t > | assemble_loc_matrix (const lSol_float_t tau, hyEdgeT &hyper_edge, const lSol_float_t time) const |
| Assemble local matrix for the local solver. More...
|
|
template<typename hyEdgeT , typename SmallMatT > |
SmallVec< n_loc_dofs_, lSol_float_t > | assemble_rhs_from_lambda (const SmallMatT &lambda_values, hyEdgeT &hyper_edge) const |
| Assemble local right-hand for the local solver (from skeletal). More...
|
|
template<typename hyEdgeT > |
SmallVec< n_loc_dofs_, lSol_float_t > | assemble_rhs_from_global_rhs (hyEdgeT &hyper_edge, const lSol_float_t time) const |
| Assemble local right-hand for the local solver (from global right-hand side). More...
|
|
template<typename hyEdgeT , typename SmallVecT > |
SmallVec< n_loc_dofs_, lSol_float_t > | assemble_rhs_from_coeffs (const SmallVecT &coeffs, hyEdgeT &hyper_edge) const |
| Assemble local right-hand for the local solver (from volume function coefficients). More...
|
|
template<typename hyEdgeT , typename SmallMatT > |
SmallVec< n_loc_dofs_, lSol_float_t > | solve_local_problem (const SmallMatT &lambda_values, const unsigned int solution_type, hyEdgeT &hyper_edge, const lSol_float_t time) const |
| Solve local problem (with right-hand side from skeletal). More...
|
|
template<typename hyEdgeT , typename SmallMatT > |
SmallVec< n_loc_dofs_, lSol_float_t > | solve_mass_problem (const SmallMatT &lambda_values, hyEdgeT &hyper_edge, const lSol_float_t time) const |
| Solve local problem for mass matrix approximation. More...
|
|
template<typename hyEdgeT , typename SmallMatT , typename SmallVecT > |
SmallVec< n_loc_dofs_, lSol_float_t > | solve_loc_prob_cor (const SmallMatT &lambda_values, const SmallVecT &coeffs, hyEdgeT &hyper_edge, const lSol_float_t delta_time, const lSol_float_t time) const |
| Solve local problem for parabolic approximations. More...
|
|
template<typename hyEdgeT > |
SmallMat< 2 *hyEdge_dimT, n_shape_bdr_, lSol_float_t > | primal_at_boundary (const SmallVec< n_loc_dofs_, lSol_float_t > &coeffs, hyEdgeT &hyper_edge) const |
| Evaluate primal variable at boundary. More...
|
|
template<typename hyEdgeT > |
SmallMat< 2 *hyEdge_dimT, n_shape_bdr_, lSol_float_t > | dual_at_boundary (const SmallVec< n_loc_dofs_, lSol_float_t > &coeffs, hyEdgeT &hyper_edge) const |
| Evaluate dual variable at boundary. More...
|
|
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
class LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >
Local solver diffusion equation on hypergraph.
This class contains the local solver for an isotropic diffusion equation, i.e.,
\[ - \nabla \cdot ( d \nabla u ) = f \quad \text{ in } \Omega, \qquad u = u_\text D \quad \text{ on } \partial \Omega_\text D, \qquad - d \nabla u \cdot \nu = g_\text N \quad \text{ on } \partial \Omega_\text N \]
in a spatial domain \(\Omega \subset \mathbb R^d\). Here, \(d\) is the spatial dimension space_dim
, \(\Omega\) is a regular graph (hyEdge_dimT
= 1) or hypergraph whose hyperedges are surfaces (hyEdge_dimT
= 2) or volumes (hyEdge_dimT
= 3) or hypervolumes (in case of hyEdge_dimT
> 3). \(f\) and \(d\) are scalars defined in the whole domain, the Dirichlet and Neumann boundary data needs to be defined on their respective hypernodes.
Moreover, this class provides the functions that approximate the condensed mass matrix. By this, it is possible to approximate parabolic problems (in a very bad way) and to find good starting values for the nonlinear eigenvalue problem.
- Template Parameters
-
hyEdge_dimT | Dimension of a hyperedge, i.e., 1 is for PDEs defined on graphs, 2 is for PDEs defined on surfaces, and 3 is for PDEs defined on volumes. |
poly_deg | The polynomial degree of test and trial functions. |
quad_deg | The order of the quadrature rule. |
parametersT | Struct depending on templates space_dimTP and lSol_float_TP that contains static parameter functions. Defaults to above functions included in DiffusionAdvectionReactionParametersDefault . |
lSol_float_t | The floating point type calculations are executed in. Defaults to double. |
- Authors
- Guido Kanschat, Heidelberg University, 2019–2020.
-
Andreas Rupp, Heidelberg University, 2019–2020.
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallVecT >
Assemble local right-hand for the local solver (from volume function coefficients).
Note that we basically follow the lines of
B. Cockburn, J. Gopalakrishnan, and R. Lazarov. Unified hybridization of discontinuous Galerkin, mixed, and continuous Galerkin methods for second order elliptic problems. SIAM Journal on Numerical Analysis, 47(2):1319–1365, 2009
and discriminate between local solvers with respect to the skeletal variable and with respect to the global right-hand side. This assembles the local right-hand side with respect to the global right-hand side. This function implicitly uses the parameters.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallVecT | The data type of the coefficients. |
- Parameters
-
coeffs | Local coefficients of bulk variable u. |
hyper_edge | The geometry of the considered hyperedge (of typename GeomT). |
- Return values
-
loc_rhs | Local right hand side of the locasl solver. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT >
Assemble local right-hand for the local solver (from global right-hand side).
Note that we basically follow the lines of
B. Cockburn, J. Gopalakrishnan, and R. Lazarov. Unified hybridization of discontinuous Galerkin, mixed, and continuous Galerkin methods for second order elliptic problems. SIAM Journal on Numerical Analysis, 47(2):1319–1365, 2009
and discriminate between local solvers with respect to the skeletal variable and with respect to the global right-hand side. This assembles the local right-hand side with respect to the global right-hand side. This function implicitly uses the parameters.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
- Parameters
-
hyper_edge | The geometry of the considered hyperedge (of typename GeomT). |
time | Point of time, rhs is evaluated at |
- Return values
-
loc_rhs | Local right hand side of the locasl solver. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatT >
Assemble local right-hand for the local solver (from skeletal).
The right hand side needs the values of the global degrees of freedom. Note that we basically follow the lines of
B. Cockburn, J. Gopalakrishnan, and R. Lazarov. Unified hybridization of discontinuous Galerkin, mixed, and continuous Galerkin methods for second order elliptic problems. SIAM Journal on Numerical Analysis, 47(2):1319–1365, 2009
and discriminate between local solvers with respect to the skeletal variable and with respect to the global right-hand side. This assembles the local right-hand side with respect to the skeletal variable.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallMatT | The data type of the lambda values. |
- Parameters
-
lambda_values | Global degrees of freedom associated to the hyperedge. |
hyper_edge | The geometry of the considered hyperedge (of typename GeomT). |
- Return values
-
loc_rhs | Local right hand side of the locasl solver. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename abscissa_float_t , std::size_t abscissas_sizeT, class input_array_t , class hyEdgeT >
std::array<std::array<lSol_float_t, Hypercube<hyEdge_dimT>::pow(abscissas_sizeT)>, system_dim> LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::bulk_values |
( |
const std::array< abscissa_float_t, abscissas_sizeT > & |
abscissas, |
|
|
const input_array_t & |
lambda_values, |
|
|
hyEdgeT & |
hyper_edge, |
|
|
const lSol_float_t |
time = 0. |
|
) |
| const |
Evaluate local reconstruction at tensorial products of abscissas.
- Template Parameters
-
absc_float_t | Floating type for the abscissa values. |
abscissas_sizeT | Size of the array of array of abscissas. |
input_array_t | Type of input array. |
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
- Parameters
-
abscissas | Abscissas of the supporting points. |
lambda_values | The values of the skeletal variable's coefficients. |
hyper_edge | The geometry of the considered hyperedge (of typename GeomT). |
time | Time at which analytic functions are evaluated. |
- Return values
-
function_values | Function values at quadrature points. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT >
Evaluate dual variable at boundary.
Function to evaluate dual variable of the solution. This function is needed to calculate the local numerical fluxes.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
- Parameters
-
coeffs | Coefficients of the local solution. |
hyper_edge | The geometry of the considered hyperedge (of typename GeomT). |
- Return values
-
bdr_coeffs | Coefficients of respective (dim-1) dimensional function at boundaries. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatT >
std::array<lSol_float_t, 1U> LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::errors |
( |
const SmallMatT & |
lambda_values, |
|
|
hyEdgeT & |
hy_edge, |
|
|
const lSol_float_t |
time = 0. |
|
) |
| const |
|
inline |
Calculate squared local contribution of L2 error.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallMatT | Data type of lambda_values . |
- Parameters
-
lambda_values | The values of the skeletal variable's coefficients. |
hy_edge | The geometry of the considered hyperedge (of typename GeomT). |
time | Time at which anaytic functions are evaluated. |
- Return values
-
vec_b | Local part of vector b. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatT >
lSol_float_t LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::errors_temp |
( |
const SmallMatT & |
lambda_values_new, |
|
|
const SmallMatT & |
lambda_values_old, |
|
|
hyEdgeT & |
hy_edge, |
|
|
const lSol_float_t |
delta_t, |
|
|
const lSol_float_t |
time |
|
) |
| const |
|
inline |
Parabolic approximation version of local squared L2 error.
- Note
- This function is not used for elliptic problems.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallMatT | Data type of lambda_values . |
- Parameters
-
lambda_values_new | Abscissas of the supporting points. |
lambda_values_old | The values of the skeletal variable's coefficients. |
hy_edge | The geometry of the considered hyperedge (of typename GeomT). |
delta_t | Time step size. |
time | Time. |
- Return values
-
vec_b | Local part of vector b. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatT >
SmallMatT& LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::make_initial |
( |
SmallMatT & |
lambda_values, |
|
|
hyEdgeT & |
hyper_edge, |
|
|
const lSol_float_t |
time = 0. |
|
) |
| const |
|
inline |
Evaluate L2 projected lambda values at initial state.
- Note
- This function is not used for elliptic problems.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallMatT | Data type of lambda_values . |
- Parameters
-
lambda_values | Local part of vector x. |
hyper_edge | The geometry of the considered hyperedge (of typename hyEdgeT). |
time | Initial time. |
- Return values
-
lambda_vakues | L2 projected lambda ar initial state. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT >
Evaluate primal variable at boundary.
Function to evaluate primal variable of the solution. This function is needed to calculate the local numerical fluxes.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
- Parameters
-
coeffs | Coefficients of the local solution. |
hyper_edge | The geometry of the considered hyperedge (of typename GeomT). |
- Return values
-
bdr_coeffs | Coefficients of respective (dim-1) dimensional function at boundaries. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatInT , typename SmallMatOutT >
SmallMatOutT& LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::residual_flux |
( |
const SmallMatInT & |
lambda_values_in, |
|
|
SmallMatOutT & |
lambda_values_out, |
|
|
hyEdgeT & |
hyper_edge, |
|
|
const lSol_float_t |
time = 0. |
|
) |
| const |
|
inline |
Evaluate local contribution to residual \( A x - b \).
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallMatInT | Data type of lambda_values_in . |
SmallMatOutT | Data type of lambda_values_out . |
- Parameters
-
lambda_values_in | Local part of vector x. |
lambda_values_out | Local part that will be added to A * x. |
hyper_edge | The geometry of the considered hyperedge (of typename hyEdgeT). |
time | Time at which analytic functions are evaluated. |
- Return values
-
vecAx | Local part of vector A * x - b. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatT , typename SmallVecT >
SmallVec<n_loc_dofs_, lSol_float_t> LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::solve_loc_prob_cor |
( |
const SmallMatT & |
lambda_values, |
|
|
const SmallVecT & |
coeffs, |
|
|
hyEdgeT & |
hyper_edge, |
|
|
const lSol_float_t |
delta_time, |
|
|
const lSol_float_t |
time |
|
) |
| const |
|
inlineprivate |
Solve local problem for parabolic approximations.
- Note
- This function is not use for elliptic problems.
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatInT , typename SmallMatOutT >
SmallMatOutT& LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::total_numerical_flux_mass |
( |
const SmallMatInT & |
lambda_values_in, |
|
|
SmallMatOutT & |
lambda_values_out, |
|
|
hyEdgeT & |
hyper_edge, |
|
|
const lSol_float_t |
time = 0. |
|
) |
| const |
|
inline |
Evaluate local contribution to mass matrix–vector residual.
- Note
- This function is not used for elliptic problems.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallMatInT | Data type of lambda_values_in . |
SmallMatOutT | Data type of \¢ lambda_values_out |
- Parameters
-
lambda_values_in | Local part of vector x. |
lambda_values_out | Local part that will be added to A * x. |
hyper_edge | The geometry of the considered hyperedge (of typename hyEdgeT). |
time | Time. |
- Return values
-
vecAx | Local part of mass matrix residual. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatInT , typename SmallMatOutT >
SmallMatOutT& LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::trace_to_flux |
( |
const SmallMatInT & |
lambda_values_in, |
|
|
SmallMatOutT & |
lambda_values_out, |
|
|
hyEdgeT & |
hyper_edge, |
|
|
const lSol_float_t |
time = 0. |
|
) |
| const |
|
inline |
Evaluate local contribution to matrix–vector multiplication.
Execute matrix–vector multiplication y = A * x, where x represents the vector containing the skeletal variable (adjacent to one hyperedge), and A is the condensed matrix arising from the HDG discretization. This function does this multiplication (locally) for one hyperedge. The hyperedge is no parameter, since all hyperedges are assumed to have the same properties.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallMatInT | Data type of lambda_values_in . |
SmallMatOutT | Data type of lambda_values_out . |
- Parameters
-
lambda_values_in | Local part of vector x. |
lambda_values_out | Local part that will be added to A * x. |
hyper_edge | The geometry of the considered hyperedge (of typename GeomT). |
time | Time. |
- Return values
-
vecAx | Local part of vector A * x. |
template<unsigned int hyEdge_dimT, unsigned int poly_deg, unsigned int quad_deg, template< unsigned int, typename > typename parametersT = DiffusionAdvectionReactionParametersDefault, typename lSol_float_t = double>
template<typename hyEdgeT , typename SmallMatInT , typename SmallMatOutT >
SmallMatOutT& LocalSolver::DiffusionAdvectionReaction< hyEdge_dimT, poly_deg, quad_deg, parametersT, lSol_float_t >::trace_to_mass_flux |
( |
const SmallMatInT & |
lambda_values_in, |
|
|
SmallMatOutT & |
lambda_values_out, |
|
|
hyEdgeT & |
hyper_edge, |
|
|
const lSol_float_t |
time = 0. |
|
) |
| const |
|
inline |
Evaluate local contribution to mass matrix–vector multiplication.
- Note
- This function is not used for elliptic problems.
- Template Parameters
-
hyEdgeT | The geometry type / typename of the considered hyEdge's geometry. |
SmallMatInT | Data type of lambda_values_in . |
SmallMatOutT | Data type of lambda_values_out . |
- Parameters
-
lambda_values_in | Local part of vector x. |
lambda_values_out | Local part that will be added to A * x- |
hyper_edge | The geometry of the considered hyperedge (of typename hyEdgeT). |
time | Time at which analytic functions are evaluated. |
- Return values
-
vecAx | Local part of vector A * x. |