Extracting size information from ordering
While trying to abstract the interfaces in the ISTL backend to support GFS and dune-functions bases (see !463, #139) I encountered some issues extracting the correct size information from the orderings.
I try to get the following example running:
I create power<lagrange>
space:
using QkFEM = PDELab::QkLocalFiniteElementMap<GridView,float,double,1>;
QkFEM qkfem(gridView);
using GFS = PDELab::GridFunctionSpace<GridView,QkFEM>;
GFS gfs(gridView,qkfem);
using Backend = PDELab::ISTL::VectorBackend<Dune::PDELab::ISTL::Blocking::fixed>;
using PGFS = PDELab::PowerGridFunctionSpace<GFS,4,Backend,
Dune::PDELab::EntityBlockedOrderingTag
>;
PGFS pgfs(gfs);
This results in ISTL vector `Dune::BlockVector<Dune::FieldVector<double,4>>...
This vector can be accessed with a multiindex (i,j)\in\mathbb{R}^{N,4}
and N =
gridView.indexSet().size(dim)
, i.e. the number of vertices in the mesh.
I now try to get these sizes (N,4)
from the ordering.
I can successfully retrieve N=
pgfs.ordering().blockCount()
, but I didn't find any information "below".
Here are some information I retrieved ...
gridView.indexSet().size(2) 324
ordering.blockCount() 324
ordering.childOrderingCount() 0
ordering.containerBlocked() 1
ordering.size() 1296
I could compute 4=
ordering.size()/ordering.blockCount()
, but is this really robust? Also I think it would be good to be good to have this 4
statically, or as constexpr
, available. As N
is dynamic, I can't compute ordering.size()/ordering.blockCount()
as constexpr
.
Perhaps I just too dumb to find the right spot... any help would be appreciated
Perhaps @santiago.ospina or @rhess has some hint, as @smuething is not available any more