more Taucs removal

This commit is contained in:
Sébastien Loriot 2014-06-25 15:58:37 +02:00
parent 2aabd5042d
commit aeb094e4cc
28 changed files with 50 additions and 553 deletions

2
.gitignore vendored
View File

@ -623,7 +623,6 @@ Point_set_processing_3/examples/Point_set_processing_3/normal_estimation
Point_set_processing_3/examples/Point_set_processing_3/oni_copy.xyz
Point_set_processing_3/examples/Point_set_processing_3/property_map
Point_set_processing_3/examples/Point_set_processing_3/sphere_20k_copy.xyz
Point_set_processing_3/include/CGAL/*.Taucs_symmetric_solver_traits
Point_set_processing_3/include/CGAL/*.object_pool
Point_set_processing_3/include/CGAL/*.pool
Point_set_processing_3/include/CGAL/*.reserve_RAM
@ -879,7 +878,6 @@ Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_re
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/AQtimeProject
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/Makefile
Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction
Surface_reconstruction_points_3/include/CGAL/*.Taucs_symmetric_solver_traits
Surface_reconstruction_points_3/include/CGAL/*.object_pool
Surface_reconstruction_points_3/include/CGAL/*.pool
Surface_reconstruction_points_3/include/CGAL/*.reserve_RAM

View File

@ -703,7 +703,7 @@ cmake -DWITH_examples=OFF -DWITH_demos=OFF -DCMAKE_BUILD_TYPE=Release
-- Build type: Release
-- USING CXXFLAGS = ' -frounding-math -O3 -DNDEBUG'
-- USING LDFLAGS = ' '
-- External libraries supported: GMP;GMPXX;MPFR;zlib;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;TAUCS;EIGEN3;BLAS;LAPACK;QGLViewer;ESBTL;NTL
-- External libraries supported: GMP;GMPXX;MPFR;zlib;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;EIGEN3;BLAS;LAPACK;QGLViewer;ESBTL;NTL
-- Preconfiguring library: GMP ...
-- GMP has been preconfigured:
-- CGAL_UseGMP-file:

View File

@ -512,7 +512,7 @@ endmacro()
# External libs Qt3 and Qt34are configured when Qt3 or Qt4 as lib of cgal are required
# Coin is used in KDS, but no FindCoin or FindCOIN exists
# There exists FindF2C, FindIPE, FindMKL, but they are only used to support supporting libs
list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 0 GMP MPFR ZLIB OpenGL LEDA MPFI RS RS3 OpenNL TAUCS Eigen3 BLAS LAPACK QGLViewer ESBTL Coin3D NTL IPE)
list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 0 GMP MPFR ZLIB OpenGL LEDA MPFI RS RS3 OpenNL Eigen3 BLAS LAPACK QGLViewer ESBTL Coin3D NTL IPE)
if (NOT WIN32)
# GMPXX is not supported on WIN32 machines
list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 1 GMPXX)
@ -822,11 +822,6 @@ if ( GMP_IN_AUXILIARY )
install(DIRECTORY auxiliary/gmp/lib/ DESTINATION ${CGAL_INSTALL_LIB_DIR} )
endif()
if ( TAUCS_IN_AUXILIARY )
install(DIRECTORY auxiliary/taucs/include/ DESTINATION ${CGAL_INSTALL_INC_DIR} )
install(DIRECTORY auxiliary/taucs/lib/ DESTINATION ${CGAL_INSTALL_LIB_DIR} )
endif()
if ( ZLIB_IN_AUXILIARY )
install(DIRECTORY auxiliary/zlib/include/ DESTINATION ${CGAL_INSTALL_INC_DIR} )
install(DIRECTORY auxiliary/zlib/lib/ DESTINATION ${CGAL_INSTALL_LIB_DIR} )

View File

@ -95,16 +95,6 @@ CGAL packages, some are only needed for demos.
http://www.netlib.org/blas/, http://www.netlib.org/lapack/
or precompiled version that can be downloaded with CGAL-x.y-Setup.exe
- TAUCS (sparse matrix solver)
Required by the package (if EIGEN is not available):
o Surface Reconstruction from Point Sets
Accelerates the package:
o Planar Parameterization of Triangulated Surface Meshes
http://www.tau.ac.il/~stoledo/taucs/
The version to used is available at
https://gforge.inria.fr/frs/download.php/24628/taucs_full.tgz
or automatically downloaded with CGAL-x.y-Setup.exe on Windows.
- MPFI
Required by the package:
o Algebraic Kernel

View File

@ -25,10 +25,6 @@ if ( CGAL_FOUND )
# VisualC++ optimization for applications dealing with large data
if (MSVC)
# Use /EHa option to catch stack overflows.
# Note: TAUCS needs a stack >= 2MB. CGAL default is 10MB.
string(REGEX REPLACE "/EH[asc]*" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Use /FR to turn on IntelliSense
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")

View File

@ -25,10 +25,6 @@ if ( CGAL_FOUND )
# VisualC++ optimization for applications dealing with large data
if (MSVC)
# Use /EHa option to catch stack overflows.
# Note: TAUCS needs a stack >= 2MB. CGAL default is 10MB.
string(REGEX REPLACE "/EH[asc]*" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Use /FR to turn on IntelliSense
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")

View File

@ -60,25 +60,7 @@ if(QT4_FOUND)
endif(QT4_FOUND)
# Eigen is now used by default
find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
if (NOT EIGEN3_FOUND)
# Find LAPACK (optional), for curvatures estimation
find_package(LAPACK)
if(LAPACK_FOUND)
include( ${LAPACK_USE_FILE} )
endif(LAPACK_FOUND)
# Find TAUCS (optionnal), for parametrization
find_package(TAUCS)
if(TAUCS_FOUND)
include( ${TAUCS_USE_FILE} )
endif(TAUCS_FOUND)
else()
include( ${EIGEN3_USE_FILE} )
endif()
if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
@ -87,15 +69,12 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
# Parameterization needs Eigen3 or TAUCS
if(NOT EIGEN3_FOUND AND NOT TAUCS_FOUND)
message(STATUS "NOTICE: Eigen 3.1 (or greater) and TAUCS is not found. parametrization will not be available.")
endif(NOT EIGEN3_FOUND AND NOT TAUCS_FOUND)
# Curvature estimation needs Eigen3 or LAPACK
if(NOT EIGEN3_FOUND AND NOT LAPACK_FOUND)
message(STATUS "NOTICE: Eigen 3.1 (or greater) and LAPACK is not found. curvatures estimation will not be available.")
endif(NOT EIGEN3_FOUND AND NOT LAPACK_FOUND)
# Parameterization and curvature estimation need Eigen3
if(NOT EIGEN3_FOUND)
message(STATUS "NOTICE: Eigen 3.1 library(or greater) was not found. parametrization and curvatures estimation will not be available.")
else()
include( ${EIGEN3_USE_FILE} )
endif()
qt4_wrap_ui( MainWindowUI_files MainWindow.ui )
qt4_wrap_ui( FileLoaderDialogUI_files FileLoaderDialog.ui )
@ -199,9 +178,9 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
# special
target_link_libraries(scene_edit_polyhedron_item scene_polyhedron_item)
if(EIGEN3_FOUND OR TAUCS_FOUND)
if(EIGEN3_FOUND)
add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp Scene_textured_polyhedron_item.moc)
endif(EIGEN3_FOUND OR TAUCS_FOUND)
endif()
add_item(scene_implicit_function_item Scene_implicit_function_item.cpp Scene_implicit_function_item.moc Color_ramp.cpp)
@ -234,7 +213,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
# Viewer_moc.cpp
${FileLoaderDialogUI_files} ${MainWindowUI_files} ${PreferencesUI_FILES} ${RESOURCE_FILES} )
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 )
if(EIGEN3_FOUND OR TAUCS_FOUND)
if(EIGEN3_FOUND)
# add_executable( Polyhedron_3 Scene_tex_rendering.cpp Scene_tex_polyhedron_operations.cpp )
endif()
# else(POLYHEDRON_DEMO_ENABLE_FORWARD_DECL)
@ -336,20 +315,20 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
polyhedron_demo_plugin(pca_plugin Polyhedron_demo_pca_plugin)
target_link_libraries(pca_plugin scene_polyhedron_item scene_basic_objects)
if(EIGEN3_FOUND OR TAUCS_FOUND)
if(EIGEN3_FOUND)
polyhedron_demo_plugin(parameterization_plugin Polyhedron_demo_parameterization_plugin)
target_link_libraries(parameterization_plugin scene_polyhedron_item scene_textured_polyhedron_item )
else(EIGEN3_FOUND OR TAUCS_FOUND)
message(STATUS "NOTICE: Neither TAUCS nor Eigen 3.1 (or greater) libraries have been found. Parameterization will not be available.")
endif(EIGEN3_FOUND OR TAUCS_FOUND)
else(EIGEN3_FOUND)
message(STATUS "NOTICE: Eigen 3.1 (or greater) library has not been found. Parameterization will not be available.")
endif()
if(TAUCS_FOUND OR EIGEN3_FOUND)
if(EIGEN3_FOUND)
qt4_wrap_ui( poissonUI_FILES Polyhedron_demo_poisson_plugin.ui)
polyhedron_demo_plugin(poisson_plugin Polyhedron_demo_poisson_plugin Polyhedron_demo_poisson_plugin_impl.cpp ${poissonUI_FILES})
target_link_libraries(poisson_plugin scene_polyhedron_item scene_points_with_normal_item)
else(TAUCS_FOUND OR EIGEN3_FOUND)
message(STATUS "NOTICE: Neither TAUCS nor Eigen 3.1 (or greater) libraries have been found. Poisson reconstruction will not be available.")
endif(TAUCS_FOUND OR EIGEN3_FOUND)
else()
message(STATUS "NOTICE: Eigen 3.1 (or greater) library has not been found. Poisson reconstruction will not be available.")
endif()
# Link with BLAS and LAPACK only (optional), for Jet Fitting

View File

@ -60,11 +60,7 @@ class Polyhedron_demo_poisson_plugin_dialog : public QDialog, private Ui::Poisso
Polyhedron_demo_poisson_plugin_dialog(QWidget* /*parent*/ = 0)
{
setupUi(this);
#ifdef CGAL_TAUCS_ENABLED
m_inputSolver->addItem("Taucs");
#endif
#ifdef CGAL_EIGEN3_ENABLED
m_inputSolver->addItem("Eigen - built-in simplicial LDLt");
m_inputSolver->addItem("Eigen - built-in CG");

View File

@ -16,9 +16,6 @@
#include <CGAL/Poisson_reconstruction_function.h>
#include <CGAL/compute_average_spacing.h>
#ifdef CGAL_TAUCS_ENABLED
#include <CGAL/Taucs_solver_traits.h>
#endif
#ifdef CGAL_EIGEN3_ENABLED
#include <CGAL/Eigen_solver_traits.h>
#endif
@ -90,27 +87,7 @@ Polyhedron* poisson_reconstruct(const Point_set& points,
points.begin(), points.end(),
CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()));
bool ok = false;
#ifdef CGAL_TAUCS_ENABLED
if(solver_name=="Taucs")
{
// Creates sparse linear solver:
// TAUCS out-of-core Multifrontal Supernodal Cholesky Factorization
const char* OOC_SUPERNODAL_CHOLESKY_FACTORIZATION[] =
{
"taucs.factor.LLT=true",
"taucs.factor.mf=true",
"taucs.factor.ordering=metis",
"taucs.ooc=true", "taucs.ooc.basename=taucs-ooc",
NULL
};
unlink("taucs-ooc.0"); // make sure TAUCS ooc file does not exist
CGAL::Taucs_symmetric_solver_traits<double> solver(OOC_SUPERNODAL_CHOLESKY_FACTORIZATION);
ok = function.compute_implicit_function(solver, use_two_passes);
}
#endif
bool ok = false;
#ifdef CGAL_EIGEN3_ENABLED
if(solver_name=="Eigen - built-in simplicial LDLt")
{

View File

@ -123,7 +123,6 @@ foreach( component ${CGAL_COMPONENTS})
set(component ${rewrote_component})
string(REGEX REPLACE "([o|O][p|P][e|E][n|N][n|N][l|L])" "OpenNL" rewrote_component ${component})
set(component ${rewrote_component})
string(REGEX REPLACE "([t|T][a|A][u|U][c|C][s|S])" "TAUCS" rewrote_component ${component})
set(component ${rewrote_component})
string(REGEX REPLACE "([b|B][l|L][a|A][s|S])" "BLAS" rewrote_component ${component})
set(component ${rewrote_component})

View File

@ -33,7 +33,6 @@
#MPFR
#MPFI
#RS
#TAUCS
#BLAS
#LAPACK
#OPENNL
@ -157,7 +156,6 @@ fi
CGAL_COMPONENTS=${CGAL_COMPONENTS//[r|R][s|S]/RS}
CGAL_COMPONENTS=${CGAL_COMPONENTS//[o|O][p|P][e|E][n|N][n|N][l|L]/OpenNL}
CGAL_COMPONENTS=${CGAL_COMPONENTS//[t|T][a|A][u|U][c|C][s|S]/TAUCS}
CGAL_COMPONENTS=${CGAL_COMPONENTS//[b|B][l|L][a|A][s|S]/BLAS}
CGAL_COMPONENTS=${CGAL_COMPONENTS//[l|L][a|A][p|P][a|A][c|C][k|K]/LAPACK}

View File

@ -81,7 +81,7 @@ public:
m_triplets.reserve(rows);
}
/// Delete this object and the wrapped TAUCS matrix.
/// Delete this object and the wrapped matrix.
~Eigen_sparse_matrix()
{
}

View File

@ -75,7 +75,7 @@ public:
return this->size();
}
/// Get TAUCS vector wrapped by this object.
/// Get vector wrapped by this object.
const EigenType& eigen_object() const {
return *this;
}

View File

@ -26,10 +26,6 @@ if ( CGAL_FOUND )
# VisualC++ optimization for applications dealing with large data
if (MSVC)
# Use /EHa option to catch stack overflows.
# Note: TAUCS needs a stack >= 2MB. CGAL default is 10MB.
string(REGEX REPLACE "/EH[asc]*" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Use /FR to turn on IntelliSense
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
@ -70,41 +66,23 @@ if ( CGAL_FOUND )
list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
endif()
# Executables that do *not* use TAUCS
# Executables that do *not* require Eigen
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" )
# use either Eigen or TAUCS BLAS/LAPACK
find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
if (EIGEN3_FOUND)
include( ${EIGEN3_USE_FILE} )
endif()
# Link with BLAS, LAPACK and TAUCS (optional)
find_package(TAUCS)
if(TAUCS_FOUND)
include( ${TAUCS_USE_FILE} )
endif(TAUCS_FOUND)
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" )
else(EIGEN3_FOUND)
message(STATUS "NOTICE: Example Complete_parameterization_example.cpp requires Eigen 3.1 (or greater) and will not be compiled.")
message(STATUS "NOTICE: Some examples require Eigen 3.1 (or greater) and will not be compiled.")
endif(EIGEN3_FOUND)
if (TAUCS_FOUND)
# Executables that require TAUCS (thus BLAS and LAPACK)
create_single_source_cgal_program( "Taucs_parameterization.cpp" )
else(TAUCS_FOUND)
message(STATUS "NOTICE: Example Taucs_parameterization.cpp requires TAUCS and will not be compiled.")
endif(TAUCS_FOUND)
# Executable that can use TAUCS or not, depending on the macro CGAL_USE_TAUCS
create_single_source_cgal_program( "polyhedron_ex_parameterization.cpp" )
else()

View File

@ -1,122 +0,0 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
#include <CGAL/parameterize.h>
#include <CGAL/Taucs_solver_traits.h>
#include <iostream>
#include <fstream>
#include <cstdlib>
// ----------------------------------------------------------------------------
// Private types
// ----------------------------------------------------------------------------
typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
// ----------------------------------------------------------------------------
// main()
// ----------------------------------------------------------------------------
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 << " TAUCS solver" << std::endl;
//***************************************
// decode parameters
//***************************************
if (argc-1 != 1)
{
std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
return(EXIT_FAILURE);
}
// File name is:
const char* input_filename = argv[1];
//***************************************
// Read the mesh
//***************************************
// Read the mesh
std::ifstream stream(input_filename);
Polyhedron mesh;
stream >> mesh;
if(!stream || !mesh.is_valid() || mesh.empty())
{
std::cerr << "Error: cannot read OFF file " << input_filename << std::endl;
return EXIT_FAILURE;
}
//***************************************
// Create Polyhedron adaptor
// Note: no cutting => we support only
// meshes that are topological disks
//***************************************
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
Parameterization_polyhedron_adaptor;
Parameterization_polyhedron_adaptor mesh_adaptor(mesh);
//***************************************
// Floater Mean Value Coordinates parameterization
// (circular border) with TAUCS solver
//***************************************
// Circular border parameterizer (the default)
typedef CGAL::Circular_border_arc_length_parameterizer_3<Parameterization_polyhedron_adaptor>
Border_parameterizer;
// TAUCS solver
typedef CGAL::Taucs_solver_traits<double> Solver;
// Floater Mean Value Coordinates parameterization
// (circular border) with TAUCS solver
typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
Border_parameterizer,
Solver>
Parameterizer;
Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
switch(err) {
case Parameterizer::OK: // Success
break;
case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
case Parameterizer::ERROR_BORDER_TOO_SHORT:
std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
return EXIT_FAILURE;
break;
default: // Error
std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
return EXIT_FAILURE;
break;
};
//***************************************
// Output
//***************************************
// Raw output: dump (u,v) pairs
Polyhedron::Vertex_const_iterator pVertex;
for (pVertex = mesh.vertices_begin();
pVertex != mesh.vertices_end();
pVertex++)
{
// (u,v) pair is stored in any halfedge
double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
}
return EXIT_SUCCESS;
}

View File

@ -91,7 +91,6 @@ else
run polyhedron_ex_parameterization
run Simple_parameterization
run Square_border_parameterization
run Taucs_parameterization
fi
#---------------------------------------------------------------------#

View File

@ -10,24 +10,14 @@ echo ""
./test.sh barycentric square opennl eps "$1"
echo " -"
./test.sh barycentric circle taucs obj "$1"
echo " -"
./test.sh floater circle opennl obj "$1"
echo " -"
./test.sh floater square taucs eps "$1"
echo " -"
./test.sh conformal circle taucs obj "$1"
echo " -"
./test.sh conformal square opennl eps "$1"
echo " -"
./test.sh authalic square taucs obj "$1"
echo " -"
# Skip authalic/opennl test which is very unstable
# ./test.sh authalic circle opennl eps "$1"
# echo " -"
./test.sh lscm 2pts opennl obj "$1"
echo " -"
./test.sh lscm 2pts taucs eps "$1"
echo ""
echo " ************************"

View File

@ -14,6 +14,6 @@ The package proposes currently an interface with CGAL Polyhedron_3 data structur
Since parameterizing meshes require efficient representation of sparse matrices
and efficient iterative or direct linear solvers, we provide links to standard
libraries (TAUCS) and propose a separate package devoted to OpenNL
libraries (Eigen3) and propose a separate package devoted to OpenNL
sparse linear solver (Levy).

View File

@ -26,10 +26,6 @@ if ( CGAL_FOUND )
# VisualC++ optimization for applications dealing with large data
if (MSVC)
# Use /EHa option to catch stack overflows.
# Note: TAUCS needs a stack >= 2MB. CGAL default is 10MB.
string(REGEX REPLACE "/EH[asc]*" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Use /FR to turn on IntelliSense
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
@ -65,21 +61,11 @@ if ( CGAL_FOUND )
include( ${EIGEN3_USE_FILE} )
endif()
#find TAUCS
find_package(TAUCS)
if(TAUCS_FOUND)
include( ${TAUCS_USE_FILE} )
endif(TAUCS_FOUND)
if(NOT TAUCS_FOUND)
message(STATUS "NOTICE: This directory requires the TAUCS library, and some features will not be available.")
endif(NOT TAUCS_FOUND)
if(NOT EIGEN3_FOUND)
message(STATUS "NOTICE: This directory requires Eigen 3.1 (or greater), and some features will not be available.")
endif()
# Executable that can use EIGEN/TAUCS or not, depending on the macro CGAL_EIGEN3_ENABLED/CGAL_USE_TAUCS
# Executable that can use EIGEN or not, depending on the macro CGAL_EIGEN3_ENABLED
create_single_source_cgal_program( "extensive_parameterization_test.cpp" )
else()

View File

@ -34,9 +34,6 @@
#ifdef CGAL_EIGEN3_ENABLED
#include <CGAL/Eigen_solver_traits.h>
#endif
#ifdef CGAL_USE_TAUCS
#include <CGAL/Taucs_solver_traits.h>
#endif
// This test
#include "Polyhedron_ex.h"
@ -359,121 +356,6 @@ int main(int argc, char * argv[])
std::cerr << "Parameterization: " << task_timer.time() << " seconds." << std::endl << std::endl;
task_timer.reset();
#ifdef CGAL_USE_TAUCS
//***************************************
// Discrete Conformal Map parameterization
// with circular arc length border parameterization
// TAUCS solver (if installed)
//***************************************
std::cerr << "Discrete Conformal Map parameterization" << std::endl;
std::cerr << "with circular arc length border parameterization" << std::endl;
std::cerr << "TAUCS solver" << std::endl;
err = CGAL::parameterize(
mesh_patch,
CGAL::Discrete_conformal_map_parameterizer_3<
Mesh_patch_polyhedron,
CGAL::Circular_border_arc_length_parameterizer_3<Mesh_patch_polyhedron>,
CGAL::Taucs_solver_traits<double>
>());
switch(err) {
case Parameterizer::OK: // Success
break;
case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
case Parameterizer::ERROR_BORDER_TOO_SHORT:
std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
// this is not a bug => do not set accumulated_fatal_err
break;
default: // Error
std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
break;
};
std::cerr << "Parameterization: " << task_timer.time() << " seconds." << std::endl << std::endl;
task_timer.reset();
//***************************************
// Discrete Authalic Parameterization
// with square arc length border parameterization
// TAUCS solver (if installed)
//***************************************
std::cerr << "Discrete Authalic Parameterization" << std::endl;
std::cerr << "with square arc length border parameterization" << std::endl;
std::cerr << "TAUCS solver" << std::endl;
err = CGAL::parameterize(
mesh_patch,
CGAL::Discrete_authalic_parameterizer_3<
Mesh_patch_polyhedron,
CGAL::Square_border_arc_length_parameterizer_3<Mesh_patch_polyhedron>,
CGAL::Taucs_solver_traits<double>
>());
switch(err) {
case Parameterizer::OK: // Success
break;
case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
case Parameterizer::ERROR_BORDER_TOO_SHORT:
std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
// this is not a bug => do not set accumulated_fatal_err
break;
default: // Error
std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
break;
};
std::cerr << "Parameterization: " << task_timer.time() << " seconds." << std::endl << std::endl;
task_timer.reset();
//***************************************
// Least Squares Conformal Maps parameterization
// TAUCS solver (if installed)
//***************************************
std::cerr << "Least Squares Conformal Maps parameterization" << std::endl;
std::cerr << "TAUCS solver" << std::endl;
err = CGAL::parameterize(
mesh_patch,
CGAL::LSCM_parameterizer_3<
Mesh_patch_polyhedron,
CGAL::Two_vertices_parameterizer_3<Mesh_patch_polyhedron>,
CGAL::Taucs_symmetric_solver_traits<double>
>());
switch(err) {
case Parameterizer::OK: // Success
break;
case Parameterizer::ERROR_EMPTY_MESH: // Input mesh not supported
case Parameterizer::ERROR_NON_TRIANGULAR_MESH:
case Parameterizer::ERROR_NO_TOPOLOGICAL_DISC:
case Parameterizer::ERROR_BORDER_TOO_SHORT:
std::cerr << "Input mesh not supported: " << Parameterizer::get_error_message(err) << std::endl;
// this is not a bug => do not set accumulated_fatal_err
break;
default: // Error
std::cerr << "Error: " << Parameterizer::get_error_message(err) << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
break;
};
std::cerr << "Parameterization: " << task_timer.time() << " seconds." << std::endl << std::endl;
task_timer.reset();
#else
std::cerr << "Skip TAUCS tests as TAUCS is not installed" << std::endl << std::endl;
// this is not a bug => do not set accumulated_fatal_err
#endif // CGAL_USE_TAUCS
#ifdef CGAL_EIGEN3_ENABLED
//***************************************

View File

@ -38,11 +38,6 @@ if(QT4_FOUND)
find_package(QGLViewer )
endif(QT4_FOUND)
# Find BLAS, LAPACK and TAUCS (optional), for Poisson
find_package(TAUCS)
# Find BLAS and LAPACK only (optional), for Jet Fitting
find_package(LAPACK)
# Find Eigen3 (requires 3.1.0 or greater)
find_package(Eigen3 3.1.0)
@ -55,28 +50,6 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
include_directories ( ${QGLVIEWER_INCLUDE_DIR} )
# Link with BLAS, LAPACK and TAUCS (optional), for Poisson
if(TAUCS_FOUND)
include( ${TAUCS_USE_FILE} )
else(TAUCS_FOUND)
message(STATUS "NOTICE: TAUCS library is not found.")
endif(TAUCS_FOUND)
if(EIGEN3_FOUND)
include( ${EIGEN3_USE_FILE} )
else()
message(STATUS "NOTICE: Eigen library is not found.")
endif()
# Link with BLAS and LAPACK only (optional), for Jet Fitting
if(LAPACK_FOUND)
include( ${LAPACK_USE_FILE} )
else(LAPACK_FOUND)
if (NOT EIGEN3_FOUND)
message(STATUS "NOTICE: Nor Eigen 3.1 (or greater) nor LAPACK library were found. Normal estimation and smoothing will not be available.")
endif()
endif(LAPACK_FOUND)
if(GLEW_FOUND)
include_directories ( ${GLEW_INCLUDE_DIR} )
add_definitions(-DCGAL_GLEW_ENABLED)
@ -86,10 +59,6 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
# VisualC++ optimization for applications dealing with large data
if (MSVC)
# Use /EHa option to catch stack overflows.
# Note: TAUCS needs a stack >= 2MB. CGAL default is 10MB.
string(REGEX REPLACE "/EH[asc]*" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Use /FR to turn on IntelliSense
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
@ -237,15 +206,26 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
endmacro(point_set_demo_plugin)
if(TAUCS_FOUND OR EIGEN3_FOUND)
if(EIGEN3_FOUND)
include( ${EIGEN3_USE_FILE} )
qt4_wrap_ui( POISSON_UI_FILES PS_demo_poisson_plugin.ui)
point_set_demo_plugin(PS_demo_poisson_plugin
PS_demo_poisson_plugin
PS_demo_poisson_plugin_cgal_code.cpp
${POISSON_UI_FILES})
target_link_libraries(PS_demo_poisson_plugin PS_demo_scene_polyhedron_item point_set)
point_set_demo_plugin(PS_demo_smoothing_plugin PS_demo_smoothing_plugin)
target_link_libraries(PS_demo_smoothing_plugin point_set)
qt4_wrap_ui( NORMAL_UI_FILES PS_demo_normal_estimation_plugin.ui)
point_set_demo_plugin(PS_demo_normal_estimation_plugin
PS_demo_normal_estimation_plugin
${NORMAL_UI_FILES})
target_link_libraries(PS_demo_normal_estimation_plugin point_set)
else()
message(STATUS "NOTICE: Neither TAUCS nor Eigen 3.1 (or greater) libraries have been found. Poisson reconstruction will not be available.")
message(STATUS "NOTICE: Eigen 3.1 (or greater) library has not been found. Poisson reconstruction, normal estimation and smoothing will not be available.")
endif()
point_set_demo_plugin(PS_demo_inside_out_plugin PS_demo_inside_out_plugin)
@ -269,19 +249,6 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
point_set_demo_plugin(PS_demo_average_spacing_plugin PS_demo_average_spacing_plugin)
target_link_libraries(PS_demo_average_spacing_plugin point_set)
if(LAPACK_FOUND OR EIGEN3_FOUND)
point_set_demo_plugin(PS_demo_smoothing_plugin PS_demo_smoothing_plugin)
target_link_libraries(PS_demo_smoothing_plugin point_set)
endif()
if(LAPACK_FOUND)
qt4_wrap_ui( NORMAL_UI_FILES PS_demo_normal_estimation_plugin.ui)
point_set_demo_plugin(PS_demo_normal_estimation_plugin
PS_demo_normal_estimation_plugin
${NORMAL_UI_FILES})
target_link_libraries(PS_demo_normal_estimation_plugin point_set)
endif()
qt4_wrap_ui( CLEANING_UI_FILES PS_demo_cleaning_plugin.ui)
point_set_demo_plugin(PS_demo_cleaning_plugin
PS_demo_cleaning_plugin

View File

@ -59,11 +59,7 @@ class PS_demo_poisson_plugin_dialog : public QDialog, private Ui::PoissonDialog
PS_demo_poisson_plugin_dialog(QWidget* /*parent*/ = 0)
{
setupUi(this);
#ifdef CGAL_TAUCS_ENABLED
m_inputSolver->addItem("Taucs");
#endif
#ifdef CGAL_EIGEN3_ENABLED
m_inputSolver->addItem("Eigen - built-in simplicial LDLt");
m_inputSolver->addItem("Eigen - built-in CG");

View File

@ -17,9 +17,6 @@
#include <CGAL/Poisson_reconstruction_function.h>
#include <CGAL/compute_average_spacing.h>
#ifdef CGAL_TAUCS_ENABLED
#include <CGAL/Taucs_solver_traits.h>
#endif
#ifdef CGAL_EIGEN3_ENABLED
#include <CGAL/Eigen_solver_traits.h>
#endif
@ -98,25 +95,6 @@ Polyhedron* poisson_reconstruct(const Point_set& points,
);
bool ok = false;
#ifdef CGAL_TAUCS_ENABLED
if(solver_name=="Taucs")
{
// Creates sparse linear solver:
// TAUCS out-of-core Multifrontal Supernodal Cholesky Factorization
const char* OOC_SUPERNODAL_CHOLESKY_FACTORIZATION[] =
{
"taucs.factor.LLT=true",
"taucs.factor.mf=true",
"taucs.factor.ordering=metis",
"taucs.ooc=true", "taucs.ooc.basename=taucs-ooc",
NULL
};
unlink("taucs-ooc.0"); // make sure TAUCS ooc file does not exist
CGAL::Taucs_symmetric_solver_traits<double> solver(OOC_SUPERNODAL_CHOLESKY_FACTORIZATION);
ok = function.compute_implicit_function(solver);
}
#endif
#ifdef CGAL_EIGEN3_ENABLED
if(solver_name=="Eigen - built-in simplicial LDLt")

View File

@ -28,10 +28,6 @@ if ( CGAL_FOUND )
# VisualC++ optimization for applications dealing with large data
if (MSVC)
# Use /EHa option to catch stack overflows.
# Note: TAUCS needs a stack >= 2MB. CGAL default is 10MB.
string(REGEX REPLACE "/EH[asc]*" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Use /FR to turn on IntelliSense
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
@ -55,19 +51,14 @@ if ( CGAL_FOUND )
find_package(Eigen3 3.1.0)
if (EIGEN3_FOUND)
include( ${EIGEN3_USE_FILE} )
else()
find_package(TAUCS)
if(TAUCS_FOUND)
include( ${TAUCS_USE_FILE} )
endif(TAUCS_FOUND)
endif()
if (EIGEN3_FOUND OR TAUCS_FOUND)
# Executables that require Eigen 3 or TAUCS
if (EIGEN3_FOUND)
# Executables that require Eigen 3
create_single_source_cgal_program( "poisson_reconstruction_example.cpp" )
create_single_source_cgal_program( "poisson_reconstruction.cpp" )
else()
message(STATUS "NOTICE: The examples needs Eigen 3.1 (or greater) or the TAUCS library and will not be compiled.")
message(STATUS "NOTICE: The examples need Eigen 3.1 (or greater) will not be compiled.")
endif()

View File

@ -25,9 +25,6 @@
#include <CGAL/Point_with_normal_3.h>
#include <CGAL/IO/read_xyz_points.h>
#include <CGAL/compute_average_spacing.h>
#ifdef CGAL_TAUCS_ENABLED
#include <CGAL/Taucs_solver_traits.h>
#endif
#include "compute_normal.h"
@ -124,9 +121,6 @@ int main(int argc, char * argv[])
std::cerr << "Options:\n";
std::cerr << " -sm_radius <float> Radius upper bound (default=100 * average spacing)\n";
std::cerr << " -sm_distance <float> Distance upper bound (default=0.25 * average spacing)\n";
#if defined(CGAL_EIGEN3_ENABLED) && defined(CGAL_TAUCS_ENABLED)
std::cerr << " -solver eigen|taucs Sparse linear solver (default=eigen)\n";
#endif
return EXIT_FAILURE;
}
@ -135,15 +129,7 @@ int main(int argc, char * argv[])
FT sm_angle = 20.0; // Min triangle angle (degrees).
FT sm_radius = 100; // Max triangle size w.r.t. point set average spacing.
FT sm_distance = 0.25; // Approximation error w.r.t. point set average spacing.
#ifdef CGAL_EIGEN3_ENABLED
std::string solver_name = "eigen"; // Sparse linear solver name.
#else
#ifdef CGAL_TAUCS_ENABLED
std::string solver_name = "taucs"; // Sparse linear solver name.
#else
std::string solver_name = "no_solver_available";
#endif
#endif
double approximation_ratio = 0.02;
double average_spacing_ratio = 5;
@ -273,37 +259,6 @@ int main(int argc, char * argv[])
CGAL::make_normal_of_point_with_normal_pmap(PointList::value_type()),
visitor);
#ifdef CGAL_TAUCS_ENABLED
if (solver_name == "taucs")
{
std::cerr << "Use TAUCS out-of-core Multifrontal Supernodal Cholesky Factorization\n";
// Creates sparse linear solver:
// TAUCS out-of-core Multifrontal Supernodal Cholesky Factorization
const char* OOC_SUPERNODAL_CHOLESKY_FACTORIZATION[] =
{
"taucs.factor.LLT=true",
"taucs.factor.mf=true",
"taucs.factor.ordering=metis",
"taucs.ooc=true", "taucs.ooc.basename=taucs-ooc",
NULL
};
unlink("taucs-ooc.0"); // make sure TAUCS ooc file does not exist
CGAL::Taucs_symmetric_solver_traits<double> solver(OOC_SUPERNODAL_CHOLESKY_FACTORIZATION);
// Computes the Poisson indicator function f()
// at each vertex of the triangulation.
if ( ! function.compute_implicit_function(solver, visitor,
approximation_ratio,
average_spacing_ratio) )
{
std::cerr << "Error: cannot compute implicit function" << std::endl;
return EXIT_FAILURE;
}
}
else
#endif
#ifdef CGAL_EIGEN3_ENABLED
{
if (solver_name == "eigen")

View File

@ -38,9 +38,6 @@
#ifdef CGAL_EIGEN3_ENABLED
#include <CGAL/Eigen_solver_traits.h>
#else
#ifdef CGAL_TAUCS_ENABLED
#include <CGAL/Taucs_solver_traits.h>
#endif
#endif
#include <CGAL/centroid.h>
#include <CGAL/property_map.h>
@ -532,26 +529,15 @@ public:
else
return compute_implicit_function<SparseLinearAlgebraTraits_d,Poisson_visitor>(solver,Poisson_visitor());
}
/// \cond SKIP_IN_MANUAL
#ifdef CGAL_EIGEN3_ENABLED
// This variant provides the default sparse linear traits class = Eigen_solver_traits.
bool compute_implicit_function(bool smoother_hole_filling = false)
{
typedef Eigen_solver_traits<Eigen::ConjugateGradient<Eigen_sparse_symmetric_matrix<double>::EigenType> > Solver;
return compute_implicit_function<Solver>(Solver(), smoother_hole_filling);
}
#else
#ifdef CGAL_TAUCS_ENABLED
// This variant provides the default sparse linear traits class = Taucs_symmetric_solver_traits.
bool compute_implicit_function(bool smoother_hole_filling = false)
{
typedef Taucs_symmetric_solver_traits<double> Solver;
return compute_implicit_function<Solver>(Solver(), smoother_hole_filling);
}
#endif
#endif
boost::tuple<FT, Cell_handle, bool> special_func(const Point& p) const
{
m_hint = m_tr->locate(p ,m_hint ); // no hint when we use hierarchy

View File

@ -27,10 +27,6 @@ if ( CGAL_FOUND )
# VisualC++ optimization for applications dealing with large data
if (MSVC)
# Use /EHa option to catch stack overflows.
# Note: TAUCS needs a stack >= 2MB. CGAL default is 10MB.
string(REGEX REPLACE "/EH[asc]*" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Use /FR to turn on IntelliSense
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FR")
@ -51,23 +47,15 @@ if ( CGAL_FOUND )
ADD_DEFINITIONS( "-DDEBUG_TRACE" ) # turn on traces
find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
if (NOT EIGEN3_FOUND)
find_package(TAUCS)
if(TAUCS_FOUND)
include( ${TAUCS_USE_FILE} )
endif(TAUCS_FOUND)
else()
if(EIGEN3_FOUND)
include( ${EIGEN3_USE_FILE} )
endif()
if(EIGEN3_FOUND OR TAUCS_FOUND)
# Executables that require Eigen 3.1 or TAUCS (thus BLAS and LAPACK)
# Executables that require Eigen 3.1
create_single_source_cgal_program( "poisson_reconstruction_test.cpp" )
else()
message(STATUS "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) or the TAUCS library and will not be compiled.")
message(STATUS "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled.")
endif()