diff --git a/src/level_set/particle_cp/particle_cp.hpp b/src/level_set/particle_cp/particle_cp.hpp index d7720a2290a6bcfb4ac70c3117f1771821b7aa70..8b8401a884226b00b7e3efbdfc0bb9f9d7c9c6fa 100644 --- a/src/level_set/particle_cp/particle_cp.hpp +++ b/src/level_set/particle_cp/particle_cp.hpp @@ -88,7 +88,12 @@ public: void run_redistancing() { - if (redistOptions.verbose) std::cout<<"Minterpol variable is "<<minterpol<<std::endl; + if (redistOptions.verbose) + { + std::cout<<"Verbose mode. Make sure the vd.getProp<4>(a) is an integer that pcp can write surface flags onto."<<std::endl; + std::cout<<"Minterpol variable is "<<minterpol<<std::endl; + } + detect_surface_particles(); interpolate_sdf_field(); @@ -166,7 +171,7 @@ private: int num_neibs_a = 0; double min_sdf = abs(vd_in.template getProp<vd_in_sdf>(akey)); vect_dist_key_dx min_sdf_key = akey; - vd_in.template getProp<vd_in_close_part>(akey) = 0; + if (redistOptions.verbose) vd_in.template getProp<vd_in_close_part>(akey) = 0; int isclose = 0; auto Np = NN.template getNNIterator<NO_CHECK>(NN.getCell(xa)); @@ -201,12 +206,12 @@ private: if (isclose) // these guys will carry an interpolation polynomial and a resulting sample point { vd_s.template getLastProp<vd_s_close_part>() = 1; - vd_in.template getProp<vd_in_close_part>(akey) = 1; // use this for the optimization step + if (redistOptions.verbose) vd_in.template getProp<vd_in_close_part>(akey) = 1; } else // these particles will not carry an interpolation polynomial { vd_s.template getLastProp<vd_s_close_part>() = 0; - vd_in.template getProp<vd_in_close_part>(akey) = 0; // use this for the optimization step + if (redistOptions.verbose) vd_in.template getProp<vd_in_close_part>(akey) = 0; } } ++part; diff --git a/src/level_set/particle_cp/pcp_unit_tests.cpp b/src/level_set/particle_cp/pcp_unit_tests.cpp index 30aa41b2b819428586d71f4b291beeb26d7d70f1..e525f7faf50234aaad38aa836a8586542d469588 100644 --- a/src/level_set/particle_cp/pcp_unit_tests.cpp +++ b/src/level_set/particle_cp/pcp_unit_tests.cpp @@ -89,15 +89,14 @@ BOOST_AUTO_TEST_CASE( ellipsoid ) constexpr int cp = 1; constexpr int normal = 2; constexpr int curvature = 3; - constexpr int surf_flag = 4; - constexpr int ref_cp = 5; - typedef vector_dist<3, double, aggregate<double, Point<3, double>, Point<3, double>, double, int, Point<3, double>>> particles; - // | | | | | | - // SDF closest point | curvature surf flag | + constexpr int ref_cp = 4; + typedef vector_dist<3, double, aggregate<double, Point<3, double>, Point<3, double>, double, Point<3, double>>> particles; + // | | | | | + // SDF closest point | curvature | // surface normal reference closest point particles vd(0, domain, bc, g, DEC_GRAN(512)); - openfpm::vector<std::string> names({"sdf","cp","normal","curvature","C flag", "ref_cp"}); + openfpm::vector<std::string> names({"sdf","cp","normal","curvature","ref_cp"}); vd.setPropNames(names); EllipseParameters params; for (int k = 0; k < 3; k++) params.origin[k] = 0.0;