DUNE-ACFEM (unstable)

Dune::ACFem::DofMapperTupleDataHandle< Mapper, Operation, Storages > Class Template Reference

Potential all - all communication for mapped data. More...

#include <dune/acfem/common/dofmappertupledatahandle.hh>

Public Member Functions

 DofMapperTupleDataHandle (const MapperType &mapper, const Operation &operation, Storages &... storages)
 Construct the data handle from the given mapper and storage container. More...
 
bool contains (int dim, int codim) const
 returns true if data for this codim should be communicated
 
bool fixedSize (int dim, int codim) const
 We don't have a fixed-size. More...
 
template<class Entity >
size_t size (const Entity &entity) const
 how many objects of type DataItemType have to be sent for a given entity. More...
 
template<class MessageBuffer , class Entity >
void gather (MessageBuffer &buff, const Entity &entity) const
 pack data from user to message buffer
 
template<class MessageBuffer , class Entity >
void scatter (MessageBuffer &buff, const Entity &entity, size_t n)
 unpack data from message to user buffer
 

Detailed Description

template<class Mapper, class Operation, class... Storages>
class Dune::ACFem::DofMapperTupleDataHandle< Mapper, Operation, Storages >

Potential all - all communication for mapped data.

Depends on the mapper. Used e.g. to communicate Dirichlet constraints. Stolen from an equivalent class from Dune::FemPy. The most convenient way to generate your DofMapperTupleDataHandle instance is provided by the "generator function" dofMapperTupleDataHandle().

Parameters
MapperThe type of the mapper to use. Probably from a discrete space.
StorageA random access container class which allows for indexing with the indices provided by the mapper. In the simplest case this could be a std::vector<> which just has enough space for the size of the mapper.
OperationA functor which is called in the scatter() method. The items stored in Storage have to support the operation, of course.

Constructor & Destructor Documentation

◆ DofMapperTupleDataHandle()

template<class Mapper , class Operation , class... Storages>
Dune::ACFem::DofMapperTupleDataHandle< Mapper, Operation, Storages >::DofMapperTupleDataHandle ( const MapperType &  mapper,
const Operation &  operation,
Storages &...  storages 
)
inline

Construct the data handle from the given mapper and storage container.

Parameters
[in]mapperThe dof-mapper. Probably discreteSpace.blockMapper().
[in]operatorAn instance of Operation. Operation must supply an Operation::operator()(dest, src) where dest and src must accepts arguments of the type generated by ContainerTuple::operator[](). Lambdas are allowed, e.g.
[](const auto& a, auto& b) { ... }
[in]storagesStorage container argument pack. The storages are stuffed into a ContainerTuple. In order for this to work they have to supply a random access operator[]().

Member Function Documentation

◆ fixedSize()

template<class Mapper , class Operation , class... Storages>
bool Dune::ACFem::DofMapperTupleDataHandle< Mapper, Operation, Storages >::fixedSize ( int  dim,
int  codim 
) const
inline

We don't have a fixed-size.

Depends on the mapper and the number of DoFs on sub-entities.

◆ size()

template<class Mapper , class Operation , class... Storages>
template<class Entity >
size_t Dune::ACFem::DofMapperTupleDataHandle< Mapper, Operation, Storages >::size ( const Entity &  entity) const
inline

how many objects of type DataItemType have to be sent for a given entity.

Note: Only the sender side needs to know this size.

Referenced by Dune::ACFem::DofMapperTupleDataHandle< Mapper, Operation, Storages >::gather(), and Dune::ACFem::DofMapperTupleDataHandle< Mapper, Operation, Storages >::scatter().


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.80.0 (Apr 24, 22:30, 2024)