Git Product home page Git Product logo

Comments (6)

griff10000 avatar griff10000 commented on June 12, 2024 1

Not sure if this is the same problem, but creating an ellipse generates spurious points on the periphery. Windows 10, python 3.8.3, Anaconda.

import dmsh
geo = dmsh.Ellipse([0.0, 0.0], 2.0, 1.0)

edge_size=0.2

X, cells = dmsh.generate(geo, edge_size, tol=1.0e-10) # does not help

dmsh.helpers.show(X, cells, geo)

ellipse

from dmsh.

nschloe avatar nschloe commented on June 12, 2024

Phew, that's a tough one. I just tried it on two different machines and couldn't reproduce the failure either. I'd suggest relaxing the test tolerance to 1.0e-1 (or whatever is needed) until we found the issue.

from dmsh.

nschloe avatar nschloe commented on June 12, 2024

I was able to reproduce this on my own machine now; probably some update caused this. I've now relaxed the test tolerances quite a bit, hopefully that'll also satisfy the debian builds.

from dmsh.

drew-parsons avatar drew-parsons commented on June 12, 2024

Finally I've had to use these tolerances

--- a/test/test_translation.py
+++ b/test/test_translation.py
@@ -7,7 +7,7 @@
     X, cells = dmsh.generate(geo, 0.1, show=show)
 
     ref_norms = [1.7525e03, 5.5677441324948013e01, 3.0]
-    assert_norm_equality(X.flatten(), ref_norms, 1.0e-10)
+    assert_norm_equality(X.flatten(), ref_norms, 1.0e-5)
 
 
 if __name__ == "__main__":
--- a/test/test_halfspace.py
+++ b/test/test_halfspace.py
@@ -14,7 +14,7 @@
     X, cells = dmsh.generate(geo, 0.1, show=show)
 
     ref_norms = [1.6445971629723411e02, 1.0032823867864321e01, 9.9962000746451751e-01]
-    assert_norm_equality(X.flatten(), ref_norms, 1.0e-10)
+    assert_norm_equality(X.flatten(), ref_norms, 1.0e-7)
     return X, cells
 
 
--- a/test/test_refinement_point_line.py
+++ b/test/test_refinement_point_line.py
@@ -14,7 +14,7 @@
     X, cells = dmsh.generate(geo, edge_size, show=show, tol=1.0e-10)
 
     ref_norms = [3.8844963377954718e02, 1.5689926870601147e01, 1.0000000000000000e00]
-    assert_norm_equality(X.flatten(), ref_norms, 1.0e-3)
+    assert_norm_equality(X.flatten(), ref_norms, 2.0e-3)
     return X, cells
 
 
--- a/test/test_square_hole_refined.py
+++ b/test/test_square_hole_refined.py
@@ -14,7 +14,7 @@
     )
 
     ref_norms = [2.48e02, 1.200e01, 1.0]
-    assert_norm_equality(X.flatten(), ref_norms, 1.0e-3)
+    assert_norm_equality(X.flatten(), ref_norms, 4.0e-3)
     return X, cells

test_refinement_point_line.py and test_square_hole_refined.py needed to be relaxed for arm64, ppc64el, but the other 2 affected amd64.

from dmsh.

nschloe avatar nschloe commented on June 12, 2024

Feel free to PR those, I'll merge it if it makes things easier for you.

from dmsh.

nschloe avatar nschloe commented on June 12, 2024

@griff10000 It's not the same issue.

from dmsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.