diff --git a/include/Algo/MovingObjects/particle_base.h b/include/Algo/MovingObjects/particle_base.h index c109248fff2e929ec0b696307e3af431a8a8ca1d..980db15eb6cec69559f04d0b4c5dd7f6957960f9 100644 --- a/include/Algo/MovingObjects/particle_base.h +++ b/include/Algo/MovingObjects/particle_base.h @@ -43,7 +43,7 @@ public: return true ; } - const typename PFP::VEC3& getPosition() + const typename PFP::VEC3& getPosition() const { return m_position ; } diff --git a/include/Algo/MovingObjects/particle_cell_2D.hpp b/include/Algo/MovingObjects/particle_cell_2D.hpp index 5a8953d9274dd302e3223bb53226dd4fb8dd9af0..7378722757bf0b01837e9b3c5bf9d6298b20ea59 100644 --- a/include/Algo/MovingObjects/particle_cell_2D.hpp +++ b/include/Algo/MovingObjects/particle_cell_2D.hpp @@ -61,7 +61,7 @@ void ParticleCell2D::vertexState(const VEC3& goal) #ifdef DEBUG CGoGNout << "vertexState" << d << CGoGNendl ; #endif - assert(goal.isNormal()) ; + assert(goal.isFinite()) ; crossCell = CROSS_OTHER ; @@ -132,7 +132,7 @@ void ParticleCell2D::edgeState(const VEC3& goal, Geom::Orientation2D sideOf CGoGNout << "edgeState" << d << CGoGNendl ; #endif - assert(goal.isNormal()) ; + assert(goal.isFinite()) ; // assert(Algo::Geometry::isPointOnEdge(m,d,m_positions,m_position)); if (crossCell == NO_CROSS) @@ -262,8 +262,8 @@ void ParticleCell2D::faceState(const VEC3& goal) CGoGNout << "faceState" << d << CGoGNendl ; #endif - assert(this->getPosition().isNormal()); - assert(goal.isNormal()) ; + assert(this->getPosition().isFinite()); + assert(goal.isFinite()) ; // assert(Algo::Geometry::isPointInConvexFace2D(m,d,m_positions,m_position,true)); Dart dd = d ; diff --git a/include/Algo/MovingObjects/particle_cell_2D_memo.hpp b/include/Algo/MovingObjects/particle_cell_2D_memo.hpp index 315a79306d5b3871b48b91d7a9563a8c93d2da2f..70363e67ad7ab7c1f755a019065ad5e1fa83c440 100644 --- a/include/Algo/MovingObjects/particle_cell_2D_memo.hpp +++ b/include/Algo/MovingObjects/particle_cell_2D_memo.hpp @@ -134,6 +134,7 @@ void ParticleCell2DMemo::edgeState(const VEC3& current, Geom::Orientation2D return ; default : this->setState(EDGE) ; + break ; } if (!Algo::Geometry::isPointOnHalfEdge < PFP diff --git a/include/Geometry/vector_gen.h b/include/Geometry/vector_gen.h index 885cc8310b7f0bdc478bbbcebfe8afc3e2f64acc..d86471cd9b9988185f1d054c68cb3d83e5ff0421 100644 --- a/include/Geometry/vector_gen.h +++ b/include/Geometry/vector_gen.h @@ -143,7 +143,7 @@ public: bool hasNan() const ; - bool isNormal() const ; + bool isFinite() const ; /** * Tests if the vector is normalized diff --git a/include/Geometry/vector_gen.hpp b/include/Geometry/vector_gen.hpp index 4c27d4b8d215bd6898160a5b6536dda3f1371c11..fb0dfd3cad2091ca9a6b33e71144fbf414e1d3b9 100644 --- a/include/Geometry/vector_gen.hpp +++ b/include/Geometry/vector_gen.hpp @@ -301,10 +301,10 @@ inline bool Vector::hasNan() const } template -inline bool Vector::isNormal() const +inline bool Vector::isFinite() const { for (unsigned int i = 0; i < DIM; ++i) - if (!std::isnormal(m_data[i])) return false ; + if (!std::isfinite(m_data[i])) return false ; return true ; }