[Dune] ALUGrid: GlobalIdSet crashes for refinement level > 10
Simon Praetorius
simon.praetorius at tu-dresden.de
Mon Jul 29 13:24:27 CEST 2019
Hi Community,
I'm trying to use ALUGrid in parallel with just 2 ranks (dim=dimworld=2,
elType=simplex, refType=conforming), create a grid using a
StructuredGridFactory and making the following three steps:
1. grid.loadBalance()
2. grid.globalRefine(11)
3. grid.globalIdSet()
Whenever the global refinement level is > 10, I get an assertion in
`ALU3dGridGlobalIdSet::buildVertexIds()`:
> Assertion `ids_[codim][vertex.getIndex()].isValid()' failed
What is the reason for this error? Do I do something wrong in the setup
of the grid? How to workaround this problem? I need a GlobalIdSet for
the setup of global communication.
See below a minimal example. Tested with dune-2.6 and dune-git version.
Compiler gcc 7.3, openMPI 3.1.
Best wishes,
Simon
Minimal example:
```
#include "config.h"
#include <dune/alugrid/grid.hh>
#include <dune/common/filledarray.hh>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/grid/utility/structuredgridfactory.hh>
int main(int argc, char** argv)
{
Dune::MPIHelper::instance(argc, argv);
using Grid = Dune::ALUGrid<2,2,Dune::simplex,Dune::conforming>;
using Factory = Dune::StructuredGridFactory<Grid>;
auto grid = Factory::createSimplexGrid({0.0,0.0}, {1.0,1.0},
Dune::filledArray<2,int>(1));
grid->loadBalance();
grid->globalRefine(11); // 10: OK, 11: ERROR
auto const& globalIdSet = grid->globalIdSet();
}
```
More information about the Dune
mailing list