DUNE-FEM (unstable)

Dune::Fem::Stencil< DomainSpace, RangeSpace > Class Template Referenceabstract

default implementation for a general operator stencil More...

#include <dune/fem/operator/common/stencil.hh>

Public Types

typedef std::set< DomainGlobalKeyType > LocalStencilType
 type for storing the stencil of one row
 
typedef std::vector< std::size_t >::size_type IndexType
 type of std::vector for indexing
 

Public Member Functions

 Stencil (const DomainSpace &dSpace, const RangeSpace &rSpace)
 Constructor. More...
 
void fill (const DomainEntityType &dEntity, const RangeEntityType &rEntity, bool fillGhost=true) const
 Create stencil entries for (dEntity,rEntity) pair. More...
 
const LocalStencilTypelocalStencil (const RangeGlobalKeyType &key) const
 Return stencil for a given row of the matrix. More...
 
const GlobalStencilType & globalStencil () const
 Return the full stencil.
 
int maxNonZerosEstimate () const
 Return an upper bound for the maximum number of non-zero entries in all rows.
 
void update ()
 clear previously computed entries such that a re-compute happens when used again
 

Protected Member Functions

virtual void setupStencil () const =0
 method to setup stencil depending on entity set defined in derived class
 

Detailed Description

template<class DomainSpace, class RangeSpace>
class Dune::Fem::Stencil< DomainSpace, RangeSpace >

default implementation for a general operator stencil

To assemble a matrix from an operator the method reserve has to be called on the linear operator class passing a stencil object as parameter. To setup a full stencil the method fill has to be called with each pair (en,nb) for which the localMatrix method is called during the assembly.

Template Parameters
DomainSpacetype of discrete function space for the domain
RangeSpacetype of discrete function space for the range

Constructor & Destructor Documentation

◆ Stencil()

template<class DomainSpace , class RangeSpace >
Dune::Fem::Stencil< DomainSpace, RangeSpace >::Stencil ( const DomainSpace &  dSpace,
const RangeSpace &  rSpace 
)
inline

Constructor.

Parameters
[in]dSpacedomain space
[in]rSpacerange space

Member Function Documentation

◆ fill()

template<class DomainSpace , class RangeSpace >
void Dune::Fem::Stencil< DomainSpace, RangeSpace >::fill ( const DomainEntityType &  dEntity,
const RangeEntityType &  rEntity,
bool  fillGhost = true 
) const
inline

Create stencil entries for (dEntity,rEntity) pair.

Parameters
[in]dEntitydomain entity
[in]rEntityrange entity
[in]fillGhostsetup stencil even for a ghost domain entity

References Dune::GhostEntity.

Referenced by Dune::Fem::DiagonalStencil< DomainSpace, RangeSpace, Partition >::setupStencil(), and Dune::Fem::DiagonalAndNeighborStencil< DomainSpace, RangeSpace, Partition >::setupStencil().

◆ localStencil()

template<class DomainSpace , class RangeSpace >
const LocalStencilType & Dune::Fem::Stencil< DomainSpace, RangeSpace >::localStencil ( const RangeGlobalKeyType &  key) const
inline

Return stencil for a given row of the matrix.

Parameters
[in]keykey for matrix row

References Dune::Fem::Stencil< DomainSpace, RangeSpace >::globalStencil().

Referenced by Dune::Fem::Stencil< DomainSpace, RangeSpace >::setupStencil().


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 13, 23:29, 2024)