dune-assembler 2.12
Loading...
Searching...
No Matches
Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView > Class Template Reference

A pair of local views constructed from a pair of global bases. More...

#include <dune/assembler/localviewpair.hh>

Public Member Functions

 LocalViewPair (RowBasis const &rowBasis, ColBasis const &colBasis)
 Construct local view for a given global finite element basis.
 
 LocalViewPair (const LocalViewPair &other)
 Copy-construct a LocalView pair. This needs to reset the reference for the second local view.
 
 LocalViewPair (LocalViewPair &&other)
 Move-construct a LocalView pair. This needs to reset the reference for the second local view.
 
template<class Element >
void bind (const Element &element)
 Bind the views to a grid element.
 
void unbind ()
 Unbind from the current element.
 
bool same () const
 Return whether both local views refer to the same object.
 

Protected Attributes

RowLocalView rowLocalView_
 
ColLocalView colLocalViewStorage_
 
ColLocalView & colLocalView_
 

Friends

template<std::size_t I>
auto const & get (const LocalViewPair &pair) noexcept
 Return a reference to the first (I == 0) or second (I == 1) local view.
 

Detailed Description

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
class Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >

A pair of local views constructed from a pair of global bases.

The pair makes sure that in case of identical bases only one object is filled and initialized. Of the bases are identical, the second local view is just a reference to the first local view. But if the bases are different, two separate local views will be handled.

Constructor & Destructor Documentation

◆ LocalViewPair() [1/3]

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::LocalViewPair ( RowBasis const &  rowBasis,
ColBasis const &  colBasis 
)
inline

Construct local view for a given global finite element basis.

◆ LocalViewPair() [2/3]

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::LocalViewPair ( const LocalViewPair< RowLocalView, ColLocalView > &  other)
inline

Copy-construct a LocalView pair. This needs to reset the reference for the second local view.

◆ LocalViewPair() [3/3]

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::LocalViewPair ( LocalViewPair< RowLocalView, ColLocalView > &&  other)
inline

Move-construct a LocalView pair. This needs to reset the reference for the second local view.

Member Function Documentation

◆ bind()

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
template<class Element >
void Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::bind ( const Element &  element)
inline

Bind the views to a grid element.

◆ same()

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
bool Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::same ( ) const
inline

Return whether both local views refer to the same object.

Note
This is equivalent to &get<0>(*this) == &get<1>(*this).

◆ unbind()

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
void Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::unbind ( )
inline

Unbind from the current element.

Friends And Related Symbol Documentation

◆ get

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
template<std::size_t I>
auto const & get ( const LocalViewPair< RowLocalView, ColLocalView > &  pair)
friend

Return a reference to the first (I == 0) or second (I == 1) local view.

Member Data Documentation

◆ colLocalView_

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
ColLocalView& Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::colLocalView_
protected

◆ colLocalViewStorage_

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
ColLocalView Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::colLocalViewStorage_
protected

◆ rowLocalView_

template<Concepts::LocalView RowLocalView, Concepts::LocalView ColLocalView>
RowLocalView Dune::Assembler::LocalViewPair< RowLocalView, ColLocalView >::rowLocalView_
protected

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