dune-pdelab 2.7-git
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
Dune::PDELab::TaylorHoodNavierStokes< P > Class Template Reference

A local operator for the Navier-Stokes equations. More...

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

Inheritance diagram for Dune::PDELab::TaylorHoodNavierStokes< P >:
Inheritance graph

Public Types

enum  { doPatternVolume = true }
 
enum  { doAlphaVolume = true }
 
enum  { doLambdaVolume = true }
 
enum  { doLambdaBoundary = true }
 
using BC = StokesBoundaryCondition
 Boundary condition indicator type.
 
using InstatBase = InstationaryLocalOperatorDefaultMethods< typename P::Traits::RangeField >
 
using Real = typename InstatBase::RealType
 
using PhysicalParameters = P
 
typedef P::Traits::RangeField RealType
 
Flags selective assembly
enum  { doSkipEntity }
 Whether to do selective assembly on the elements, i.e. whether or not skip_entity() should be called. More...
 
enum  { doSkipIntersection }
 Whether to do selective assembly on the intersections, i.e. whether or not skip_intersection() should be called. More...
 
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...
 
enum  { isLinear }
 Wheter the local operator describes a linear problem. More...
 

Public Member Functions

 TaylorHoodNavierStokes (PhysicalParameters &p, int superintegration_order_=0)
 
void setTime (Real t)
 
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 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
 
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 LFSU , typename LFSV , typename LocalPattern >
void pattern_volume (const LFSU &lfsu, const LFSV &lfsv, LocalPattern &pattern) const
 
void setTime (P::Traits::RangeField t_)
 set time for subsequent evaluation
 
P::Traits::RangeField getTime () const
 get current time
 
void preStep (RealType time, RealType dt, int stages)
 to be called once before each time step
 
void postStep ()
 to be called once at the end of each time step
 
void preStage (RealType time, int r)
 to be called once before each stage
 
int getStage () const
 get current stage
 
void postStage ()
 to be called once at the end of each stage
 
RealType suggestTimestep (RealType dt) const
 to be called after stage 1
 

Static Public Attributes

static const bool navier = P::assemble_navier
 
static const bool full_tensor = P::assemble_full_tensor
 

Detailed Description

template<typename P>
class Dune::PDELab::TaylorHoodNavierStokes< P >

A local operator for the Navier-Stokes equations.

This class implements a local operator for conforming finite element discretizations of the Navier-Stokes equations with TaylorHood basis.

\begin{align*}
  u \cdot \nabla u \cdot v - \nabla \cdot ( \nabla u + (\nabla u)^T + p I) &=& 0 \mbox{ in } \Omega, \\
  \nabla \cdot u &=& 0 \mbox{ in } \Omega \\
  u &=& g \mbox{ on } \partial\Omega_D \\
  -\nu (\nabla u + p I ) \nu &=& j \mbox{ on } \partial\Omega_N \\
  \end{align*}

As indicated in the equation above, this implementation utilizes only scalar Neumann conditions.

Template Parameters
PA suitable parameter class with the interface of TaylorHoodNavierStokesDefaultParameters

Member Typedef Documentation

◆ BC

template<typename P >
using Dune::PDELab::TaylorHoodNavierStokes< P >::BC = StokesBoundaryCondition

Boundary condition indicator type.

◆ InstatBase

template<typename P >
using Dune::PDELab::TaylorHoodNavierStokes< P >::InstatBase = InstationaryLocalOperatorDefaultMethods<typename P::Traits::RangeField>

◆ PhysicalParameters

template<typename P >
using Dune::PDELab::TaylorHoodNavierStokes< P >::PhysicalParameters = P

◆ Real

template<typename P >
using Dune::PDELab::TaylorHoodNavierStokes< P >::Real = typename InstatBase::RealType

◆ RealType

typedef P::Traits::RangeField Dune::PDELab::InstationaryLocalOperatorDefaultMethods< P::Traits::RangeField >::RealType
inherited

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Whether to do selective assembly on the elements, i.e. whether or not skip_entity() should be called.

Enumerator
doSkipEntity 

◆ anonymous enum

anonymous enum
inherited

Whether to do selective assembly on the intersections, i.e. whether or not skip_intersection() should be called.

Enumerator
doSkipIntersection 

◆ 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

anonymous enum
inherited

Wheter the local operator describes a linear problem.

Enumerator
isLinear 

◆ anonymous enum

template<typename P >
anonymous enum
Enumerator
doPatternVolume 

◆ anonymous enum

template<typename P >
anonymous enum
Enumerator
doAlphaVolume 

◆ anonymous enum

template<typename P >
anonymous enum
Enumerator
doLambdaVolume 

◆ anonymous enum

template<typename P >
anonymous enum
Enumerator
doLambdaBoundary 

Constructor & Destructor Documentation

◆ TaylorHoodNavierStokes()

template<typename P >
Dune::PDELab::TaylorHoodNavierStokes< P >::TaylorHoodNavierStokes ( PhysicalParameters p,
int  superintegration_order_ = 0 
)
inline

Member Function Documentation

◆ alpha_volume()

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

◆ getStage()

int Dune::PDELab::InstationaryLocalOperatorDefaultMethods< P::Traits::RangeField >::getStage ( ) const
inlineinherited

get current stage

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

◆ getTime()

P::Traits::RangeField Dune::PDELab::InstationaryLocalOperatorDefaultMethods< P::Traits::RangeField >::getTime ( ) const
inlineinherited

get current time

Returns
The time previously set by setTime().

◆ jacobian_volume()

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

◆ lambda_boundary()

template<typename P >
template<typename IG , typename LFSV , typename R >
void Dune::PDELab::TaylorHoodNavierStokes< P >::lambda_boundary ( const IG &  ig,
const LFSV &  lfsv,
R &  r 
) const
inline

◆ lambda_volume()

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

◆ 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< P::Traits::RangeField >::postStage ( )
inlineinherited

to be called once at the end of each stage

◆ postStep()

void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< P::Traits::RangeField >::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< P::Traits::RangeField >::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< P::Traits::RangeField >::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]

void Dune::PDELab::InstationaryLocalOperatorDefaultMethods< P::Traits::RangeField >::setTime ( P::Traits::RangeField  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.

◆ setTime() [2/2]

template<typename P >
void Dune::PDELab::TaylorHoodNavierStokes< P >::setTime ( Real  t)
inline

◆ suggestTimestep()

RealType Dune::PDELab::InstationaryLocalOperatorDefaultMethods< P::Traits::RangeField >::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

◆ full_tensor

template<typename P >
const bool Dune::PDELab::TaylorHoodNavierStokes< P >::full_tensor = P::assemble_full_tensor
static

◆ navier

template<typename P >
const bool Dune::PDELab::TaylorHoodNavierStokes< P >::navier = P::assemble_navier
static

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