AMDiS 2.11-git
The Adaptive Multi-Dimensional Simulation Toolbox
 
Loading...
Searching...
No Matches
BasisMapping< SourceBasis, TargetBasis, Storage > Class Template Reference

Provide mapping from MultiIndex of source basis to MultiIndex of target basis. More...

#include <BasisMapping.hpp>

Inherits ObserverSequenceImpl< Event, Tags >.

Public Types

using SourceBasisType = SourceBasis
 
using TargetBasisType = TargetBasis
 

Public Member Functions

 BasisMapping (std::shared_ptr< SourceBasis > const &source, std::shared_ptr< TargetBasis > const &target)
 
 BasisMapping (SourceBasis &source, TargetBasis &target)
 
TargetBasis::MultiIndex const & operator() (typename SourceBasis::MultiIndex const &mi) const
 Map a source index to a target index.
 
TargetBasis::MultiIndex const & operator() (std::size_t idx) const
 Map a flat source into to a target index.
 
TargetBasis const & sizeInfo () const
 Return the target basis as a size info object.
 
std::shared_ptr< SourceBasis > const & source () const
 Return the source basis.
 
std::shared_ptr< TargetBasis > const & target () const
 Return the target basis.
 

Protected Member Functions

void updateImpl (event::adapt e, index_t< 0 > i) override
 
void updateImpl (event::adapt e, index_t< 1 > i) override
 

Detailed Description

template<class SourceBasis, class TargetBasis, class Storage = std::map<typename SourceBasis::MultiIndex, typename TargetBasis::MultiIndex>>
class AMDiS::BasisMapping< SourceBasis, TargetBasis, Storage >

Provide mapping from MultiIndex of source basis to MultiIndex of target basis.

Create an index map that transfers the MultiIndex of one basis to another basis. The type of the mapping can be provided. This allows to use a vector if the source basis uses flat indices.

Member Function Documentation

◆ operator()()

template<class SourceBasis , class TargetBasis , class Storage = std::map<typename SourceBasis::MultiIndex, typename TargetBasis::MultiIndex>>
TargetBasis::MultiIndex const & operator() ( typename SourceBasis::MultiIndex const &  mi) const
inline

Map a source index to a target index.

The passed argument mi may be of type SourceBasis::MultiIndex or, if it is a flat index, of type std::size_t.


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