DUNE PDELab (git)

Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap > Class Template Reference

#include <dune/pdelab/localoperator/convectiondiffusiondg.hh>

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

 ConvectionDiffusionDG (T &param_, ConvectionDiffusionDGMethod::Type method_=ConvectionDiffusionDGMethod::SIPG, ConvectionDiffusionDGWeights::Type weights_=ConvectionDiffusionDGWeights::weightsOn, Real alpha_=1.0, int intorderadd_=0)
 constructor: pass parameter object and define DG-method More...
 
void setTime (Real t)
 set time in parameter class
 
T::Traits::RangeFieldType 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

template<typename T, typename FiniteElementMap>
class Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >

a local operator for solving the convection-diffusion equation with discontinuous Galerkin

\begin{align*} \nabla\cdot(-A(x) \nabla u + b(x) u) + c(x)u &=& f \mbox{ in } \Omega, \\ u &=& g \mbox{ on } \partial\Omega_D \\ (b(x) u - A(x)\nabla u) \cdot n &=& j \mbox{ on } \partial\Omega_N \\ -(A(x)\nabla u) \cdot n &=& o \mbox{ on } \partial\Omega_O \end{align*}

Note:

  • This formulation is valid for velocity fields which are non-divergence free.
  • Outflow boundary conditions should only be set on the outflow boundary
  • This implementiation does not work with polynomial degree 0. Use ConvectionDiffusionCCFV in this case.
Template Parameters
Tmodel of ConvectionDiffusionParameterInterface

Constructor & Destructor Documentation

◆ ConvectionDiffusionDG()

template<typename T , typename FiniteElementMap >
Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::ConvectionDiffusionDG ( T &  param_,
ConvectionDiffusionDGMethod::Type  method_ = ConvectionDiffusionDGMethod::SIPG,
ConvectionDiffusionDGWeights::Type  weights_ = ConvectionDiffusionDGWeights::weightsOn,
Real  alpha_ = 1.0,
int  intorderadd_ = 0 
)
inline

constructor: pass parameter object and define DG-method

Parameters
[in]param_Reference to parameter object.
[in]method_Interior penalty Galerkin method. Default is skew-symmetric.
[in]weights_Weighted averages for diffusion tensor. Default is no weighting.
[in]alpha_Penalization constant. Default is zero.

Collecting the input parameters above, the default is the weighted SIPG with a penalty factor of 1.

Member Function Documentation

◆ getStage()

int Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::getStage ( ) const
inlineinherited

get current stage

Returns
The current stage number previously set by preStage().

◆ getTime()

T::Traits::RangeFieldType Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::getTime ( ) const
inlineinherited

get current time

Returns
The time previously set by setTime().

◆ postStep()

void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::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()

void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::preStage ( RealType  time,
int  r 
)
inlineinherited

to be called once before each stage

Parameters
timeTime of the stage
rNumber 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()

void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::preStep ( RealType  time,
RealType  dt,
int  stages 
)
inlineinherited

to be called once before each time step

Parameters
timeTime at beginning of the step.
dtSize of time step.
stagesNumber 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
  1. 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()

RealType Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::suggestTimestep ( RealType  dt) const
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:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)