DUNE PDELab (git)

Dune::PDELab::InterleavedOrderingTag Struct Reference

Indicate interleaved ordering of the unknowns of non-leaf grid function spaces according to a given blocking pattern. More...

#include <dune/pdelab/gridfunctionspace/tags.hh>

Public Member Functions

 InterleavedOrderingTag (std::initializer_list< std::size_t > sizes)
 Constructs an InterleavedOrderingTag with a block structure given by the initializer list sizes. More...
 
 InterleavedOrderingTag (std::vector< std::size_t > sizes)
 Constructs an InterleavedOrderingTag with a block structure given by the std::vector sizes.
 
const std::vector< std::size_t > & offsets () const
 Returns a list of offsets for the child blocks.
 

Detailed Description

Indicate interleaved ordering of the unknowns of non-leaf grid function spaces according to a given blocking pattern.

This class instructs the non-leaf GridFunctionSpaces to order the dofs of the child-GridFunctionSpaces in an interleaved manner in the combined dof-vector. The sizes of the individual blocks have to be passed to the constructor of the tag.

Note
In the vast majority of scenarios, you will want to use the EntityBlockedOrderingTag instead of this one, as it is much less error-prone and works in a wider variety of settings. Only use the InterleavedOrderingTag if you know that the EntityBlockedOrderingTag will not work for you!

Constructor & Destructor Documentation

◆ InterleavedOrderingTag()

Dune::PDELab::InterleavedOrderingTag::InterleavedOrderingTag ( std::initializer_list< std::size_t >  sizes)
inline

Constructs an InterleavedOrderingTag with a block structure given by the initializer list sizes.

If you have a sufficiently recent compiler, this constructor enables a much more readable syntax when creating a GridFunctionSpace. Assuming that GFS is a PowerGridFunctionSpace and VBE its associated vector backend, you can shorten the verbose

std::vector<std::size_t> sizes(3);
sizes[0] = 2;
sizes[1] = 5;
sizes[2] = 3;
GFS gfs(child_gfs,VBE(),InterleavedOrderingTag(sizes));
InterleavedOrderingTag(std::initializer_list< std::size_t > sizes)
Constructs an InterleavedOrderingTag with a block structure given by the initializer list sizes.
Definition: tags.hh:101

to the much shorter and more readable

GFS gfs(child_gfs,VBE(),{2,5,3});

The documentation for this struct was generated from the following file:
  • dune/pdelab/gridfunctionspace/tags.hh
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)