dune-pdelab  2.0.0
Public Types | Public Member Functions | Protected Attributes | List of all members
Dune::PDELab::InstationaryPoisson< Time, F, B, J > Class Template Reference

a local operator for solving the Poisson equation in instationary problems More...

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

Inheritance diagram for Dune::PDELab::InstationaryPoisson< Time, F, B, J >:
Inheritance graph

Public Types

enum  { doPatternVolume = true }
 
enum  { doAlphaVolume = true }
 
enum  { doLambdaVolume = true }
 
enum  { doLambdaBoundary = true }
 
typedef Time RealType
 
Flags for the sparsity pattern
enum  { doPatternVolume }
 Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called. More...
 
enum  { doPatternVolumePostSkeleton }
 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. More...
 
enum  { doPatternSkeleton }
 Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called. More...
 
enum  { doPatternBoundary }
 Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called. More...
 
Flags for the non-constant part of the residual and the jacobian
enum  { doAlphaVolume }
 Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume(). More...
 
enum  { doAlphaVolumePostSkeleton }
 Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton(). More...
 
enum  { doAlphaSkeleton }
 Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton(). More...
 
enum  { doAlphaBoundary }
 Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary(). More...
 
Flags for the constant part of the residual
enum  { doLambdaVolume }
 Whether to call the local operator's lambda_volume(). More...
 
enum  { doLambdaVolumePostSkeleton }
 Whether to call the local operator's lambda_volume_post_skeleton(). More...
 
enum  { doLambdaSkeleton }
 Whether to call the local operator's lambda_skeleton(). More...
 
enum  { doLambdaBoundary }
 Whether to call the local operator's lambda_boundary(). More...
 
Special flags
enum  { doSkeletonTwoSided }
 Whether to visit the skeleton methods from both sides. More...
 

Public Member Functions

 InstationaryPoisson (F &f_, B &bctype_, J &j_, unsigned int quadOrder)
 construct InstationaryPoisson More...
 
void setTime (Time t)
 set the time for subsequent evaluation on the parameter functions 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 M >
void jacobian_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, M &matrix) const
 Compute the Laplace stiffness matrix for the element given in 'eg'. More...
 
template<typename EG , typename LFSV , typename R >
void lambda_volume (const EG &eg, const LFSV &lfsv, R &r) const
 
template<typename IG , typename LFSV , typename R >
void lambda_boundary (const IG &ig, const LFSV &lfsv, R &r) const
 
void jacobian_apply_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const
 apply local jacobian of the volume term More...
 
template<typename LFSU , typename LFSV , typename LocalPattern >
void pattern_volume (const LFSU &lfsu, const LFSV &lfsv, LocalPattern &pattern) const
 
Time 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...
 

Protected Attributes

F & f
 
B & bctype
 
J & j
 
Laplace laplace_
 
unsigned int quadOrder_
 

Detailed Description

template<typename Time, typename F, typename B, typename J>
class Dune::PDELab::InstationaryPoisson< Time, F, B, J >

a local operator for solving the Poisson equation in instationary problems

\begin{align*} - \Delta u &=& f \mbox{ in } \Omega, \\ u &=& g \mbox{ on } \partial\Omega_D \\ -\nabla u \cdot \nu &=& j \mbox{ on } \partial\Omega_N \\ \end{align*}

with conforming finite elements on all types of grids in any dimension

Template Parameters
FGrid function type giving f
BGrid function type selecting boundary condition
JGrid function type giving j
Note
The grid functions need to support the member function setTime().

Member Typedef Documentation

Member Enumeration Documentation

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
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
inherited

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

Enumerator
doPatternSkeleton 
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
inherited

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

Enumerator
doAlphaVolume 
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
inherited

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

Enumerator
doAlphaSkeleton 
anonymous enum
inherited

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

Enumerator
doAlphaBoundary 
anonymous enum
inherited

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

Enumerator
doLambdaVolume 
anonymous enum
inherited

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

Enumerator
doLambdaVolumePostSkeleton 
anonymous enum
inherited

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

Enumerator
doLambdaSkeleton 
anonymous enum
inherited

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

Enumerator
doLambdaBoundary 
anonymous enum
inherited

Whether to visit the skeleton methods from both sides.

Enumerator
doSkeletonTwoSided 
template<typename F , typename B , typename J >
anonymous enum
inherited
Enumerator
doPatternVolume 
template<typename F , typename B , typename J >
anonymous enum
inherited
Enumerator
doAlphaVolume 
template<typename F , typename B , typename J >
anonymous enum
inherited
Enumerator
doLambdaVolume 
template<typename F , typename B , typename J >
anonymous enum
inherited
Enumerator
doLambdaBoundary 

Constructor & Destructor Documentation

template<typename Time , typename F , typename B , typename J >
Dune::PDELab::InstationaryPoisson< Time, F, B, J >::InstationaryPoisson ( F &  f_,
B &  bctype_,
J &  j_,
unsigned int  quadOrder 
)
inline

Member Function Documentation

template<typename F , typename B , typename J >
template<typename EG , typename LFSU , typename X , typename LFSV , typename R >
void Dune::PDELab::Poisson< F, B, J >::alpha_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
R &  r 
) const
inlineinherited
int Dune::PDELab::InstationaryLocalOperatorDefaultMethods< Time >::getStage ( ) const
inlineinherited

get current stage

Returns
The current stage number previously set by preStage().
Time Dune::PDELab::InstationaryLocalOperatorDefaultMethods< Time >::getTime ( ) const
inlineinherited

get current time

Returns
The time previously set by setTime().
void Dune::PDELab::NumericalJacobianApplyVolume< Poisson< F, B, J > >::jacobian_apply_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
Y &  y 
) const
inlineinherited

apply local jacobian of the volume term

template<typename F , typename B , typename J >
template<typename EG , typename LFSU , typename X , typename LFSV , typename M >
void Dune::PDELab::Poisson< F, B, J >::jacobian_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
M &  matrix 
) const
inlineinherited

Compute the Laplace stiffness matrix for the element given in 'eg'.

Template Parameters
MType of the element stiffness matrix
Parameters
[in]egThe grid element we are assembling on
[in]lfsuLocal ansatz function space basis
[in]lfsvLocal test function space basis
[in]xCurrent configuration; gets ignored for linear problems like this one
[out]matrixElement stiffness matrix

References Dune::PDELab::Laplace::jacobian_volume(), and Dune::PDELab::Poisson< F, B, J >::laplace_.

template<typename F , typename B , typename J >
template<typename IG , typename LFSV , typename R >
void Dune::PDELab::Poisson< F, B, J >::lambda_boundary ( const IG &  ig,
const LFSV &  lfsv,
R &  r 
) const
inlineinherited
template<typename F , typename B , typename J >
template<typename EG , typename LFSV , typename R >
void Dune::PDELab::Poisson< F, B, J >::lambda_volume ( const EG &  eg,
const LFSV &  lfsv,
R &  r 
) const
inlineinherited
template<typename LFSU , typename LFSV , typename LocalPattern >
void Dune::PDELab::FullVolumePattern::pattern_volume ( const LFSU &  lfsu,
const LFSV &  lfsv,
LocalPattern &  pattern 
) const
inlineinherited
void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< Time >::postStage ( )
inlineinherited

to be called once at the end of each stage

void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< Time >::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.
void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< Time >::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.
void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< Time >::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.
template<typename Time , typename F , typename B , typename J >
void Dune::PDELab::InstationaryPoisson< Time, F, B, J >::setTime ( Time  t)
inline
RealType Dune::PDELab::InstationaryLocalOperatorDefaultMethods< Time >::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.

Member Data Documentation

template<typename Time , typename F , typename B , typename J >
B& Dune::PDELab::InstationaryPoisson< Time, F, B, J >::bctype
protected
template<typename Time , typename F , typename B , typename J >
F& Dune::PDELab::InstationaryPoisson< Time, F, B, J >::f
protected
template<typename Time , typename F , typename B , typename J >
J& Dune::PDELab::InstationaryPoisson< Time, F, B, J >::j
protected
template<typename F , typename B , typename J >
Laplace Dune::PDELab::Poisson< F, B, J >::laplace_
protectedinherited
template<typename F , typename B , typename J >
unsigned int Dune::PDELab::Poisson< F, B, J >::quadOrder_
protectedinherited

The documentation for this class was generated from the following file: