Misc minor changes

This commit is contained in:
Mael Rouxel-Labbé 2019-06-07 13:54:24 +02:00
parent b0cb1cc640
commit 1aaba3a275
4 changed files with 10 additions and 8 deletions

View File

@ -156,8 +156,6 @@ A simple example can be found in `Polygon_mesh_processing/shape_smoothing_exampl
(b) Shape smoothing of the devil using the mean curvature flow with a time step equal to 0.5. The result is conformally equivalent to the original mesh. (b) Shape smoothing of the devil using the mean curvature flow with a time step equal to 0.5. The result is conformally equivalent to the original mesh.
\cgalFigureEnd \cgalFigureEnd
\subsection MeshingExamples Meshing Examples \subsection MeshingExamples Meshing Examples
\subsubsection MeshingExample_1 Refine and Fair a Region on a Triangle Mesh \subsubsection MeshingExample_1 Refine and Fair a Region on a Triangle Mesh

View File

@ -180,7 +180,9 @@ public:
// calls compute once to factorize with the preconditioner // calls compute once to factorize with the preconditioner
if(!solver.factor(A, D)) if(!solver.factor(A, D))
{ {
#ifdef CGAL_PMP_SMOOTHING_VERBOSE
std::cerr << "Could not factorize linear system with preconditioner." << std::endl; std::cerr << "Could not factorize linear system with preconditioner." << std::endl;
#endif
return false; return false;
} }
@ -188,7 +190,9 @@ public:
!solver.linear_solver(by, Xy) || !solver.linear_solver(by, Xy) ||
!solver.linear_solver(bz, Xz)) !solver.linear_solver(bz, Xz))
{ {
#ifdef CGAL_PMP_SMOOTHING_VERBOSE
std::cerr << "Could not solve linear system." << std::endl; std::cerr << "Could not solve linear system." << std::endl;
#endif
return false; return false;
} }

View File

@ -34,8 +34,10 @@
#include <CGAL/utility.h> #include <CGAL/utility.h>
#include <CGAL/property_map.h> #include <CGAL/property_map.h>
#ifdef CGAL_PMP_SMOOTHING_OUTPUT_INTERMEDIARY_STEPS
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#endif
namespace CGAL { namespace CGAL {
namespace Polygon_mesh_processing { namespace Polygon_mesh_processing {
@ -74,7 +76,7 @@ namespace Polygon_mesh_processing {
* sequence of the smoothing iterations performed. Each iteration is performed * sequence of the smoothing iterations performed. Each iteration is performed
* with the given time step. * with the given time step.
* \cgalParamEnd * \cgalParamEnd
* \cgalParamBegin{sparse_linear_solver} an instance of the sparse linear solver used for smoothing \cgalParamEnd * \cgalParamBegin{sparse_linear_solver} an instance of the sparse linear solver used for smoothing \cgalParamEnd
* \cgalParamEnd * \cgalParamEnd
* \cgalNamedParamsEnd * \cgalNamedParamsEnd
* *
@ -153,7 +155,7 @@ void smooth_along_curvature_flow(const FaceRange& faces,
for(std::size_t iter=0; iter<nb_iterations; ++iter) for(std::size_t iter=0; iter<nb_iterations; ++iter)
{ {
#ifdef CGAL_PMP_SMOOTHING_VERBOSE #ifdef CGAL_PMP_SMOOTHING_VERBOSE
std::cout << "iteration #" << i << std::endl; std::cout << "iteration #" << iter << std::endl;
#endif #endif
smoother.setup_system(A, bx, by, bz, stiffness, time); smoother.setup_system(A, bx, by, bz, stiffness, time);
@ -163,10 +165,9 @@ void smooth_along_curvature_flow(const FaceRange& faces,
else else
break; break;
#ifdef CGAL_PMP_SMOOTHING_VERBOSE #ifdef CGAL_PMP_SMOOTHING_OUTPUT_INTERMEDIARY_STEPS
// @tmp (clean fstream sstream includes too)
std::stringstream oss; std::stringstream oss;
oss << "intermediate_" << iter << ".off" << std::ends; oss << "smoothed_mesh_step_" << iter << ".off" << std::ends;
std::ofstream out(oss.str().c_str()); std::ofstream out(oss.str().c_str());
out.precision(17); out.precision(17);
out << tmesh; out << tmesh;

View File

@ -211,7 +211,6 @@ int main(int, char**)
set_halfedgeds_items_id(pl_mesh_devil); set_halfedgeds_items_id(pl_mesh_devil);
set_halfedgeds_items_id(pl_mesh_pyramid); set_halfedgeds_items_id(pl_mesh_pyramid);
test_demo_helpers<Mesh_with_id>(pl_mesh_devil);
test_curvature_flow_time_step<Mesh_with_id>(pl_mesh_devil); test_curvature_flow_time_step<Mesh_with_id>(pl_mesh_devil);
test_curvature_flow<Mesh_with_id>(pl_mesh_pyramid); test_curvature_flow<Mesh_with_id>(pl_mesh_pyramid);
test_implicit_constrained_pyramid<Mesh_with_id>(pl_mesh_pyramid); test_implicit_constrained_pyramid<Mesh_with_id>(pl_mesh_pyramid);