DUNE PDELab (git)
Public Types | |
Flags selective assembly | |
enum | |
Whether to do selective assembly on the elements, i.e. whether or not skip_entity() should be called. | |
enum | |
Whether to do selective assembly on the intersections, i.e. whether or not skip_intersection() should be called. | |
Flags for the sparsity pattern | |
enum | |
Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called. | |
enum | |
Whether to assemble the pattern on the elements after the skeleton has been handled, i.e. whether or not pattern_volume_post_skeleton() should be called. | |
enum | |
Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called. | |
enum | |
Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called. | |
Flags for the non-constant part of the residual and the jacobian | |
enum | |
Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume(). | |
enum | |
Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton(). | |
enum | |
Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton(). | |
enum | |
Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary(). | |
Flags for the constant part of the residual | |
enum | |
Whether to call the local operator's lambda_volume(). | |
enum | |
Whether to call the local operator's lambda_volume_post_skeleton(). | |
enum | |
Whether to call the local operator's lambda_skeleton(). | |
enum | |
Whether to call the local operator's lambda_boundary(). | |
Special flags | |
enum | |
Whether to visit the skeleton methods from both sides. | |
enum | |
Wheter the local operator describes a linear problem. | |
Public Member Functions | |
template<typename IG , typename LFSU , typename X , typename LFSV , typename R > | |
void | alpha_skeleton (const IG &ig, const LFSU &lfsu_i, const X &x_i, const LFSV &lfsv_i, const LFSU &lfsu_o, const X &x_o, const LFSV &lfsv_o, R &r_i, R &r_o) const |
residual contribution from skeleton terms More... | |
void | jacobian_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Jacobian &mat) const |
compute local jacobian of the volume term | |
void | jacobian_skeleton (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const LFSV &lfsv_n, Jacobian &mat_ss, Jacobian &mat_sn, Jacobian &mat_ns, Jacobian &mat_nn) const |
compute local jacobian of the skeleton term | |
void | jacobian_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, Jacobian &mat_ss) const |
compute local jacobian of the boundary term | |
double | getTime () const |
get current time More... | |
void | preStep (RealType time, RealType dt, int stages) |
to be called once before each time step More... | |
void | postStep () |
to be called once at the end of each time step More... | |
void | preStage (RealType time, int r) |
to be called once before each stage More... | |
int | getStage () const |
get current stage More... | |
void | postStage () |
to be called once at the end of each stage | |
RealType | suggestTimestep (RealType dt) const |
to be called after stage 1 More... | |
Detailed Description
class LOP_spatial_contaminant< Param, GFSF, ZF, GFSC, ZC, convection >
a local operator for solving contaminant transport in porous medium using cell-centered finite volume method. Variables are molar concentrations in water C0, and C1. \phi is porosity, \vec{q_w} is water flux, D_* diffusion coefficient (no dispersion)
\begin{align*} \partial_t(\phi S_w C0) + \mathrm{div}[ \frac{\vec{q_w}}{\rho_w} C0 - D_1\nabla C0 ] &=& 0 \ x \in \Omega,\\ \partial_t(\phi S_w C1) + \mathrm{div}[ \frac{\vec{q_w}}{\rho_w} C1 - D_2\nabla C1 ] &=& 0 \ x \in \Omega,\\ C0 = C1_{ini}, C1 &=& C2_{ini} \ t=0 \\ (\frac{\vec{q_w}}{\rho_w} C0 - D_1\nabla C0) \cdot \nu &=& 0 \ x \in \Gamma_N \\ (\frac{\vec{q_w}}{\rho_w} C1 - D_2\nabla C1) \cdot \nu &=& 0 \ x \in \Gamma_N \\ C0 = C0_{inflow}, C1 &=& C1_{inflow} \ x \in \Gamma_{inflow} \\ \nabla C0 \cdot \nu = 0, \nabla C1 \cdot \nu &=& 0, \ x \in \Gamma_{free outflow} \end{align*}
- Examples
- recipe-operator-splitting.cc.
Member Function Documentation
◆ alpha_skeleton()
|
inline |
residual contribution from skeleton terms
[Read data]
- Examples
- recipe-operator-splitting.cc.
References Dune::Indices::_0, and Dune::Indices::_1.
◆ getStage()
|
inlineinherited |
get current stage
- Returns
- The current stage number previously set by preStage().
◆ getTime()
|
inlineinherited |
get current time
- Returns
- The time previously set by setTime().
◆ postStep()
|
inlineinherited |
to be called once at the end of each time step
- Note
- With the OneStepMethod and the ExplicitOneStepMetod, for reasons unknown this is only called for temporal but not for spatial local operators. With the MultiStepMethod this is called for all local operators.
◆ preStage()
|
inlineinherited |
to be called once before each stage
- Parameters
-
time Time of the stage r Number of the stage, r ∈ [1, nstages] inclusive, where nstages is the number of stage in the step given in the previous call to preStep()
- Note
- For ExplicitOneStepMethod the time given here for stage 1 may be incorrect, since the time step size is only finally determined after the first stage has been assembled.
- For the MultiStepMethod, this is called once after preStep() with r=1.
◆ preStep()
|
inlineinherited |
to be called once before each time step
- Parameters
-
time Time at beginning of the step. dt Size of time step. stages Number of stages to do in the step. For the MultiStepMethod this is always 1.
- Note
- For ExplicitOneStepMethod the dt given here may be incorrect, since the time step size is only finally determined after the first stage has been assembled.
-
For the MultiStepMethod the number of stages is given as
- Since there are no times of evaluation in the middle of the step, a multi-step method is similar to a one step method with one stage.
◆ suggestTimestep()
|
inlineinherited |
to be called after stage 1
- Note
- Only used by the ExplicitOneStepMethod.
This may be called on the spatial local operator in the case of an explicit one step scheme. It is called after stage 1 has been assembled (so the time given to preStep() may not apply anymore in this case). All the alpha_*() and lambda_*() methods should have been called, so they are a good place to generate the information returned here.
The documentation for this class was generated from the following file:
- doc/Recipes/recipe-operator-splitting.cc