Skip to content

add missing include in unaryoperators.hh

Currently for me building dune-fufem with all modules from the corresponding master branches results in the following error:

#6 789.2 --- calling make for dune-fufem ---
#6 789.2 build directory: build-cmake
#6 789.2 cmake --build . -- 
#6 789.3 [  3%] Generating square.msh
#6 789.3 [  3%] Built target insertionindexpermutationtest_copy_square.msh
#6 789.3 [  6%] Generating dunepythontest.py
#6 789.3 [  6%] Built target dunepythontest_copy_dunepythontest.py
#6 789.3 [ 10%] Building CXX object examples/CMakeFiles/hyperelasticity.dir/hyperelasticity.cc.o
#6 792.7 In file included from /dune/dune-fufem/dune/fufem/forms/forms.hh:13,
#6 792.7                  from /dune/dune-fufem/examples/hyperelasticity.cc:43:
#6 792.7 /dune/dune-fufem/dune/fufem/forms/unaryoperators.hh: In function 'auto Dune::Fufem::Forms::testFunction(const Basis&, Args&& ...)':
#6 792.7 /dune/dune-fufem/dune/fufem/forms/unaryoperators.hh:602:20: error: 'applyPartial' is not a member of 'Dune'
#6 792.7   602 |       return Dune::applyPartial([&](auto&&... treePathArgs){
#6 792.7       |                    ^~~~~~~~~~~~
#6 792.7 /dune/dune-fufem/dune/fufem/forms/unaryoperators.hh: In function 'auto Dune::Fufem::Forms::trialFunction(const Basis&, Args&& ...)':
#6 792.7 /dune/dune-fufem/dune/fufem/forms/unaryoperators.hh:681:20: error: 'applyPartial' is not a member of 'Dune'
#6 792.7   681 |       return Dune::applyPartial([&](auto&&... treePathArgs){
#6 792.7       |                    ^~~~~~~~~~~~
#6 798.1 gmake[2]: *** [examples/CMakeFiles/hyperelasticity.dir/build.make:76: examples/CMakeFiles/hyperelasticity.dir/hyperelasticity.cc.o] Error 1
#6 798.1 gmake[1]: *** [CMakeFiles/Makefile2:2456: examples/CMakeFiles/hyperelasticity.dir/all] Error 2
#6 798.1 gmake: *** [Makefile:146: all] Error 2
#6 798.1 --- Failed to build dune-fufem ---                  ^~~~~~~~~~~~

I don't know why it works in the CI but this MR adds explicitely the header #include <dune/common/tupleutility.hh>, where applyPartial resides. See also dune-common.

I'm not hundred percent sure if this fixes it, because the CI runs anyway. I use gcc 12.2 with debian 12. There is no Ci image at least I couldn't find it. I also don't know why this error emerged now :/.

core/dune-common@53305824 may have to do with it. but then I still dont know why not everything fails.

Edited by Alexander Müller

Merge request reports

Loading