dune-pdelab  2.7-git
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Dune::PDELab::LocalAssemblerInterface< B, CU, CV > Class Template Reference

The local assembler which provides the engines that drive the global assembler. More...

#include <dune/pdelab/gridoperator/common/assembler.hh>

Inheritance diagram for Dune::PDELab::LocalAssemblerInterface< B, CU, CV >:
Inheritance graph

Classes

class  LocalJacobianAssemblerEngine
 
class  LocalPatternAssemblerEngine
 
class  LocalResidualAssemblerEngine
 
class  LocalResidualJacobianAssemblerEngine
 

Public Types

typedef B::size_type SizeType
 

Public Member Functions

template<class RF >
void setWeight (RF weight)
 Set current weight of assembling. More...
 
const CU & trialConstraints () const
 get the constraints on the trial grid function space More...
 
const CV & testConstraints () const
 get the constraints on the test grid function space More...
 
template<typename X >
std::enable_if< AlwaysTrue< X >::value &&!std::is_same< CV, EmptyTransformation >::value >::type forwardtransform (X &x, const bool postrestrict=false) const
 Transforms a vector $ \boldsymbol{x} $ from $ V$ to $ V'$. If postrestrict == true then $\boldsymbol{R}^T_{\boldsymbol{\tilde U}', \boldsymbol{U}'} \boldsymbol{S}_{\boldsymbol{\tilde V}}$ is applied instead of the full transformation.
More...
 
template<typename X >
std::enable_if< AlwaysTrue< X >::value &&std::is_same< CV, EmptyTransformation >::value >::type forwardtransform (X &x, const bool postrestrict=false) const
 
template<typename X >
std::enable_if< AlwaysTrue< X >::value &&!std::is_same< CV, EmptyTransformation >::value >::type backtransform (X &x, const bool prerestrict=false) const
 Transforms a vector $ \boldsymbol{x} $ from $ V'$ to $ V$. If prerestrict == true then $\boldsymbol{S}^T_{\boldsymbol{\tilde U}}$ is applied instead of the full transformation.
More...
 
template<typename X >
std::enable_if< AlwaysTrue< X >::value &&std::is_same< CV, EmptyTransformation >::value >::type backtransform (X &x, const bool prerestrict=false) const
 
Notification functions for time step controller
template<class TT >
void setTime (TT time)
 Set current time of assembling. More...
 
template<typename TT >
void preStep (TT time, TT dt, std::size_t stages)
 Notify local assembler about upcoming time step. More...
 
void postStep ()
 Notify local assembler about completion of time step. More...
 
template<typename TT >
void preStage (TT time, std::size_t stage)
 Notify local assembler about upcoming time step stage. More...
 
void postStage ()
 Notify local assembler about completion of time step stage. More...
 
template<typename TT >
TT suggestTimestep (TT dt) const
 Suggest a valid time step size. More...
 
Access to the assembler engines
LocalPatternAssemblerEnginelocalPatternAssemblerEngine (P &p)
 
LocalResidualAssemblerEnginelocalResidualAssemblerEngine (R &r, const X &x)
 
LocalJacobianAssemblerEnginelocalJacobianAssemblerEngine (A &a, const X &x)
 
LocalResidualJacobianAssemblerEnginelocalResidualJacobianAssemblerEngine (R &r, A &a, const X &x)
 

Protected Member Functions

template<typename GCView , typename T >
void eread (const GCView &globalcontainer_view, LocalMatrix< T > &localcontainer) const
 read local stiffness matrix for entity More...
 
template<typename T , typename GCView >
void ewrite (const LocalMatrix< T > &localcontainer, GCView &globalcontainer_view) const
 write local stiffness matrix for entity More...
 
template<typename T , typename GCView >
void eadd (const LocalMatrix< T > &localcontainer, GCView &globalcontainer_view) const
 write local stiffness matrix for entity More...
 
template<typename M , typename GCView >
std::enable_if< AlwaysTrue< M >::value &&!std::is_same< CV, EmptyTransformation >::value >::type scatter_jacobian (M &local_container, GCView &global_container_view, bool symmetric_mode) const
 Scatter local jacobian to global container. More...
 
template<typename M , typename GCView >
std::enable_if< AlwaysTrue< M >::value &&std::is_same< CV, EmptyTransformation >::value >::type scatter_jacobian (M &local_container, GCView &global_container_view, bool symmetric_mode) const
 
template<typename M , typename GCView >
void etadd_symmetric (M &localcontainer, GCView &globalcontainer_view) const
 Add local matrix to global matrix, and apply Dirichlet constraints in a symmetric fashion. Apart from that, identical to etadd(). More...
 
template<typename M , typename GCView >
void etadd (const M &localcontainer, GCView &globalcontainer_view) const
 
template<typename Pattern , typename RI , typename CI >
std::enable_if< std::is_same< RI, CI >::value >::type add_diagonal_entry (Pattern &pattern, const RI &ri, const CI &ci) const
 
template<typename Pattern , typename RI , typename CI >
std::enable_if< !std::is_same< RI, CI >::value >::type add_diagonal_entry (Pattern &pattern, const RI &ri, const CI &ci) const
 
template<typename P , typename LFSVIndices , typename LFSUIndices , typename Index >
void add_entry (P &globalpattern, const LFSVIndices &lfsv_indices, Index i, const LFSUIndices &lfsu_indices, Index j) const
 Adding matrix entry to pattern with respect to the constraints contributions. This assembles the entries addressed by etadd(..). See the documentation there for more information about the matrix pattern. More...
 
template<typename GFSV , typename GC , typename C >
void set_trivial_rows (const GFSV &gfsv, GC &globalcontainer, const C &c) const
 insert dirichlet constraints for row and assemble T^T_U in constrained rows More...
 
template<typename GFSV , typename GC >
void set_trivial_rows (const GFSV &gfsv, GC &globalcontainer, const EmptyTransformation &c) const
 
template<typename GFSV , typename GC >
void handle_dirichlet_constraints (const GFSV &gfsv, GC &globalcontainer) const
 

Protected Attributes

const CU * pconstraintsu
 
const CV * pconstraintsv
 

Static Protected Attributes

static CU emptyconstraintsu
 
static CV emptyconstraintsv
 

Detailed Description

template<typename B, typename CU, typename CV>
class Dune::PDELab::LocalAssemblerInterface< B, CU, CV >

The local assembler which provides the engines that drive the global assembler.

The local assembler provides engines for the standard operations of the grid operator. This includes setting up the pattern, computing the residual and the jacobian matrix.

It also provides a standard interface which may be used by implementations of time stepping methods.

Member Typedef Documentation

◆ SizeType

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
typedef B::size_type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::SizeType
inherited

Member Function Documentation

◆ add_diagonal_entry() [1/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename Pattern , typename RI , typename CI >
std::enable_if< std::is_same<RI,CI>::value >::type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::add_diagonal_entry ( Pattern &  pattern,
const RI &  ri,
const CI &  ci 
) const
inlineprotectedinherited

◆ add_diagonal_entry() [2/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename Pattern , typename RI , typename CI >
std::enable_if< !std::is_same<RI,CI>::value >::type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::add_diagonal_entry ( Pattern &  pattern,
const RI &  ri,
const CI &  ci 
) const
inlineprotectedinherited

◆ add_entry()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename P , typename LFSVIndices , typename LFSUIndices , typename Index >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::add_entry ( P &  globalpattern,
const LFSVIndices &  lfsv_indices,
Index  i,
const LFSUIndices &  lfsu_indices,
Index  j 
) const
inlineprotectedinherited

Adding matrix entry to pattern with respect to the constraints contributions. This assembles the entries addressed by etadd(..). See the documentation there for more information about the matrix pattern.

◆ backtransform() [1/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename X >
std::enable_if< AlwaysTrue<X>::value && !std::is_same< CV, EmptyTransformation >::value >::type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::backtransform ( X &  x,
const bool  prerestrict = false 
) const
inlineinherited

Transforms a vector $ \boldsymbol{x} $ from $ V'$ to $ V$. If prerestrict == true then $\boldsymbol{S}^T_{\boldsymbol{\tilde U}}$ is applied instead of the full transformation.

◆ backtransform() [2/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename X >
std::enable_if< AlwaysTrue<X>::value && std::is_same< CV, EmptyTransformation >::value >::type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::backtransform ( X &  x,
const bool  prerestrict = false 
) const
inlineinherited

◆ eadd()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename T , typename GCView >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::eadd ( const LocalMatrix< T > &  localcontainer,
GCView &  globalcontainer_view 
) const
inlineprotectedinherited

write local stiffness matrix for entity

◆ eread()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename GCView , typename T >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::eread ( const GCView &  globalcontainer_view,
LocalMatrix< T > &  localcontainer 
) const
inlineprotectedinherited

read local stiffness matrix for entity

◆ etadd()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename M , typename GCView >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::etadd ( const M &  localcontainer,
GCView &  globalcontainer_view 
) const
inlineprotectedinherited

◆ etadd_symmetric()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename M , typename GCView >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::etadd_symmetric ( M &  localcontainer,
GCView &  globalcontainer_view 
) const
inlineprotectedinherited

Add local matrix to global matrix, and apply Dirichlet constraints in a symmetric fashion. Apart from that, identical to etadd().

◆ ewrite()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename T , typename GCView >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::ewrite ( const LocalMatrix< T > &  localcontainer,
GCView &  globalcontainer_view 
) const
inlineprotectedinherited

write local stiffness matrix for entity

◆ forwardtransform() [1/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename X >
std::enable_if< AlwaysTrue<X>::value && !std::is_same< CV, EmptyTransformation >::value >::type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::forwardtransform ( X &  x,
const bool  postrestrict = false 
) const
inlineinherited

Transforms a vector $ \boldsymbol{x} $ from $ V$ to $ V'$. If postrestrict == true then $\boldsymbol{R}^T_{\boldsymbol{\tilde U}', \boldsymbol{U}'} \boldsymbol{S}_{\boldsymbol{\tilde V}}$ is applied instead of the full transformation.

◆ forwardtransform() [2/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename X >
std::enable_if< AlwaysTrue<X>::value && std::is_same< CV, EmptyTransformation >::value >::type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::forwardtransform ( X &  x,
const bool  postrestrict = false 
) const
inlineinherited

◆ handle_dirichlet_constraints()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename GFSV , typename GC >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::handle_dirichlet_constraints ( const GFSV &  gfsv,
GC &  globalcontainer 
) const
inlineprotectedinherited

◆ localJacobianAssemblerEngine()

template<typename B , typename CU , typename CV >
LocalJacobianAssemblerEngine& Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::localJacobianAssemblerEngine ( A &  a,
const X &  x 
)

◆ localPatternAssemblerEngine()

template<typename B , typename CU , typename CV >
LocalPatternAssemblerEngine& Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::localPatternAssemblerEngine ( P &  p)

◆ localResidualAssemblerEngine()

template<typename B , typename CU , typename CV >
LocalResidualAssemblerEngine& Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::localResidualAssemblerEngine ( R &  r,
const X &  x 
)

◆ localResidualJacobianAssemblerEngine()

template<typename B , typename CU , typename CV >
LocalResidualJacobianAssemblerEngine& Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::localResidualJacobianAssemblerEngine ( R &  r,
A &  a,
const X &  x 
)

◆ postStage()

template<typename B , typename CU , typename CV >
void Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::postStage ( )

Notify local assembler about completion of time step stage.

◆ postStep()

template<typename B , typename CU , typename CV >
void Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::postStep ( )

Notify local assembler about completion of time step.

◆ preStage()

template<typename B , typename CU , typename CV >
template<typename TT >
void Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::preStage ( TT  time,
std::size_t  stage 
)

Notify local assembler about upcoming time step stage.

◆ preStep()

template<typename B , typename CU , typename CV >
template<typename TT >
void Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::preStep ( TT  time,
TT  dt,
std::size_t  stages 
)

Notify local assembler about upcoming time step.

◆ scatter_jacobian() [1/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename M , typename GCView >
std::enable_if< AlwaysTrue<M>::value && !std::is_same< CV, EmptyTransformation >::value >::type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::scatter_jacobian ( M &  local_container,
GCView &  global_container_view,
bool  symmetric_mode 
) const
inlineprotectedinherited

Scatter local jacobian to global container.

◆ scatter_jacobian() [2/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename M , typename GCView >
std::enable_if< AlwaysTrue<M>::value && std::is_same< CV, EmptyTransformation >::value >::type Dune::PDELab::LocalAssemblerBase< B, CU, CV >::scatter_jacobian ( M &  local_container,
GCView &  global_container_view,
bool  symmetric_mode 
) const
inlineprotectedinherited

◆ set_trivial_rows() [1/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename GFSV , typename GC , typename C >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::set_trivial_rows ( const GFSV &  gfsv,
GC &  globalcontainer,
const C &  c 
) const
inlineprotectedinherited

insert dirichlet constraints for row and assemble T^T_U in constrained rows

◆ set_trivial_rows() [2/2]

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
template<typename GFSV , typename GC >
void Dune::PDELab::LocalAssemblerBase< B, CU, CV >::set_trivial_rows ( const GFSV &  gfsv,
GC &  globalcontainer,
const EmptyTransformation c 
) const
inlineprotectedinherited

◆ setTime()

template<typename B , typename CU , typename CV >
template<class TT >
void Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::setTime ( TT  time)

Set current time of assembling.

◆ setWeight()

template<typename B , typename CU , typename CV >
template<class RF >
void Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::setWeight ( RF  weight)

Set current weight of assembling.

◆ suggestTimestep()

template<typename B , typename CU , typename CV >
template<typename TT >
TT Dune::PDELab::LocalAssemblerInterface< B, CU, CV >::suggestTimestep ( TT  dt) const

Suggest a valid time step size.

◆ testConstraints()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
const CV& Dune::PDELab::LocalAssemblerBase< B, CU, CV >::testConstraints ( ) const
inlineinherited

get the constraints on the test grid function space

◆ trialConstraints()

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
const CU& Dune::PDELab::LocalAssemblerBase< B, CU, CV >::trialConstraints ( ) const
inlineinherited

get the constraints on the trial grid function space

Member Data Documentation

◆ emptyconstraintsu

template<typename B , typename CU , typename CV >
CU Dune::PDELab::LocalAssemblerBase< B, CU, CV >::emptyconstraintsu
staticprotectedinherited

◆ emptyconstraintsv

template<typename B , typename CU , typename CV >
CV Dune::PDELab::LocalAssemblerBase< B, CU, CV >::emptyconstraintsv
staticprotectedinherited

◆ pconstraintsu

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
const CU* Dune::PDELab::LocalAssemblerBase< B, CU, CV >::pconstraintsu
protectedinherited

◆ pconstraintsv

template<typename B , typename CU = EmptyTransformation, typename CV = EmptyTransformation>
const CV* Dune::PDELab::LocalAssemblerBase< B, CU, CV >::pconstraintsv
protectedinherited

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