Skip to content

Commit 458d62e

Browse files
committed
fix(OG-Inspector): Rename global_epsilon to GLOBAL_EPSILON (const variable name convention)
1 parent 53cecab commit 458d62e

16 files changed

+49
-49
lines changed

bindings/python/tests/test-py-edgedcurve-colocation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def check_colocation2D():
5656
builder.set_point(2, geode.Point2D([0., 0.]))
5757
builder.set_point(3, geode.Point2D([2., 0.]))
5858
builder.set_point(4, geode.Point2D([1., 4.]))
59-
builder.set_point(5, geode.Point2D([2., geode.global_epsilon / 2]))
60-
builder.set_point(6, geode.Point2D([geode.global_epsilon / 1.1, 2.]))
59+
builder.set_point(5, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
60+
builder.set_point(6, geode.Point2D([geode.GLOBAL_EPSILON / 1.1, 2.]))
6161

6262
colocation_inspector = inspector.EdgedCurveColocation2D(curve)
6363
if not colocation_inspector.mesh_has_colocated_points():
@@ -103,8 +103,8 @@ def check_colocation3D():
103103
builder.set_point(3, geode.Point3D([2., 0., 0.]))
104104
builder.set_point(4, geode.Point3D([1., 4., 3.]))
105105
builder.set_point(
106-
5, geode.Point3D([2., geode.global_epsilon / 2, geode.global_epsilon / 2]))
107-
builder.set_point(6, geode.Point3D([geode.global_epsilon / 1.1, 2., 1.]))
106+
5, geode.Point3D([2., geode.GLOBAL_EPSILON / 2, geode.GLOBAL_EPSILON / 2]))
107+
builder.set_point(6, geode.Point3D([geode.GLOBAL_EPSILON / 1.1, 2., 1.]))
108108

109109
colocation_inspector = inspector.EdgedCurveColocation3D(curve)
110110
if not colocation_inspector.mesh_has_colocated_points():

bindings/python/tests/test-py-edgedcurve-degeneration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def check_degeneration_by_colocalisation2D():
5656
builder.create_vertices(3)
5757
builder.set_point(0, geode.Point2D([0., 2.]))
5858
builder.set_point(1, geode.Point2D([2., 0.]))
59-
builder.set_point(2, geode.Point2D([2., geode.global_epsilon / 2]))
59+
builder.set_point(2, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
6060

6161
builder.create_edge_with_vertices(0, 1)
6262
builder.create_edge_with_vertices(0, 2)
@@ -99,8 +99,8 @@ def check_degeneration_by_colocalisation3D():
9999
builder.create_vertices(3)
100100
builder.set_point(0, geode.Point3D([0., 2., 0.]))
101101
builder.set_point(1, geode.Point3D([2., 0., 0.5]))
102-
builder.set_point(2, geode.Point3D([2., geode.global_epsilon / 2,
103-
0.5 + geode.global_epsilon / 2]))
102+
builder.set_point(2, geode.Point3D([2., geode.GLOBAL_EPSILON / 2,
103+
0.5 + geode.GLOBAL_EPSILON / 2]))
104104

105105
builder.create_edge_with_vertices(0, 1)
106106
builder.create_edge_with_vertices(0, 2)

bindings/python/tests/test-py-pointset-colocation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def check_colocation2D():
5757
builder.set_point(2, geode.Point2D([0., 0.]))
5858
builder.set_point(3, geode.Point2D([2., 0.]))
5959
builder.set_point(4, geode.Point2D([1., 4.]))
60-
builder.set_point(5, geode.Point2D([2., geode.global_epsilon / 2]))
61-
builder.set_point(6, geode.Point2D([geode.global_epsilon / 1.1, 2.]))
60+
builder.set_point(5, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
61+
builder.set_point(6, geode.Point2D([geode.GLOBAL_EPSILON / 1.1, 2.]))
6262

6363
colocation_inspector = inspector.PointSetColocation2D(pointset)
6464
if not colocation_inspector.mesh_has_colocated_points():
@@ -104,8 +104,8 @@ def check_colocation3D():
104104
builder.set_point(3, geode.Point3D([2., 0., 0.]))
105105
builder.set_point(4, geode.Point3D([1., 4., 3.]))
106106
builder.set_point(
107-
5, geode.Point3D([2., geode.global_epsilon / 2, geode.global_epsilon / 2]))
108-
builder.set_point(6, geode.Point3D([geode.global_epsilon / 1.1, 2., 1.]))
107+
5, geode.Point3D([2., geode.GLOBAL_EPSILON / 2, geode.GLOBAL_EPSILON / 2]))
108+
builder.set_point(6, geode.Point3D([geode.GLOBAL_EPSILON / 1.1, 2., 1.]))
109109

110110
colocation_inspector = inspector.PointSetColocation3D(pointset)
111111
if not colocation_inspector.mesh_has_colocated_points():

bindings/python/tests/test-py-solid-colocation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ def check_colocation():
5858
builder.set_point(3, geode.Point3D([5., 2., 0.]))
5959
builder.set_point(4, geode.Point3D([1., 4., 3.]))
6060
builder.set_point(5,
61-
geode.Point3D([5., 2. + geode.global_epsilon / 2, geode.global_epsilon / 2]))
61+
geode.Point3D([5., 2. + geode.GLOBAL_EPSILON / 2, geode.GLOBAL_EPSILON / 2]))
6262
builder.set_point(6, geode.Point3D(
63-
[5. + geode.global_epsilon / 1.1, 2., 1.]))
63+
[5. + geode.GLOBAL_EPSILON / 1.1, 2., 1.]))
6464

6565
colocation_inspector = inspector.SolidMeshColocation3D(solid)
6666
if not colocation_inspector.mesh_has_colocated_points():

bindings/python/tests/test-py-solid-degeneration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def check_degeneration_by_colocalisation():
5959
builder.set_point(1, geode.Point3D([3., 3., 0.]))
6060
builder.set_point(2, geode.Point3D([-0.5, 4., -1.]))
6161
builder.set_point(3, geode.Point3D([1., 3., 3.]))
62-
builder.set_point(4, geode.Point3D([3., 3., -geode.global_epsilon / 2]))
62+
builder.set_point(4, geode.Point3D([3., 3., -geode.GLOBAL_EPSILON / 2]))
6363

6464
builder.create_tetrahedron([0, 1, 3, 2])
6565
builder.create_tetrahedron([0, 1, 4, 2])

bindings/python/tests/test-py-surface-colocation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def check_colocation2D():
5656
builder.set_point(2, geode.Point2D([0., 0.]))
5757
builder.set_point(3, geode.Point2D([2., 0.]))
5858
builder.set_point(4, geode.Point2D([1., 4.]))
59-
builder.set_point(5, geode.Point2D([2., geode.global_epsilon / 2]))
60-
builder.set_point(6, geode.Point2D([geode.global_epsilon / 1.1, 2.]))
59+
builder.set_point(5, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
60+
builder.set_point(6, geode.Point2D([geode.GLOBAL_EPSILON / 1.1, 2.]))
6161

6262
colocation_inspector = inspector.SurfaceMeshColocation2D(surface)
6363
if not colocation_inspector.mesh_has_colocated_points():
@@ -103,8 +103,8 @@ def check_colocation3D():
103103
builder.set_point(3, geode.Point3D([2., 0., 0.]))
104104
builder.set_point(4, geode.Point3D([1., 4., 3.]))
105105
builder.set_point(
106-
5, geode.Point3D([2., geode.global_epsilon / 2, geode.global_epsilon / 2]))
107-
builder.set_point(6, geode.Point3D([geode.global_epsilon / 1.1, 2., 1.]))
106+
5, geode.Point3D([2., geode.GLOBAL_EPSILON / 2, geode.GLOBAL_EPSILON / 2]))
107+
builder.set_point(6, geode.Point3D([geode.GLOBAL_EPSILON / 1.1, 2., 1.]))
108108

109109
colocation_inspector = inspector.SurfaceMeshColocation3D(surface)
110110
if not colocation_inspector.mesh_has_colocated_points():

bindings/python/tests/test-py-surface-degeneration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def check_degeneration_by_colocalisation2D():
5757
builder.set_point(0, geode.Point2D([0., 2.]))
5858
builder.set_point(1, geode.Point2D([2., 0.]))
5959
builder.set_point(2, geode.Point2D([1., 4.]))
60-
builder.set_point(3, geode.Point2D([2., geode.global_epsilon / 2]))
60+
builder.set_point(3, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
6161

6262
builder.create_triangle([0, 1, 2])
6363
builder.create_triangle([2, 1, 3])
@@ -124,8 +124,8 @@ def check_degeneration_by_colocalisation3D():
124124
builder.set_point(0, geode.Point3D([0., 2., 0.]))
125125
builder.set_point(1, geode.Point3D([2., 0., 0.5]))
126126
builder.set_point(2, geode.Point3D([1., 4., 1.]))
127-
builder.set_point(3, geode.Point3D([2., geode.global_epsilon / 2,
128-
0.5 + geode.global_epsilon / 2]))
127+
builder.set_point(3, geode.Point3D([2., geode.GLOBAL_EPSILON / 2,
128+
0.5 + geode.GLOBAL_EPSILON / 2]))
129129

130130
builder.create_triangle([0, 1, 2])
131131
builder.create_triangle([2, 1, 3])

src/geode/inspector/criterion/private/colocation_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ namespace geode
110110
ColocationImpl< dimension, Mesh >::mesh_has_colocated_points() const
111111
{
112112
return mesh_points_colocated_info< dimension, Mesh >(
113-
mesh_, global_epsilon )
113+
mesh_, GLOBAL_EPSILON )
114114
.nb_colocated_points()
115115
> 0;
116116
}
@@ -121,7 +121,7 @@ namespace geode
121121
{
122122
const auto colocated_points_indices =
123123
::colocated_points_groups< dimension, Mesh >(
124-
mesh_, global_epsilon );
124+
mesh_, GLOBAL_EPSILON );
125125
return colocated_points_indices;
126126
}
127127

src/geode/inspector/criterion/private/degeneration_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ namespace geode
9494
mesh_.edges().edge_vertices( edge_index );
9595
const auto p1 = mesh_.point( edge_vertices[0] );
9696
const auto p2 = mesh_.point( edge_vertices[1] );
97-
return point_point_distance( p1, p2 ) < global_epsilon;
97+
return point_point_distance( p1, p2 ) < GLOBAL_EPSILON;
9898
}
9999

100100
template < class MeshType >

tests/inspector/test-edgedcurve-colocation.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ void check_colocation2D()
5959
builder->set_point( 3, geode::Point2D{ { 2., 0. } } );
6060
builder->set_point( 4, geode::Point2D{ { 1., 4. } } );
6161
builder->set_point(
62-
5, geode::Point2D{ { 2., geode::global_epsilon / 2 } } );
62+
5, geode::Point2D{ { 2., geode::GLOBAL_EPSILON / 2 } } );
6363
builder->set_point(
64-
6, geode::Point2D{ { geode::global_epsilon / 1.1, 2. } } );
64+
6, geode::Point2D{ { geode::GLOBAL_EPSILON / 1.1, 2. } } );
6565

6666
const geode::EdgedCurveColocation2D colocation_inspector{ *curve };
6767
OPENGEODE_EXCEPTION( colocation_inspector.mesh_has_colocated_points(),
@@ -117,10 +117,10 @@ void check_colocation3D()
117117
builder->set_point( 2, geode::Point3D{ { 0., 0., 0. } } );
118118
builder->set_point( 3, geode::Point3D{ { 2., 0., 0. } } );
119119
builder->set_point( 4, geode::Point3D{ { 1., 4., 3. } } );
120-
builder->set_point( 5, geode::Point3D{ { 2., geode::global_epsilon / 2,
121-
geode::global_epsilon / 2 } } );
120+
builder->set_point( 5, geode::Point3D{ { 2., geode::GLOBAL_EPSILON / 2,
121+
geode::GLOBAL_EPSILON / 2 } } );
122122
builder->set_point(
123-
6, geode::Point3D{ { geode::global_epsilon / 1.1, 2., 1. } } );
123+
6, geode::Point3D{ { geode::GLOBAL_EPSILON / 1.1, 2., 1. } } );
124124

125125
const geode::EdgedCurveColocation3D colocation_inspector{ *curve };
126126
OPENGEODE_EXCEPTION( colocation_inspector.mesh_has_colocated_points(),

0 commit comments

Comments
 (0)