Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis > Class Template Reference

Generic global assembler for operators on a gridview. More...

#include <dune/fufem/assemblers/dunefunctionsoperatorassembler.hh>

Public Member Functions

 DuneFunctionsOperatorAssembler (const TestBasis &tBasis, const AnsatzBasis &aBasis)
 create assembler for grid
 
template<class PatternBuilder >
void assembleBulkPattern (PatternBuilder &patternBuilder) const
 
template<class PatternBuilder , class ElementPartition >
void assembleBulkPattern (PatternBuilder &patternBuilder, const ElementPartition &elementPartition, std::size_t threadCount) const
 Thread parallel version of assembleBulkPattern.
 
template<class PatternBuilder >
void assembleSkeletonPattern (PatternBuilder &patternBuilder) const
 
template<class Matrix , class LocalAssembler >
void assembleBulkEntries (Matrix &&matrix, LocalAssembler &&localAssembler) const
 Assemble bulk integrals.
 
template<class Matrix , class LocalAssembler , class ElementPartition >
void assembleBulkEntries (Matrix &&matrix, LocalAssembler &&localAssembler, const ElementPartition &elementPartition, std::size_t threadCount) const
 Thread parallel version of assembleBulkEntries.
 
template<class Matrix , class LocalAssembler , class LocalBoundaryAssembler >
void assembleSkeletonEntries (Matrix &&matrix, LocalAssembler &&localAssembler, LocalBoundaryAssembler &&localBoundaryAssembler) const
 
template<class Matrix , class LocalAssembler >
void assembleBulk (Matrix &&matrix, LocalAssembler &&localAssembler) const
 Create matrix pattern and assemble bulk integrals.
 
template<class Matrix , class LocalAssembler , class ElementPartition >
void assembleBulk (Matrix &&matrix, LocalAssembler &&localAssembler, const ElementPartition &elementPartition, std::size_t threadCount) const
 Thread parallel version of assembleBulk.
 

Protected Attributes

const TestBasis & testBasis_
 
const AnsatzBasis & ansatzBasis_
 

Detailed Description

template<class TestBasis, class AnsatzBasis>
class Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >

Generic global assembler for operators on a gridview.

Deprecated:
This class is deprecated and will be removed after 2.11. Use the global assemblers from the dune-assember module instead.

Constructor & Destructor Documentation

◆ DuneFunctionsOperatorAssembler()

template<class TestBasis , class AnsatzBasis >
Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::DuneFunctionsOperatorAssembler ( const TestBasis &  tBasis,
const AnsatzBasis &  aBasis 
)
inline

create assembler for grid

Member Function Documentation

◆ assembleBulk() [1/2]

template<class TestBasis , class AnsatzBasis >
template<class Matrix , class LocalAssembler >
void Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::assembleBulk ( Matrix &&  matrix,
LocalAssembler &&  localAssembler 
) const
inline

Create matrix pattern and assemble bulk integrals.

This will first create a matrix pattern using assembleBulkPattern() and then compute the entries using assembleBulkEntries(). If passed matrix does not satisfy the MatrixBackend concept, it is wrapped using istlMatrixBackend().

Parameters
matrixThe matrix to be assembled.
localAssemblerThe local element assembler

◆ assembleBulk() [2/2]

template<class TestBasis , class AnsatzBasis >
template<class Matrix , class LocalAssembler , class ElementPartition >
void Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::assembleBulk ( Matrix &&  matrix,
LocalAssembler &&  localAssembler,
const ElementPartition &  elementPartition,
std::size_t  threadCount 
) const
inline

Thread parallel version of assembleBulk.

This will first create a matrix pattern using assembleBulkPattern() and then compute the entries using assembleBulkEntries(). If passed matrix does not satisfy the MatrixBackend concept, it is wrapped using istlMatrixBackend().

Given a colored elementPartition of the grid view associated to the bases, this assembles the problem by processing each color from the partition with threadCount parallel threads. The colored elementPartition should be a range of ranges containing one random-access element range per color. The elements associated to each color are distributed (approximately) uniformly among the threads. After one color is processed, the threads are synchronized before proceeding with the next color.

This requires that the colorings represent a disjoint partition of all elements and that each color is overlap-free in the following sense: Given two elements e1 and e2, from a single color, then the sets of basis functions associated with e1 and e2 are disjoint.

This will use one copy of the local assembler per thread. Hence it must be guaranteed that this is thread-safe. E.g. any mutable data like internal caches must not be shared.

Parameters
matrixThe matrix to be assembled.
localAssemblerThe local element assembler
elementPartitionA partition of the elements in the grid view as e.g. provided by coloredGridViewPartition()
threadCountNumber of threads to use.

◆ assembleBulkEntries() [1/2]

template<class TestBasis , class AnsatzBasis >
template<class Matrix , class LocalAssembler >
void Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::assembleBulkEntries ( Matrix &&  matrix,
LocalAssembler &&  localAssembler 
) const
inline

Assemble bulk integrals.

If passed matrix does not satisfy the MatrixBackend concept, it is wrapped using istlMatrixBackend().

Parameters
matrixThe matrix to be assembled.
localAssemblerThe local element assembler

◆ assembleBulkEntries() [2/2]

template<class TestBasis , class AnsatzBasis >
template<class Matrix , class LocalAssembler , class ElementPartition >
void Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::assembleBulkEntries ( Matrix &&  matrix,
LocalAssembler &&  localAssembler,
const ElementPartition &  elementPartition,
std::size_t  threadCount 
) const
inline

Thread parallel version of assembleBulkEntries.

If passed matrix does not satisfy the MatrixBackend concept, it is wrapped using istlMatrixBackend().

Cf. the documentation of the respective thread parallel assembleBulk() method for details and constraints of the used parallel approach.

Parameters
matrixThe matrix to be assembled.
localAssemblerThe local element assembler
elementPartitionA partition of the elements in the grid view as e.g. provided by coloredGridViewPartition()
threadCountNumber of threads to use.

◆ assembleBulkPattern() [1/2]

template<class TestBasis , class AnsatzBasis >
template<class PatternBuilder >
void Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::assembleBulkPattern ( PatternBuilder &  patternBuilder) const
inline

◆ assembleBulkPattern() [2/2]

template<class TestBasis , class AnsatzBasis >
template<class PatternBuilder , class ElementPartition >
void Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::assembleBulkPattern ( PatternBuilder &  patternBuilder,
const ElementPartition &  elementPartition,
std::size_t  threadCount 
) const
inline

Thread parallel version of assembleBulkPattern.

Cf. the documentation of the respective thread parallel assembleBulk() method for details and constraints of the used parallel approach.

Parameters
patternBuilderThe object to store the pattern
elementPartitionA partition of the elements in the grid view as e.g. provided by coloredGridViewPartition()
threadCountNumber of threads to use.

◆ assembleSkeletonEntries()

template<class TestBasis , class AnsatzBasis >
template<class Matrix , class LocalAssembler , class LocalBoundaryAssembler >
void Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::assembleSkeletonEntries ( Matrix &&  matrix,
LocalAssembler &&  localAssembler,
LocalBoundaryAssembler &&  localBoundaryAssembler 
) const
inline

◆ assembleSkeletonPattern()

template<class TestBasis , class AnsatzBasis >
template<class PatternBuilder >
void Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::assembleSkeletonPattern ( PatternBuilder &  patternBuilder) const
inline

Member Data Documentation

◆ ansatzBasis_

template<class TestBasis , class AnsatzBasis >
const AnsatzBasis& Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::ansatzBasis_
protected

◆ testBasis_

template<class TestBasis , class AnsatzBasis >
const TestBasis& Dune::Fufem::DuneFunctionsOperatorAssembler< TestBasis, AnsatzBasis >::testBasis_
protected

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