summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/fenics-dolfin-algorithm.patch
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-02-13 14:24:53 +0100
committerMarius Bakke <marius@gnu.org>2022-02-13 14:24:53 +0100
commit76b6bbdf232b4b82cdd23cfe0d81331a4fd2edec (patch)
tree0e6a57ba08b9c6f9f5cbcdc5b5d9daeea91e428d /gnu/packages/patches/fenics-dolfin-algorithm.patch
parent1a5302435ff0d2822b823f5a6fe01faa7a85c629 (diff)
parente8af2ea63a7f497b8f8e19e206645109c0646e72 (diff)
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches/fenics-dolfin-algorithm.patch')
-rw-r--r--gnu/packages/patches/fenics-dolfin-algorithm.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/patches/fenics-dolfin-algorithm.patch b/gnu/packages/patches/fenics-dolfin-algorithm.patch
new file mode 100644
index 0000000000..e2a3148a64
--- /dev/null
+++ b/gnu/packages/patches/fenics-dolfin-algorithm.patch
@@ -0,0 +1,37 @@
+Fix compilation errors:
+
+ dolfin/geometry/IntersectionConstruction.cpp: In static member function ‘static std::vector<dolfin::Point> dolfin::IntersectionConstruction::intersection_segment_segment_2d(const dolfin::Point&, const dolfin::Point&, const dolfin::Point&, const dolfin::Point&)’:
+ dolfin/geometry/IntersectionConstruction.cpp:442:24: error: ‘min_element’ is not a member of ‘std’; did you mean ‘tuple_element’?
+ 442 | const auto it = std::min_element(oo.begin(), oo.end());
+ | ^~~~~~~~~~~
+ | tuple_element
+
+ dolfin/mesh/MeshFunction.h: In member function ‘std::vector<long unsigned int> dolfin::MeshFunction<T>::where_equal(T)’:
+ dolfin/mesh/MeshFunction.h:652:26: error: ‘count’ is not a member of ‘std’; did you mean ‘cout’?
+ 652 | std::size_t n = std::count(_values.get(), _values.get() + _size, value);
+ | ^~~~~
+ | cout
+
+Submitted upstream at https://bitbucket.org/fenics-project/dolfin/issues/1128
+
+--- a/dolfin/geometry/IntersectionConstruction.cpp
++++ b/dolfin/geometry/IntersectionConstruction.cpp
+@@ -18,7 +18,8 @@
+ // First added: 2014-02-03
+ // Last changed: 2017-12-12
+
++#include <algorithm>
+ #include <iomanip>
+ #include <dolfin/mesh/MeshEntity.h>
+ #include "predicates.h"
+
+--- a/dolfin/mesh/MeshFunction.h
++++ b/dolfin/mesh/MeshFunction.h
+@@ -24,6 +24,7 @@
+ #ifndef __MESH_FUNCTION_H
+ #define __MESH_FUNCTION_H
+
++#include <algorithm>
+ #include <map>
+ #include <vector>
+