Skip to content
Snippets Groups Projects

OneDGrid does not have method leafbegin (anymore?)

Merged Youett, Jonathan requested to merge fix_compiler_error_with_onedgrid into master
1 file
+ 10
3
Compare changes
  • Side-by-side
  • Inline
@@ -47,10 +47,14 @@ static void geodesicFEFunctionAdaptor(GridType& grid, std::vector<TargetSpace>&
P1NodalBasis<typename GridType::LeafGridView> p1Basis(grid.leafGridView());
x.resize(grid.size(dim));
for (const auto& element : elements(grid.leafGridView()))
{
for (const auto& element : elements(grid.leafGridView())) {
// Set up a local gfe function on the father element
#if DUNE_VERSION_NEWER(DUNE_GRID,2,4)
size_t nFatherDofs = element.father().subEntities(dim);
#else
size_t nFatherDofs = element.father()->template count<dim>();
#endif
std::vector<TargetSpace> coefficients(nFatherDofs);
for (int i=0; i<nFatherDofs; i++)
@@ -63,8 +67,11 @@ static void geodesicFEFunctionAdaptor(GridType& grid, std::vector<TargetSpace>&
// The embedding of this element into the father geometry
const auto& geometryInFather = element.geometryInFather();
#if DUNE_VERSION_NEWER(DUNE_GRID,2,4)
size_t nDofs = element.subEntities(dim);
#else
size_t nDofs = element.template count<dim>();
#endif
for (int i=0; i<nDofs; i++) {
if (dofMap.find(idSet.subId(element,i,dim)) != dofMap.end()) {
Loading