AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
GlobalBasis< PB > Class Template Reference

Global basis defined on a pre-basis. More...

#include <GlobalBasis.hpp>

Inherits DefaultGlobalBasis< PB >, Notifier< event::adapt >, and Observer< event::adapt >.

Classes

struct  DummyImpl
 

Public Types

using PreBasis = PB
 Pre-basis providing the implementation details.
 
using GridView = typename PreBasis::GridView
 The grid view that the FE space is defined on.
 
using Grid = typename GridView::Grid
 
using LocalView = AMDiS::LocalView< Self >
 Type of the local view on the restriction of the basis to a single element.
 
using IndexDist = BackendTraits::IndexDist< Self >
 Type of the communicator.
 
using ADH = Dune::AdaptDataHandle< Grid, DummyImpl >
 

Public Member Functions

template<class... Args, Dune::Functions::enableIfConstructible< PreBasis, Args... > = 0>
 GlobalBasis (std::string const &name, Grid const &grid, Args &&... args)
 Construct this global basis with given name and grid, and constructing a preBasis. More...
 
template<class PBF >
 GlobalBasis (std::string const &name, GridView const &gridView, PBF const &preBasisFactory)
 Construct this global basis with a preBasisFactory.
 
template<class Arg , class... Args, REQUIRES(!std::is_same_v< std::string, remove_cvref_t< Arg > >) >
 GlobalBasis (Arg &&arg, Args &&... args)
 Construct this global basis with empty name.
 
 GlobalBasis (GlobalBasis const &)=delete
 Copy constructor.
 
 GlobalBasis (GlobalBasis &&)=default
 Move constructor.
 
void update (GridView const &gv)
 Update the stored grid view. More...
 
LocalView localView () const
 Return local view for basis.
 
std::shared_ptr< LocalViewlocalViewPtr () const
 Return local view as shared_ptr to prevent from copy construction.
 
auto entitySet () const
 Return the set of entities this basis can be bound to.
 
GlobalBasis const & rootBasis () const
 Return *this because we are not embedded in a larger basis.
 
IndexDist const & indexDistribution () const
 Return the index distribution. More...
 
IndexDistindexDistribution ()
 
ADH globalRefineCallback () const
 

Protected Member Functions

void updateImpl (event::adapt e) override
 Updates the underlying basis when event::adapt is triggered by the observed grid.
 

Protected Attributes

IndexDist indexDist_
 

Detailed Description

template<class PB>
class AMDiS::GlobalBasis< PB >

Global basis defined on a pre-basis.

This class is an expansion to Dune::Functions::DefaultGlobalBasis<PB>. It adds a communicator to use the basis in parallel as well as automatic update functionality.

Template Parameters
PBPre-basis providing the implementation details

Constructor & Destructor Documentation

◆ GlobalBasis()

GlobalBasis ( std::string const &  name,
Grid const &  grid,
Args &&...  args 
)
inline

Construct this global basis with given name and grid, and constructing a preBasis.

Parameters
nameName associated with this basis for initfile parameter attachment.
gridThe Grid providing the GridView for this basis
args...Argument list for PreBasis

This will forward all arguments to the constructor of PreBasis

Member Function Documentation

◆ indexDistribution()

IndexDist const & indexDistribution ( ) const
inline

Return the index distribution.

This provides the means to communicate indices associated to the basis with other processes.

◆ update()

void update ( GridView const &  gv)
inline

Update the stored grid view.

This will update the indexing information of the global basis as well as the communicator. It is called automatically if the grid has changed.

Referenced by GlobalBasis< PB >::updateImpl().


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