#include <iostream>
#include <fstream>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/HDVF/Hdvf_traits_3.h>
#include <CGAL/HDVF/Mesh_object_io.h>
#include <CGAL/HDVF/Simplicial_chain_complex.h>
#include <CGAL/HDVF/Geometric_chain_complex_tools.h>
#include <CGAL/HDVF/Hdvf.h>
#include <CGAL/OSM/OSM.h>
typedef HDVF::Hdvf_traits_3<Kernel> Traits;
int main(int argc, char **argv)
{
#if 1
using Complex = HDVF::Simplicial_chain_complex<Coefficient_ring,Traits> ;
using HDVF_type = HDVF::Hdvf<Complex> ;
std::string filename ;
if (argc > 2) std::cerr << "usage: example_hdvf_simplicial off_file" << std::endl;
else if (argc == 1) filename = "data/mesh_data/two_rings.off";
else filename = argv[1];
HDVF::Mesh_object_io<Traits> mesh ;
mesh.read_off(filename);
mesh.print_infos();
std::cout << complex;
HDVF_type hdvf(complex, HDVF::OPT_FULL) ;
hdvf.compute_perfect_hdvf();
hdvf.write_matrices();
hdvf.write_reduction();
CGAL::IO::write_VTK(hdvf, complex, "tmp/res", true) ;
hdvf.write_hdvf_reduction("tmp/test.hdvf") ;
#endif
return 0;
}
The concept HDVF describes the requirements for Homological Discrete Vector Fields (HDVF for short) ,...
Definition: HDVF.h:128
Complex::Coefficient_ring Coefficient_ring
Type of coefficients used to compute homology.
Definition: HDVF.h:139
unspecified_type Complex
Type of underlying chain complex (a model of AbstractChainComplex).
Definition: HDVF.h:136
Definition: Abstract_simplicial_chain_complex.h:25