File: test_dof_to_vertex_map_PETScVector.patch

package info (click to toggle)
dolfin 2019.2.0~legacy20240219.1c52e83-24
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,012 kB
  • sloc: xml: 104,040; cpp: 102,227; python: 24,356; sh: 462; makefile: 330; javascript: 226
file content (13 lines) | stat: -rw-r--r-- 664 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
Index: dolfin/python/test/unit/fem/test_dofmap.py
===================================================================
--- dolfin.orig/python/test/unit/fem/test_dofmap.py	2024-01-03 04:40:14.872984929 +0100
+++ dolfin/python/test/unit/fem/test_dofmap.py	2024-01-03 04:40:49.797520168 +0100
@@ -280,7 +280,7 @@
 
     dim = Q.dofmap().index_map().size(IndexMap.MapSize.OWNED)
     u1.vector().set_local(vert_values[dof_to_vertex_map(Q)[:dim]].copy())
-    assert round((u0.vector()-u1.vector()).sum() - 0.0, 7) == 0
+    assert round((u0.vector()[:]-u1.vector()[:]).sum() - 0.0, 7) == 0
 
     W = FunctionSpace(mesh, "DG", 0)
     with pytest.raises(RuntimeError):