dune-pdelab  2.5-dev
Public Types | Public Member Functions | List of all members
Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap > Class Template Reference

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

Inheritance diagram for Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >:
Inheritance graph

Public Types

enum  { doPatternVolume = true }
 
enum  { doPatternSkeleton = true }
 
enum  { doAlphaVolume = true }
 
enum  { doAlphaSkeleton = true }
 
enum  { doAlphaBoundary = true }
 
enum  { doLambdaVolume = true }
 
typedef T::Traits::RangeFieldType RealType
 

Public Member Functions

 ConvectionDiffusionDG (T &param_, ConvectionDiffusionDGMethod::Type method_=ConvectionDiffusionDGMethod::NIPG, ConvectionDiffusionDGWeights::Type weights_=ConvectionDiffusionDGWeights::weightsOff, Real alpha_=0.0, int intorderadd_=0)
 constructor: pass parameter object and define DG-method More...
 
template<typename EG , typename LFSU , typename X , typename LFSV , typename R >
void alpha_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, R &r) const
 
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void jacobian_apply_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const
 
template<typename EG , typename LFSU , typename X , typename LFSV , typename M >
void jacobian_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, M &mat) const
 
template<typename IG , typename LFSU , typename X , typename LFSV , typename R >
void alpha_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, R &r_s, R &r_n) const
 
template<typename IG , typename LFSU , typename X , typename LFSV , typename Y >
void jacobian_apply_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, Y &y_s, Y &y_n) const
 
template<typename IG , typename LFSU , typename X , typename LFSV , typename M >
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, M &mat_ss, M &mat_sn, M &mat_ns, M &mat_nn) const
 
template<typename IG , typename LFSU , typename X , typename LFSV , typename R >
void alpha_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, R &r_s) const
 
template<typename IG , typename LFSU , typename X , typename LFSV , typename M >
void jacobian_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, M &mat_ss) const
 
template<typename EG , typename LFSV , typename R >
void lambda_volume (const EG &eg, const LFSV &lfsv, R &r) const
 
void setTime (Real t)
 set time in parameter class More...
 
void jacobian_apply_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, Y &y_s) const
 apply local jacobian of the boundaryterm More...
 
void jacobian_apply_boundary (const IG &ig, const LFSU &lfsu_s, const X &x_s, const X &z_s, const LFSV &lfsv_s, Y &y_s) const
 apply local jacobian of the boundaryterm More...
 
template<typename LFSU , typename LFSV , typename LocalPattern >
void pattern_skeleton (const LFSU &lfsu_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const LFSV &lfsv_n, LocalPattern &pattern_sn, LocalPattern &pattern_ns) const
 
template<typename LFSU , typename LFSV , typename LocalPattern >
void pattern_volume (const LFSU &lfsu, const LFSV &lfsv, LocalPattern &pattern) const
 
void setTime (T::Traits::RangeFieldType t_)
 set time for subsequent evaluation More...
 
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 More...
 
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:

Template Parameters
Tmodel of ConvectionDiffusionParameterInterface

Member Typedef Documentation

◆ RealType

typedef T::Traits::RangeFieldType Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::RealType
inherited

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called.

Enumerator
doPatternVolume 

◆ anonymous enum

anonymous enum
inherited

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.

Enumerator
doPatternVolumePostSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called.

Enumerator
doPatternSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called.

Enumerator
doPatternBoundary 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume().

Enumerator
doAlphaVolume 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton().

Enumerator
doAlphaVolumePostSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton().

Enumerator
doAlphaSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary().

Enumerator
doAlphaBoundary 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's lambda_volume().

Enumerator
doLambdaVolume 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's lambda_volume_post_skeleton().

Enumerator
doLambdaVolumePostSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's lambda_skeleton().

Enumerator
doLambdaSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's lambda_boundary().

Enumerator
doLambdaBoundary 

◆ anonymous enum

anonymous enum
inherited

Whether to visit the skeleton methods from both sides.

Enumerator
doSkeletonTwoSided 

◆ anonymous enum

template<typename T , typename FiniteElementMap >
anonymous enum
Enumerator
doPatternVolume 

◆ anonymous enum

template<typename T , typename FiniteElementMap >
anonymous enum
Enumerator
doPatternSkeleton 

◆ anonymous enum

template<typename T , typename FiniteElementMap >
anonymous enum
Enumerator
doAlphaVolume 

◆ anonymous enum

template<typename T , typename FiniteElementMap >
anonymous enum
Enumerator
doAlphaSkeleton 

◆ anonymous enum

template<typename T , typename FiniteElementMap >
anonymous enum
Enumerator
doAlphaBoundary 

◆ anonymous enum

template<typename T , typename FiniteElementMap >
anonymous enum
Enumerator
doLambdaVolume 

Constructor & Destructor Documentation

◆ ConvectionDiffusionDG()

template<typename T , typename FiniteElementMap >
Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::ConvectionDiffusionDG ( T &  param_,
ConvectionDiffusionDGMethod::Type  method_ = ConvectionDiffusionDGMethod::NIPG,
ConvectionDiffusionDGWeights::Type  weights_ = ConvectionDiffusionDGWeights::weightsOff,
Real  alpha_ = 0.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 OBB-method.

Member Function Documentation

◆ alpha_boundary()

template<typename T , typename FiniteElementMap >
template<typename IG , typename LFSU , typename X , typename LFSV , typename R >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::alpha_boundary ( const IG &  ig,
const LFSU &  lfsu_s,
const X &  x_s,
const LFSV &  lfsv_s,
R &  r_s 
) const
inline

◆ alpha_skeleton()

template<typename T , typename FiniteElementMap >
template<typename IG , typename LFSU , typename X , typename LFSV , typename R >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::alpha_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,
R &  r_s,
R &  r_n 
) const
inline

◆ alpha_volume()

template<typename T , typename FiniteElementMap >
template<typename EG , typename LFSU , typename X , typename LFSV , typename R >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::alpha_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
R &  r 
) const
inline

◆ getStage()

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

get current stage

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

◆ getTime()

T::Traits::RangeFieldType Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::getTime
inlineinherited

get current time

Returns
The time previously set by setTime().

◆ jacobian_apply_boundary() [1/2]

void Dune::PDELab::NumericalJacobianApplyBoundary< ConvectionDiffusionDG< T, FiniteElementMap > >::jacobian_apply_boundary ( const IG &  ig,
const LFSU &  lfsu_s,
const X &  x_s,
const LFSV &  lfsv_s,
Y &  y_s 
) const
inlineinherited

apply local jacobian of the boundaryterm

◆ jacobian_apply_boundary() [2/2]

void Dune::PDELab::NumericalNonlinearJacobianApplyBoundary< ConvectionDiffusionDG< T, FiniteElementMap > >::jacobian_apply_boundary ( const IG &  ig,
const LFSU &  lfsu_s,
const X &  x_s,
const X &  z_s,
const LFSV &  lfsv_s,
Y &  y_s 
) const
inlineinherited

apply local jacobian of the boundaryterm

◆ jacobian_apply_skeleton()

template<typename T , typename FiniteElementMap >
template<typename IG , typename LFSU , typename X , typename LFSV , typename Y >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::jacobian_apply_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,
Y &  y_s,
Y &  y_n 
) const
inline

◆ jacobian_apply_volume()

template<typename T , typename FiniteElementMap >
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::jacobian_apply_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
Y &  y 
) const
inline

◆ jacobian_boundary()

template<typename T , typename FiniteElementMap >
template<typename IG , typename LFSU , typename X , typename LFSV , typename M >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::jacobian_boundary ( const IG &  ig,
const LFSU &  lfsu_s,
const X &  x_s,
const LFSV &  lfsv_s,
M &  mat_ss 
) const
inline

◆ jacobian_skeleton()

template<typename T , typename FiniteElementMap >
template<typename IG , typename LFSU , typename X , typename LFSV , typename M >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::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,
M &  mat_ss,
M &  mat_sn,
M &  mat_ns,
M &  mat_nn 
) const
inline

◆ jacobian_volume()

template<typename T , typename FiniteElementMap >
template<typename EG , typename LFSU , typename X , typename LFSV , typename M >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::jacobian_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
M &  mat 
) const
inline

◆ lambda_volume()

template<typename T , typename FiniteElementMap >
template<typename EG , typename LFSV , typename R >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::lambda_volume ( const EG &  eg,
const LFSV &  lfsv,
R &  r 
) const
inline

◆ pattern_skeleton()

template<typename LFSU , typename LFSV , typename LocalPattern >
void Dune::PDELab::FullSkeletonPattern::pattern_skeleton ( const LFSU &  lfsu_s,
const LFSV &  lfsv_s,
const LFSU &  lfsu_n,
const LFSV &  lfsv_n,
LocalPattern &  pattern_sn,
LocalPattern &  pattern_ns 
) const
inlineinherited

◆ pattern_volume()

template<typename LFSU , typename LFSV , typename LocalPattern >
void Dune::PDELab::FullVolumePattern::pattern_volume ( const LFSU &  lfsu,
const LFSV &  lfsv,
LocalPattern &  pattern 
) const
inlineinherited

◆ postStage()

void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::postStage
inlineinherited

to be called once at the end of each stage

◆ 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.

◆ setTime() [1/2]

template<typename T , typename FiniteElementMap >
void Dune::PDELab::ConvectionDiffusionDG< T, FiniteElementMap >::setTime ( Real  t)
inline

set time in parameter class

◆ setTime() [2/2]

void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< T::Traits::RangeFieldType >::setTime ( T::Traits::RangeFieldType  t_)
inlineinherited

set time for subsequent evaluation

This method set the time for subsequent calls to the alpha_*(), lambda_*(), jacobian_*() and jacobian_apply_*() methods.

Note
For ExplicitOneStepMethod the time given here in the first stage may be incorrect, since the time step size is only finally determined after the first stage has been assembled.

◆ 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: