diff --git a/Solver_interface/doc/Solver_interface/CGAL/Eigen_solver_traits.h b/Solver_interface/doc/Solver_interface/CGAL/Eigen_solver_traits.h index c5850c93336..10a82acd965 100644 --- a/Solver_interface/doc/Solver_interface/CGAL/Eigen_solver_traits.h +++ b/Solver_interface/doc/Solver_interface/CGAL/Eigen_solver_traits.h @@ -17,25 +17,6 @@ The version 3.1 (or greater) of \ref thirdpartyEigen "Eigen" must be available o \sa `CGAL::Eigen_sparse_symmetric_matrix` \sa `CGAL::Eigen_vector` -Example --------------- - -The instantiation of this class assumes an \ref thirdpartyEigen "Eigen" sparse solver is provided. Here are few examples: - -\code{.cpp} - -typedef CGAL::Eigen_sparse_matrix::EigenType EigenMatrix; - -//iterative general solver -typedef CGAL::Eigen_solver_traits< Eigen::BiCGSTAB > Iterative_general_solver; - -//iterative symmetric solver -typedef CGAL::Eigen_solver_traits< Eigen::ConjugateGradient > Iterative_symmetric_solver; - -//direct symmetric solver -typedef CGAL::Eigen_solver_traits< Eigen::SimplicialCholesky > Direct_symmetric_solver; - -\endcode */ template< typename T > diff --git a/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h index dfaf510ebae..1da0282a169 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h +++ b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraitsWithFactor_d.h @@ -31,16 +31,16 @@ SparseLinearAlgebraTraitsWithFactor_d(); /// @{ /*! -Factorize the sparse matrix A. -This factorization is used in SparseLinearAlgebraTraitsWithFactor_d::linear_solver to solve the system for different right-hand side vectors. + Factorize the sparse matrix `A`. +This factorization is used in `SparseLinearAlgebraTraitsWithFactor_d::linear_solver()` to solve the system for different right-hand side vectors. See `::SparseLinearAlgebraTraits_d::linear_solver()` for the description of `D`. -@return true if the factorization is successful +@return `true` if the factorization is successful */ bool factor(const Matrix& A, NT& D); /*! -Solve the sparse linear system \f$ A \times X = B\f$, with \f$ A \f$ being the matrix provided in SparseLinearAlgebraTraitsWithFactor_d::factor. -@return true if the solver is successful +Solve the sparse linear system \f$ A \times X = B\f$, with \f$ A \f$ being the matrix provided in `SparseLinearAlgebraTraitsWithFactor_d::factor()`. +@return `true` if the solver is successful */ bool linear_solver(const Vector& B, Vector& X); diff --git a/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h index d7aee80b141..b6fc4e8c57d 100644 --- a/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h +++ b/Solver_interface/doc/Solver_interface/Concepts/SparseLinearAlgebraTraits_d.h @@ -8,8 +8,6 @@ The concept `SparseLinearAlgebraTraits_d` is used to solve sparse linear systems \cgalHasModel `CGAL::Eigen_solver_traits` -\cgalHasModel `OpenNL::DefaultLinearSolverTraits` in OpenNL package -\cgalHasModel `OpenNL::SymmetricLinearSolverTraits` in OpenNL package */ @@ -73,7 +71,6 @@ bool linear_solver(const Matrix& A, const Vector& B, Vector& X, NT& D); `SparseLinearAlgebraTraits_d::Vector` is a concept of a vector that can be multiplied by a sparse matrix. \cgalHasModel `CGAL::Eigen_vector` -\cgalHasModel `OpenNL::FullVector` in the `OpenNL` package \sa `SparseLinearAlgebraTraits_d` \sa `SparseLinearAlgebraTraits_d::Matrix` @@ -148,7 +145,6 @@ NT& operator[](int row); \cgalHasModel `CGAL::Eigen_sparse_matrix` \cgalHasModel `CGAL::Eigen_sparse_symmetric_matrix` -\cgalHasModel `OpenNL::SparseMatrix` in `OpenNL` package \sa `SparseLinearAlgebraTraits_d` \sa `SparseLinearAlgebraTraits_d::Vector` diff --git a/Solver_interface/doc/Solver_interface/Solver_interface.txt b/Solver_interface/doc/Solver_interface/Solver_interface.txt index 4f5998554ad..d49d4361688 100644 --- a/Solver_interface/doc/Solver_interface/Solver_interface.txt +++ b/Solver_interface/doc/Solver_interface/Solver_interface.txt @@ -15,12 +15,31 @@ all use the \ref thirdpartyEigen library. -\section SectionSolverConcepts Solver Concepts - - - \section SectionSolverEigen Eigen +An interface to all sparse solvers from the \ref thirdpartyEigen +library is provided through the class +`Eigen_solver_traits`. This solver traits class can be used for an +iterative or a direct, symmetric or general sparse solvers. The +specific solver to be used must be given as template +parameter. + +Here are few examples: + +\code{.cpp} + +typedef CGAL::Eigen_sparse_matrix::EigenType EigenMatrix; + +//iterative general solver +typedef CGAL::Eigen_solver_traits< Eigen::BiCGSTAB > Iterative_general_solver; + +//iterative symmetric solver +typedef CGAL::Eigen_solver_traits< Eigen::ConjugateGradient > Iterative_symmetric_solver; + +//direct symmetric solver +typedef CGAL::Eigen_solver_traits< Eigen::SimplicialCholesky > Direct_symmetric_solver; + +\endcode diff --git a/Solver_interface/include/CGAL/Eigen_solver_traits.h b/Solver_interface/include/CGAL/Eigen_solver_traits.h index 569fad546d3..27d77321d9e 100644 --- a/Solver_interface/include/CGAL/Eigen_solver_traits.h +++ b/Solver_interface/include/CGAL/Eigen_solver_traits.h @@ -79,6 +79,7 @@ class Eigen_solver_traits typedef typename EigenSolverT::Scalar Scalar; // Public types public: + typedef EigenSolverT Solver; typedef Scalar NT; typedef typename internal::Get_eigen_matrix::type Matrix; typedef Eigen_vector Vector; @@ -143,6 +144,7 @@ class Eigen_solver_traits< Eigen::BiCGSTAB::EigenTyp typedef EigenSolverT::Scalar Scalar; // Public types public: + typedef EigenSolverT Solver; typedef Scalar NT; typedef internal::Get_eigen_matrix::type Matrix; typedef Eigen_vector Vector; diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt index 9d2af5f10a9..f3818718c66 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt @@ -54,7 +54,7 @@ This \cgal package implements several parameterization methods: - `CGAL::Barycentric_mapping_parameterizer_3` - `CGAL::Discrete_authalic_parameterizer_3` - `CGAL::Discrete_conformal_map_parameterizer_3` -- `CGAL::LSCM_parameterizer_3` +- `CGAL::LSCM_parameterizer_3` - `CGAL::Mean_value_coordinates_parameterizer_3` ## Border Parameterization Methods ## @@ -121,16 +121,6 @@ The package provides an interface with `CGAL::Polyhedron_3`: A `(u,v)` pair is computed for each inner vertex (i.e.\ its halfedges share the same `(u,v)` pair), while a `(u,v)` pair is computed for each border halfedge. The user must iterate over the mesh halfedges to get the result. -## Sparse Linear Algebra ## - -Since parameterizing meshes requires -efficient representation of sparse matrices and efficient iterative or -direct linear solvers, we provide an interface to several -sparse linear solvers: - - Eigen 3.1 (or greater) is the library recommended by %CGAL solving sparse systems. - - OpenNL (authored by Bruno Lévy) is shipped with %CGAL is the default solver. - - `OpenNL::DefaultLinearSolverTraits` in OpenNL package - - `OpenNL::SymmetricLinearSolverTraits` in OpenNL package ## Helper Classes ## @@ -249,18 +239,6 @@ The package provides an interface with `CGAL::Polyhedron_3`: -/*! \defgroup PkgSurfaceParameterizationAlgebra Sparse Linear Algebra - \ingroup PkgSurfaceParameterization - -Since parameterizing meshes requires -efficient representation of sparse matrices and efficient iterative or -direct linear solvers, we provide an interface to several -sparse linear solvers: - - Eigen 3.1 (or greater) is the library recommended by %CGAL solving sparse systems. - - OpenNL (authored by Bruno Lévy) is shipped with %CGAL is the default solver. - - `OpenNL::DefaultLinearSolverTraits` in OpenNL package - - `OpenNL::SymmetricLinearSolverTraits` in OpenNL package -*/ /*! \defgroup PkgSurfaceParameterizationHelper Helper Class diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt index c431ce598a6..86e3d101201 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt @@ -40,9 +40,8 @@ data structure. Since parameterizing meshes require efficient representation of sparse matrices and efficient iterative or direct linear solvers, we provide -a unified interface to a linear solver library (\ref thirdpartyEigen "Eigen"), -and propose a separate package devoted to OpenNL sparse -linear solver. +a unified interface to linear solvers as described in Chapter +\ref PkgSolverSummary. Note that linear solvers commonly use double precision floating point numbers. Therefore, this package is intended to be used with a \cgal %Cartesian kernel with doubles. @@ -69,8 +68,8 @@ Parameterizer_traits_3::Error_code parameterize (Paramet The function `parameterize()` applies a default surface parameterization method, namely Floater Mean Value Coordinates \cgalCite{cgal:f-mvc-03}, with an -arc-length circular border parameterization, and using OpenNL sparse -linear solver \cgalCite{cgal:l-nmdgp-05}. The `ParameterizationMesh_3` concept defines the input meshes handled by `parameterize()`. See Section \ref secInputMeshforparameterize. The result is stored into the `(u,v)` fields of the mesh halfedges. +arc-length circular border parameterization, and using a sparse +linear solver from the \thirdpartyEigen library. The `ParameterizationMesh_3` concept defines the input meshes handled by `parameterize()`. See Section \ref secInputMeshforparameterize. The result is stored into the `(u,v)` fields of the mesh halfedges. The mesh must be a triangle mesh surface with one connected component. Note: `Parameterizer_traits_3` is the (pure virtual) superclass of all surface parameterizations and defines the error codes. @@ -155,7 +154,7 @@ and \ref secBorderParameterizationsforFreeMethods. \subsection Surface_mesh_parameterizationTheSparseLinearAlgebraTraitsd The SparseLinearAlgebraTraits_d Concept This package solves sparse linear systems using solvers which are models -of `SparseLinearAlgebraTraits_d`. See Section \ref secSparseLinearAlgebra. +of `SparseLinearAlgebraTraits_d`. See Chapter \ref PkgSolverSummary. \subsection Surface_mesh_parameterizationTheParameterizationMesh3 The ParameterizationMesh_3 and ParameterizationPatchableMesh_3 Concepts @@ -419,65 +418,7 @@ Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer() \endcode -\section secSparseLinearAlgebra Sparse Linear Algebra -Parameterizing triangle meshes requires both efficient representation -of sparse matrices and efficient iterative or direct linear -solvers. We provide links to \ref thirdpartyEigen "Eigen" library -and include a separate package devoted to OpenNL sparse linear solver. - -\subsection Surface_mesh_parameterizationListofSolvers List of Solvers - -We provide an interface to several sparse linear solvers, as models -of the `SparseLinearAlgebraTraits_d` concept: - -- An interface to sparse solvers from the `OpenNL` library \cgalCite{cgal:l-nmdgp-05} is provided through classes -`OpenNL::DefaultLinearSolverTraits` and -`OpenNL::SymmetricLinearSolverTraits`. The OpenNL library version shipped with \cgal is a lightweight default sparse linear solver. It does not support large systems, but it is portable and -supports exact number types. - -- An interface to all sparse solvers from the \ref thirdpartyEigen "Eigen" library is provided through the class -`Eigen_solver_traits`. This solver traits class can be used for an iterative or a direct, -symmetric or general sparse solvers. The \ref thirdpartyEigen "Eigen" solver to be used must be given as template parameter. - -\subsection Surface_mesh_parameterizationEigenSolver Eigen Solver Example - -The example \ref Surface_mesh_parameterization/Eigen_parameterization.cpp "Eigen_parameterization.cpp" computes the -default parameterization method (Floater mean value coordinates with a circular border), -but specifically instantiates an \ref thirdpartyEigen "Eigen" solver. Specifying a specific solver -instead of the default one (OpenNL) means using the third parameter of -`Mean_value_coordinates_parameterizer_3`. The differences with the first -example \ref Surface_mesh_parameterization/Simple_parameterization.cpp "Simple_parameterization.cpp" are: - -\code{.cpp} - -#include - -... - -//*************************************** -// Floater Mean Value Coordinates parameterization -// (circular border) with Eigen solver -//*************************************** - -// Circular border parameterizer (the default) -typedef CGAL::Circular_border_arc_length_parameterizer_3 -Border_parameterizer; -// Eigen solver -typedef CGAL::Eigen_solver_traits<> Solver; - -// Floater Mean Value Coordinates parameterization -// (circular border) with Eigen solver -typedef CGAL::Mean_value_coordinates_parameterizer_3 -Parameterizer; - -Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer()); - -... - -\endcode \section secCuttingaMesh Cutting a Mesh @@ -605,63 +546,7 @@ and is therefore non-singular (Gram theorem). -\subsection Surface_mesh_parameterizationPrecision Precision -Two algorithms of this package construct the sparse linear system(s) -using trigonometric functions, and are this incompatible with exact arithmetic: - -
    - -
  • Floater mean value coordinates - -
  • Circular border parameterization - -
- -On the other hand, linear solvers commonly use double precision floating point -numbers. - -OpenNL's BICGSTAB solver (accessible through the -`OpenNL::DefaultLinearSolverTraits` interface) -is the only solver supported by this package which -computes exact results, when used with an exact arithmetic. This package is -intended to be used mainly with a \cgal %Cartesian kernel with doubles. - -\subsection Surface_mesh_parameterizationOpenNLsBICGSTAB OpenNL's BICGSTAB Solver with an Exact Arithmetic - -The BICGSTAB conjugate gradient is in disguise a direct solver. -In a nutshell, it computes a vector basis -orthogonal with respect to the matrix, and the coordinates of the solution in this vector basis. -Each iteration computes one component of the basis and one coordinate, therefore the algorithm -converges to the solution in \f$ n\f$ iterations, where \f$ n\f$ is the dimension of the matrix. More precisely, it is shown to converge in \f$ k\f$ iteration, where \f$ k\f$ is the number of distinct eigenvalues of the matrix. - -\subsection Surface_mesh_parameterizationSolverswith Solvers with a Floating Point Arithmetic - -OpenNL's BICGSTAB example: - -When inexact numerical types are used (e.g. doubles), accumulated errors slow down convergence -(in practice, it requires approximately \f$ 5k\f$ iterations to converge). -The required number of iterations depends on the eigenvalues of the matrix, and these eigenvalues depend -on the shape of the triangles. The optimum is when the triangles are equilateral (then the solver converges -in less than 10 iterations). The worst case is obtained when the mesh has a large number of skinny triangles (near-singular Jacobian matrix of the triangle). In this case, the spectrum of the matrix -is wide (many different eigenvalues), and the solver requires nearly \f$ 5n\f$ iterations to converge. - -\subsection Surface_mesh_parameterizationAlgorithmic Algorithmic Complexity - -In this package, we focus on piecewise linear mappings onto a planar -domain. All surface parameterization methods are based on solving one (or two) -sparse linear system(s). -The algorithmic complexity is dominated by the resolution of the sparse linear system(s). - -OpenNL's BICGSTAB example: - -At each iteration, the operation of highest complexity is the product between the sparse-matrix and a vector. -The sparse matrix has a fixed number of non-zero coefficients per row, -therefore the matrix / vector product has \f$ O(n)\f$ complexity. -Since convergence is reached after \f$ k\f$ iterations, the complexity is \f$ O(k.n)\f$ -(where \f$ k\f$ is the number of distinct eigenvalues of the matrix). -Therefore, best case complexity is \f$ O(n)\f$ (equilateral triangles), -and worst case complexity is \f$ O(n^2)\f$ (skinny triangles). \section Surface_mesh_parameterizationSoftware Software Design @@ -801,7 +686,7 @@ The purpose of such a model is to:
  • Support several kind of meshes.
  • Hide the implementation of extra fields specific to the parameterization domain (`index`, `u`, `v`, `is_parameterized`). -
  • Handle in the mesh type the complexity of virtually cutting a mesh +
  • %Handle in the mesh type the complexity of virtually cutting a mesh to make it homeomorphic to a disk (instead of duplicating this code in each parameterization method). @@ -834,15 +719,6 @@ This mainly means that: can be set per corner (which is a more general way of saying per half-edge). -\subsection Surface_mesh_parameterizationSparseLinearAlgebraTraitsd SparseLinearAlgebraTraits_d Concept - -This package solves sparse linear systems using solvers which are models -of `SparseLinearAlgebraTraits_d`. - -`SparseLinearAlgebraTraits_d` is a sub-concept of the `LinearAlgebraTraits_d` concept -in `Kernel_d`. -The goal is to adapt easily code written for dense matrices to sparse ones, -and vice-versa. \subsection Surface_mesh_parameterizationCuttingaMesh_1 Cutting a Mesh @@ -855,23 +731,7 @@ not intend to cover this topic at the moment. \section Surface_mesh_parameterizationExtendingthe Extending the Package and Reusing Code -\subsection Surface_mesh_parameterizationReusingMesh Reusing Mesh Adaptors -`ParameterizationMesh_3` defines a concept to access to a -general polyhedral mesh. -It is optimized for the `Surface_mesh_parameterization` package -only in the sense that it -defines the accessors to fields specific to the parameterization domain -(`index`, `u`, `v`, `is_parameterized`). - -It may be easily generalized. - -\subsection Surface_mesh_parameterizationReusingSparse Reusing Sparse Linear Algebra - -The `SparseLinearAlgebraTraits_d` concept and the traits classes -for \ref thirdpartyEigen "Eigen" and OpenNL are independent of the rest of the -`Surface_mesh_parameterization` package, and may be reused by -\cgal developers for other purposes. \subsection Surface_mesh_parameterizationAddingNewParameterization Adding New Parameterization Methods diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/dependencies b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/dependencies index bf0d8576788..96055a7fb4b 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/dependencies +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/dependencies @@ -7,3 +7,4 @@ Stream_support Polyhedron Kernel_d Solver_interface +Convex_hull_2 diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp index 6665e621f15..1b89de29246 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp @@ -27,7 +27,6 @@ int main(int argc, char * argv[]) std::cerr << "PARAMETERIZATION" << std::endl; std::cerr << " Discrete Authalic Parameterization" << std::endl; std::cerr << " circle border" << std::endl; - std::cerr << " OpenNL solver" << std::endl; //*************************************** // decode parameters @@ -68,7 +67,7 @@ int main(int argc, char * argv[]) //*************************************** // Discrete Authalic Parameterization - // (defaults are circular border and OpenNL solver) + // (defaults are circular border and Eigen solver) //*************************************** typedef CGAL::Discrete_authalic_parameterizer_3 diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index 2130b342647..144152e05c6 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -66,25 +66,26 @@ if ( CGAL_FOUND ) list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() - # Executables that do *not* require Eigen + + find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) + + if (EIGEN3_FOUND) + # Executables that require Eigen 3.1 + include( ${EIGEN3_USE_FILE} ) create_single_source_cgal_program( "Authalic_parameterization.cpp" ) create_single_source_cgal_program( "Mesh_cutting_parameterization.cpp" ) create_single_source_cgal_program( "Simple_parameterization.cpp" ) create_single_source_cgal_program( "Square_border_parameterization.cpp" ) - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) - - if (EIGEN3_FOUND) - # Executables that require Eigen 3.1 - include( ${EIGEN3_USE_FILE} ) create_single_source_cgal_program( "Complete_parameterization_example.cpp" ) create_single_source_cgal_program( "Eigen_parameterization.cpp" ) + + create_single_source_cgal_program( "polyhedron_ex_parameterization.cpp" ) + else(EIGEN3_FOUND) message(STATUS "NOTICE: Some examples require Eigen 3.1 (or greater) and will not be compiled.") endif(EIGEN3_FOUND) - create_single_source_cgal_program( "polyhedron_ex_parameterization.cpp" ) - else() message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.") diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp index e0d23c9b9aa..c0786005d2e 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp @@ -248,14 +248,10 @@ int main(int argc, char * argv[]) // Border parameterizer typedef CGAL::Square_border_arc_length_parameterizer_3 Border_parameterizer; - // Eigen solver - typedef CGAL::Eigen_solver_traits<> Solver; - // Discrete Authalic Parameterization (square border) // with Eigen solver typedef CGAL::Discrete_authalic_parameterizer_3 Parameterizer; + Border_parameterizer> Parameterizer; Parameterizer::Error_code err = CGAL::parameterize(mesh_patch, Parameterizer()); switch(err) { diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp index 413ecb4eaf0..d012ca50755 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp @@ -93,7 +93,6 @@ int main(int argc, char * argv[]) std::cerr << "PARAMETERIZATION" << std::endl; std::cerr << " Floater parameterization" << std::endl; std::cerr << " Circle border" << std::endl; - std::cerr << " OpenNL solver" << std::endl; std::cerr << " Very simple cut if model is not a topological disk" << std::endl; //*************************************** diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Simple_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Simple_parameterization.cpp index 490a3761e26..68a076f5770 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Simple_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Simple_parameterization.cpp @@ -25,7 +25,6 @@ int main(int argc, char * argv[]) std::cerr << "PARAMETERIZATION" << std::endl; std::cerr << " Floater parameterization" << std::endl; std::cerr << " Circle border" << std::endl; - std::cerr << " OpenNL solver" << std::endl; //*************************************** // decode parameters @@ -66,7 +65,7 @@ int main(int argc, char * argv[]) //*************************************** // Floater Mean Value Coordinates parameterization - // (defaults are circular border and OpenNL solver) + // (defaults are circular border and Eigen solver) //*************************************** typedef CGAL::Parameterizer_traits_3 diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp index e6c5335d124..426d9a9dc55 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp @@ -26,7 +26,6 @@ int main(int argc, char * argv[]) std::cerr << "PARAMETERIZATION" << std::endl; std::cerr << " Floater parameterization" << std::endl; std::cerr << " square border" << std::endl; - std::cerr << " OpenNL solver" << std::endl; //*************************************** // decode parameters diff --git a/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h index f9b4186010a..2ba0d2aac74 100644 --- a/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Barycentric_mapping_parameterizer_3.h @@ -24,6 +24,7 @@ #include #include +#include /// \file Barycentric_mapping_parameterizer_3.h @@ -58,7 +59,7 @@ namespace CGAL { \sa `CGAL::Fixed_border_parameterizer_3` \sa `CGAL::Discrete_authalic_parameterizer_3` \sa `CGAL::Discrete_conformal_map_parameterizer_3` -\sa `CGAL::LSCM_parameterizer_3` +\sa `CGAL::LSCM_parameterizer_3` \sa `CGAL::Mean_value_coordinates_parameterizer_3` */ @@ -68,7 +69,7 @@ template class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Barycentric_mapping_parameterizer_3 : public Fixed_border_parameterizer_3 #include +#include /// \file Discrete_authalic_parameterizer_3.h @@ -55,7 +56,7 @@ namespace CGAL { /// \sa `CGAL::Fixed_border_parameterizer_3` /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` /// \sa `CGAL::Mean_value_coordinates_parameterizer_3` template @@ -64,7 +65,7 @@ template class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Discrete_authalic_parameterizer_3 : public Fixed_border_parameterizer_3 #include +#include /// \file Discrete_conformal_map_parameterizer_3.h @@ -61,7 +62,7 @@ namespace CGAL { /// \sa `CGAL::Fixed_border_parameterizer_3` /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_authalic_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` /// \sa `CGAL::Mean_value_coordinates_parameterizer_3` template @@ -70,7 +71,7 @@ template class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Discrete_conformal_map_parameterizer_3 : public Fixed_border_parameterizer_3 #include -#include +#include + #include #include @@ -80,8 +81,8 @@ template class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits -> + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > + class Fixed_border_parameterizer_3 : public Parameterizer_traits_3 { diff --git a/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h index ef820d9b813..47def05f44c 100644 --- a/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/LSCM_parameterizer_3.h @@ -43,15 +43,17 @@ namespace CGAL { /// \ingroup PkgSurfaceParameterizationMethods /// -/// The class LSCM_parameterizer_3 implements the +/// The class `LSCM_parameterizer_3` implements the /// *Least Squares Conformal Maps (LSCM)* parameterization \cgalCite{cgal:lprm-lscm-02}. /// /// This is a conformal parameterization, i.e. it attempts to preserve angles. /// -/// This is a free border parameterization. No need to map the surface's border +/// This is a free border parameterization. No need to map the border of the surface /// onto a convex polygon (only two pinned vertices are needed to ensure a /// unique solution), but one-to-one mapping is *not* guaranteed. /// +/// Note that his parametrization method has no template parameter for changing the sparse solver. +/// /// \cgalModels `ParameterizerTraits_3` /// /// @@ -66,14 +68,17 @@ template < class ParameterizationMesh_3, ///< 3D surface mesh. class BorderParameterizer_3 - = Two_vertices_parameterizer_3, + = Two_vertices_parameterizer_3 +#ifndef DOXYGEN_RUNNING + , ///< Strategy to parameterize the surface border. ///< The minimum is to parameterize two vertices. - class SparseLinearAlgebraTraits_d + class SparseLinearAlgebraTraits_d = OpenNL::SymmetricLinearSolverTraits - ///< Traits class to solve a sparse linear system. - ///< We may use a symmetric definite positive solver because LSCM - ///< solves the system in the least squares sense. + //< Traits class to solve a sparse linear system. + //< We may use a symmetric definite positive solver because LSCM + //< solves the system in the least squares sense. +#endif > class LSCM_parameterizer_3 : public Parameterizer_traits_3 @@ -94,11 +99,11 @@ public: /// Export BorderParameterizer_3 template parameter. typedef BorderParameterizer_3 Border_param; - /// Export SparseLinearAlgebraTraits_d template parameter. + +// Private types +private: typedef SparseLinearAlgebraTraits_d Sparse_LA; -// Private types -private: // Mesh_Adaptor_3 subtypes: typedef typename Adaptor::NT NT; typedef typename Adaptor::Point_2 Point_2; diff --git a/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h index bbb8246fb81..c9826a07b7c 100644 --- a/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Mean_value_coordinates_parameterizer_3.h @@ -24,6 +24,7 @@ #include #include +#include /// \file Mean_value_coordinates_parameterizer_3.h @@ -56,7 +57,7 @@ namespace CGAL { /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_authalic_parameterizer_3` /// \sa `CGAL::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` template < @@ -64,8 +65,9 @@ template class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > + class Mean_value_coordinates_parameterizer_3 : public Fixed_border_parameterizer_3