problem with level intersections in 2d conforming
I reported this in #21 (closed) originally, but it might be a different issue:
To continue #17 (closed) with a fresh discussion: the following MWE gives the assertion reported below. This only happens for conforming, nonconfirming is fine.
#include <config.h>
#include <dune/common/unused.hh>
#include <dune/grid/common/rangegenerators.hh>
#include <dune/grid/utility/structuredgridfactory.hh>
#include <dune/alugrid/grid.hh>
#include <dune/alugrid/dgf.hh>
int main() {
typedef Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming> GridType;
std::array<unsigned int, 2> elements {2, 2};
auto grid_ptr = Dune::StructuredGridFactory<GridType>::createSimplexGrid({0, 0}, {1, 1}, elements);
grid_ptr->globalRefine(1);
auto level_view = grid_ptr->levelView(1);
for (auto && entity : Dune::elements(level_view)) {
std::cout << "entity " << level_view.indexSet().index(entity) << std::endl;
for (auto&& intersection : Dune::intersections(level_view, entity))
std::cout << " intersection " << intersection.indexInInside() << std::endl;
}
}
I am using the releases/2.5
branches of the core modules as well as dune-alugrid. Please let me know if you need any further information.
The assertion I get is the following:
./test_empty
entity 0
intersection 0
intersection 1
test_empty: /home/falbr_01/dune-gdt-super/dune-alugrid/dune/alugrid/3d/faceutility_imp.cc:329: const GEOElementType& Dune::ALU3dGridFaceInfo<dim, dimworld, type, Comm>::innerEntity() const [with int dim = 2; int dimworld = 2; Dune::ALU3dGridElementType type = (Dune::ALU3dGridElementType)4u; Comm = Dune::ALUGridNoComm; Dune::ALU3dGridFaceInfo<dim, dimworld, type, Comm>::GEOElementType = ALUGrid::Gitter::Geometric::Tetra]: Assertion `! innerElement_->isboundary()' failed.
Aborted (core dumped)
Best,
Felix