Provide global ids for all DOFs in a global basis. More...
#include <GlobalIdSet.hpp>
Public Types | |
using | GlobalBasis = GB |
using | Tree = typename GB::LocalView::Tree |
using | size_type = std::size_t |
using | GridView = typename GlobalBasis::GridView |
using | Grid = typename GridView::Grid |
using | Element = typename GridView::template Codim< 0 >::Entity |
using | EntityIdType = typename Grid::GlobalIdSet::IdType |
using | PartitionType = Dune::PartitionType |
using | IdType = GlobalIdType_t< GB > |
using | PreBasis = typename GlobalBasis::PreBasis |
using | TreePath = typename GlobalBasis::PrefixPath |
using | NodeIdSet = AMDiS::NodeIdSet< PreBasis, TreePath > |
using | Twist = AMDiS::Twist< typename Grid::GlobalIdSet, GridView::dimension > |
Public Member Functions | |
GlobalBasisIdSet (GlobalBasis const &globalBasis) | |
void | bind (Element const &element) |
Bind the IdSet to a grid element. More... | |
void | unbind () |
unbind from the element | |
size_type | size () const |
The number of DOFs on the current element in the basis tree. | |
IdType | id (size_type i) const |
Return the global unique ID of the i th DOF on the currently bound element in the basis tree. | |
EntityIdType | entityId (size_type i) const |
Return the global unique ID of the entity associated to the i th DOF on the currently bound element in the basis tree. | |
PartitionType | partitionType (size_type i) const |
Return the partition type of the i th DOF on the currently bound element in the basis tree. | |
Protected Types | |
using | Data = std::pair< IdType, PartitionType > |
Protected Attributes | |
Tree | tree_ |
NodeIdSet | nodeIdSet_ |
Twist | twist_ |
std::vector< Data > | data_ |
Provide global ids for all DOFs in a global basis.
A GlobalBasisIdSet provides and interface to retrieve unique IDs (over all partitions) for all DOFs in the basis. It is implemented in terms of the NodeIdSet for each basis node that locally on each element calculates a global unique id.
Examples:
|
inline |
Bind the IdSet to a grid element.
Binding the IdSet to an element collects the ids from all DOFs on that element and stores it in a local vector. Thus, the global DOF ids can be extracted using id() afterwards cheaply.
References NodeIdSet< PB, TP, NodeTag >::bind(), Twist< IdSet, dim >::bind(), NodeIdSet< PB, TP, NodeTag >::fillIn(), and GlobalBasisIdSet< GB, class >::size().