Commit 41a5a6fd authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Fix some issues related to changes in dune-localfunctions

parent cafde68d
Pipeline #6678 passed with stage
in 7 minutes and 3 seconds
......@@ -4,6 +4,7 @@
#include <array>
#include <dune/common/exceptions.hh>
#include <dune/common/version.hh>
#include <dune/geometry/type.hh>
#include <dune/localfunctions/lagrange/equidistantpoints.hh>
......@@ -47,16 +48,29 @@ namespace Dune
}
/// Fill the lagrange points for the given topology type `Topology`
#if DUNE_VERSION_LT(DUNE_LOCALFUNCTIONS,2,8)
template <class Topology>
bool build ()
{
build(GeometryType(Topology{}));
return true;
}
#else
template <GeometryType::Id geometryId>
bool build ()
{
build(GeometryType(geometryId));
return true;
}
#endif
/// Returns whether the point set support the given topology type `Topology` and can
/// generate point for the given order.
#if DUNE_VERSION_LT(DUNE_LOCALFUNCTIONS,2,8)
template <class Topology>
#else
template <GeometryType::Id geometryId>
#endif
static bool supports (std::size_t order)
{
return true;
......
......@@ -4,6 +4,7 @@
#include <array>
#include <dune/common/exceptions.hh>
#include <dune/common/version.hh>
#include <dune/geometry/type.hh>
#include <dune/localfunctions/lagrange/equidistantpoints.hh>
......@@ -89,7 +90,11 @@ template <class K>
template <class Points>
void LagrangePointSetBuilder<K,2>::operator() (GeometryType gt, int order, Points& points) const
{
#if DUNE_VERSION_LT(DUNE_GEOMETRY,2,8)
std::size_t nPoints = numLagrangePoints(gt.id(), dim, order);
#else
std::size_t nPoints = numLagrangePoints(gt, order);
#endif
if (gt.isTriangle())
buildTriangle(nPoints, order, points);
......
......@@ -3,7 +3,7 @@ set(GRID_PATH "${CMAKE_CURRENT_SOURCE_DIR}/meshes/")
if(dune-alugrid_FOUND)
add_executable("gmsh4reader" gmsh4reader.cc)
target_link_dune_default_libraries("gmsh4reader")
target_link_libraries(gmsh4reader dunegmsh4)
target_link_libraries(gmsh4reader PRIVATE dunegmsh4)
target_compile_definitions(gmsh4reader PRIVATE "GRID_PATH=\"${GRID_PATH}\"")
endif()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment