Commit 0f02b8a5 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/fix-issues-with-2-8' into 'master'

Fix some issues related to changes in dune-localfunctions

See merge request !10
parents cafde68d b9fab896
Pipeline #6681 passed with stage
in 6 minutes and 15 seconds
......@@ -8,6 +8,7 @@
#include <dune/common/exceptions.hh>
#include <dune/common/hybridutilities.hh>
#include <dune/common/version.hh>
#include <dune/geometry/utility/typefromvertexcount.hh>
#include <dune/geometry/multilineargeometry.hh>
#include <dune/localfunctions/lagrange.hh>
......@@ -205,7 +206,11 @@ namespace Dune
GeometryType type = localParam.type;
int nNodes = localParam.nodes.size();
for (int o = 1; o <= nNodes; ++o)
#if DUNE_VERSION_LT(DUNE_LOCALFUNCTIONS,2,8)
if (numLagrangePoints(type.id(), type.dim(), o) == std::size_t(nNodes))
#else
if (numLagrangePoints(type, o) == std::size_t(nNodes))
#endif
return o;
return 1;
......
......@@ -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);
......@@ -262,7 +267,11 @@ template <class K>
template <class Points>
void LagrangePointSetBuilder<K,3>::operator() (GeometryType gt, unsigned int order, Points& points) const
{
#if DUNE_VERSION_LT(DUNE_LOCALFUNCTIONS,2,8)
std::size_t nPoints = numLagrangePoints(gt.id(), dim, order);
#else
std::size_t nPoints = numLagrangePoints(gt, order);
#endif
if (gt.isTetrahedron())
buildTetra(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