• Andreas Dedner's avatar
    Issue in dof manager when using LagrangeSpace with second order · c8e23903
    Andreas Dedner authored
    Can be seen by running ./lagrangeadapt
    in debug mode, error is
    
    dune/fem/space/common/dofmanager.hh:395: void Dune::Fem::ManagedDofStorageImplementation<GridImp, MapperType, DofArrayType>::dofCompress(bool) [with GridImp = Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)0u, (Dune::ALUGridRefinementType)0u>; MapperType = Dune::Fem::IndexSetDofMapper<Dune::Fem::AdaptiveLeafGridPart<Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)0u, (Dune::ALUGridRefinementType)0u>, (Dune::PartitionIteratorType)4u, false>, Dune::Fem::DefaultLocalDofMapping<Dune::Fem::AdaptiveLeafGridPart<Dune::ALUGrid<2, 2, (Dune::ALUGridElementType)0u, (Dune::ALUGridRefinementType)0u>, (Dune::PartitionIteratorType)4u, false> > >; DofArrayType = Dune::Fem::MutableBlockVector<Dune::Fem::DynamicArray<double, Dune::Fem::PODArrayAllocator<double> >, 1u>]: Assertion `newIndex < nSize' failed.
    
    The following issue is fixed here:
    
    the lfe spaces (e.g. the LagrangeSpace) is always hybrid, e.g., for dimension=2,
    polOrder=2 it will return 1 dof for (cube,0). The `IndexSetDofMapper` will
    therefore always create 3 blocks (one for vertices, for edges, and for (cube,0)).
    In the case of an `AdaptiveDofMapper` this leads to three queries
    concerning holes which is passed on to the `AdaptiveIndexSet` which only
    takes the codimension of the geometry type into account. So even on a
    triangular grid it will return the number of holes for codim=0 for the
    `(cube,0)` block which leads to wrong indices being computed.
    
    This fix simply checks if a geometry type that contains dofs is active in
    the index set - the `AdaptiveLeafIndexSet` only works in this case with a
    single geometry type anyway (see
       `assert( hasSingleGeometryType || geomTypes( codim ).size() == 1 )`
    in method `oldIndex` for example.
    
    added the log message to describe the previous fix
    c8e23903
Name
Last commit
Last update
cmake/modules Loading commit data...
doc Loading commit data...
dune Loading commit data...
lib Loading commit data...
scripts Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
CHANGELOG.md Loading commit data...
CMakeLists.txt Loading commit data...
COPYING Loading commit data...
LICENSE.md Loading commit data...
README.md Loading commit data...
config.h.cmake Loading commit data...
dune-fem.pc.in Loading commit data...
dune.module Loading commit data...
modules Loading commit data...