From ec9953f0dbe0f69074f25cc95442ea0012db7d98 Mon Sep 17 00:00:00 2001 From: Siargey Kachanovich Date: Thu, 17 Oct 2019 21:40:20 +0200 Subject: Added the files from the coxeter branch --- src/Coxeter_triangulation/test/CMakeLists.txt | 33 ++++ .../test/cell_complex_test.cpp | 62 ++++++++ .../test/freud_triang_test.cpp | 104 ++++++++++++ src/Coxeter_triangulation/test/function_test.cpp | 177 +++++++++++++++++++++ .../test/manifold_tracing_test.cpp | 62 ++++++++ src/Coxeter_triangulation/test/oracle_test.cpp | 60 +++++++ src/Coxeter_triangulation/test/perm_rep_test.cpp | 66 ++++++++ 7 files changed, 564 insertions(+) create mode 100644 src/Coxeter_triangulation/test/CMakeLists.txt create mode 100644 src/Coxeter_triangulation/test/cell_complex_test.cpp create mode 100644 src/Coxeter_triangulation/test/freud_triang_test.cpp create mode 100644 src/Coxeter_triangulation/test/function_test.cpp create mode 100644 src/Coxeter_triangulation/test/manifold_tracing_test.cpp create mode 100644 src/Coxeter_triangulation/test/oracle_test.cpp create mode 100644 src/Coxeter_triangulation/test/perm_rep_test.cpp (limited to 'src/Coxeter_triangulation/test') diff --git a/src/Coxeter_triangulation/test/CMakeLists.txt b/src/Coxeter_triangulation/test/CMakeLists.txt new file mode 100644 index 00000000..663768b1 --- /dev/null +++ b/src/Coxeter_triangulation/test/CMakeLists.txt @@ -0,0 +1,33 @@ +project(Coxeter_triangulation_test) + +include(GUDHI_test_coverage) + + +add_executable ( Coxeter_triangulation_permutahedral_representation_test perm_rep_test.cpp ) +target_link_libraries( Coxeter_triangulation_permutahedral_representation_test ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ) +gudhi_add_coverage_test(Coxeter_triangulation_permutahedral_representation_test) + +add_executable ( Coxeter_triangulation_freudenthal_triangulation_test freud_triang_test.cpp ) +target_link_libraries( Coxeter_triangulation_freudenthal_triangulation_test ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +gudhi_add_coverage_test(Coxeter_triangulation_freudenthal_triangulation_test) + +add_executable ( Coxeter_triangulation_functions_test function_test.cpp ) +target_link_libraries( Coxeter_triangulation_functions_test ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +gudhi_add_coverage_test(Coxeter_triangulation_functions_test) + +add_executable ( Coxeter_triangulation_oracle_test oracle_test.cpp ) +target_link_libraries( Coxeter_triangulation_oracle_test ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +gudhi_add_coverage_test(Coxeter_triangulation_oracle_test) + +add_executable ( Coxeter_triangulation_manifold_tracing_test manifold_tracing_test.cpp ) +target_link_libraries( Coxeter_triangulation_manifold_tracing_test ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +gudhi_add_coverage_test(Coxeter_triangulation_manifold_tracing_test) + +add_executable ( Coxeter_triangulation_cell_complex_test cell_complex_test.cpp ) +target_link_libraries( Coxeter_triangulation_cell_complex_test ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +gudhi_add_coverage_test(Coxeter_triangulation_cell_complex_test) + +if (TBB_FOUND) + target_link_libraries(Coxeter_triangulation_cell_complex_test ${TBB_LIBRARIES}) +endif() + diff --git a/src/Coxeter_triangulation/test/cell_complex_test.cpp b/src/Coxeter_triangulation/test/cell_complex_test.cpp new file mode 100644 index 00000000..a48696a6 --- /dev/null +++ b/src/Coxeter_triangulation/test/cell_complex_test.cpp @@ -0,0 +1,62 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Siargey Kachanovich + * + * Copyright (C) 2019 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "cell_complex" +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +using namespace Gudhi::coxeter_triangulation; + +BOOST_AUTO_TEST_CASE(cell_complex) { + + double radius = 1.1111; + Function_torus_in_R3 fun_torus(radius, 3*radius); + Eigen::VectorXd seed = fun_torus.seed(); + Function_Sm_in_Rd fun_bound(2.5*radius, 2, seed); + + auto oracle = make_oracle(fun_torus, fun_bound); + double lambda = 0.2; + Coxeter_triangulation<> cox_tr(oracle.amb_d()); + cox_tr.change_offset(Eigen::VectorXd::Random(oracle.amb_d())); + cox_tr.change_matrix(lambda * cox_tr.matrix()); + + using MT = Manifold_tracing >; + using Out_simplex_map = typename MT::Out_simplex_map; + std::vector seed_points(1, seed); + Out_simplex_map interior_simplex_map, boundary_simplex_map; + manifold_tracing_algorithm(seed_points, cox_tr, oracle, interior_simplex_map, boundary_simplex_map); + + std::size_t intr_d = oracle.amb_d() - oracle.cod_d(); + Cell_complex cell_complex(intr_d); + cell_complex.construct_complex(interior_simplex_map, boundary_simplex_map); + + std::size_t interior_sc_map_size0 = cell_complex.interior_simplex_cell_map(0).size(); + std::size_t interior_sc_map_size1 = cell_complex.interior_simplex_cell_map(1).size(); + std::size_t interior_sc_map_size2 = cell_complex.interior_simplex_cell_map(2).size(); + std::size_t boundary_sc_map_size0 = cell_complex.boundary_simplex_cell_map(0).size(); + std::size_t boundary_sc_map_size1 = cell_complex.boundary_simplex_cell_map(1).size(); + BOOST_CHECK (interior_simplex_map.size() == interior_sc_map_size0 ); + BOOST_CHECK ( boundary_sc_map_size0 - boundary_sc_map_size1 == 0 ); + BOOST_CHECK ( interior_sc_map_size0 - interior_sc_map_size1 + interior_sc_map_size2 == 0 ); +} diff --git a/src/Coxeter_triangulation/test/freud_triang_test.cpp b/src/Coxeter_triangulation/test/freud_triang_test.cpp new file mode 100644 index 00000000..6e7bf865 --- /dev/null +++ b/src/Coxeter_triangulation/test/freud_triang_test.cpp @@ -0,0 +1,104 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Siargey Kachanovich + * + * Copyright (C) 2019 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "freudenthal_triangulation" +#include + +#include +#include +#include + +BOOST_AUTO_TEST_CASE(freudenthal_triangulation) { + + // Point location check + typedef std::vector Point; + typedef Gudhi::coxeter_triangulation::Freudenthal_triangulation<> FK_triangulation; + typedef typename FK_triangulation::Simplex_handle Simplex_handle; + typedef typename FK_triangulation::Vertex_handle Vertex_handle; + typedef typename Simplex_handle::OrderedSetPartition Ordered_set_partition; + typedef typename Ordered_set_partition::value_type Part; + + FK_triangulation tr(3); + + // Point location check + { + Point point({3, -1, 0}); + Simplex_handle s = tr.locate_point(point); + BOOST_CHECK( s.vertex() == Vertex_handle({3, -1, 0}) ); + BOOST_CHECK( s.partition() == Ordered_set_partition({Part({0, 1, 2, 3})}) ); + } + + { + Point point({3.5, -1.5, 0.5}); + Simplex_handle s = tr.locate_point(point); + BOOST_CHECK( s.vertex() == Vertex_handle({3, -2, 0}) ); + BOOST_CHECK( s.partition() == Ordered_set_partition({Part({0, 1, 2}), Part({3})}) ); + } + + { + Point point({3.5, -1.8, 0.5}); + Simplex_handle s = tr.locate_point(point); + BOOST_CHECK( s.vertex() == Vertex_handle({3, -2, 0}) ); + BOOST_CHECK( s.partition() == Ordered_set_partition({Part({0, 2}), Part({1}), Part({3})}) ); + } + + { + Point point({3.5, -1.8, 0.3}); + Simplex_handle s = tr.locate_point(point); + BOOST_CHECK( s.vertex() == Vertex_handle({3, -2, 0}) ); + BOOST_CHECK( s.partition() == Ordered_set_partition({Part({0}), Part({2}), Part({1}), Part({3})}) ); + } + + // Dimension check + BOOST_CHECK( tr.dimension() == 3 ); + // Matrix check + Eigen::MatrixXd default_matrix = Eigen::MatrixXd::Identity(3, 3); + BOOST_CHECK( tr.matrix() == default_matrix ); + // Vector check + Eigen::MatrixXd default_offset = Eigen::VectorXd::Zero(3); + BOOST_CHECK( tr.offset() == default_offset ); + + // Barycenter check + Point point({3.5, -1.8, 0.3}); + Simplex_handle s = tr.locate_point(point); + Eigen::Vector3d barycenter_cart = Eigen::Vector3d::Zero(); + for (auto v: s.vertex_range()) + for (std::size_t i = 0; i < v.size(); i++) + barycenter_cart(i) += v[i]; + barycenter_cart /= 4.; // simplex is three-dimensional + Eigen::Vector3d barycenter = tr.barycenter(s); + for (std::size_t i = 0; (long int)i < barycenter.size(); i++) + GUDHI_TEST_FLOAT_EQUALITY_CHECK(barycenter(i), barycenter_cart(i), 1e-7); + + // Barycenter check for twice the scale + s = tr.locate_point(point, 2); + barycenter_cart = Eigen::Vector3d::Zero(); + for (auto v: s.vertex_range()) + for (std::size_t i = 0; i < v.size(); i++) + barycenter_cart(i) += v[i]; + barycenter_cart /= 3.; // simplex is now a two-dimensional face + barycenter_cart /= 2.; // scale + barycenter = tr.barycenter(s, 2); + for (std::size_t i = 0; (long int)i < barycenter.size(); i++) + GUDHI_TEST_FLOAT_EQUALITY_CHECK(barycenter(i), barycenter_cart(i), 1e-7); + + // Matrix and offset change check + Eigen::MatrixXd new_matrix(3,3); + new_matrix << 1, 0, 0, -1, 1, 0, -1, 0, 1; + Eigen::Vector3d new_offset(1.5, 1, 0.5); + tr.change_matrix(new_matrix); + tr.change_offset(new_offset); + + BOOST_CHECK( tr.matrix() == new_matrix ); + BOOST_CHECK( tr.offset() == new_offset ); +} diff --git a/src/Coxeter_triangulation/test/function_test.cpp b/src/Coxeter_triangulation/test/function_test.cpp new file mode 100644 index 00000000..518bef9b --- /dev/null +++ b/src/Coxeter_triangulation/test/function_test.cpp @@ -0,0 +1,177 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Siargey Kachanovich + * + * Copyright (C) 2019 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +// workaround for the annoying boost message in boost 1.69 +#define BOOST_PENDING_INTEGER_LOG2_HPP +#include +// end workaround + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "function" +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +using namespace Gudhi::coxeter_triangulation; + +template +void test_function(const Function& fun) { + Eigen::VectorXd seed = fun.seed(); + Eigen::VectorXd res_seed = fun(fun.seed()); + BOOST_CHECK( seed.size() == (long int)fun.amb_d() ); + BOOST_CHECK( res_seed.size() == (long int)fun.cod_d() ); + for (std::size_t i = 0; i < fun.cod_d(); i++) + GUDHI_TEST_FLOAT_EQUALITY_CHECK(res_seed(i), 0., 1e-10); +} + +BOOST_AUTO_TEST_CASE(function) { + + { + // the sphere testing part + std::size_t m = 3, d = 5; + Eigen::VectorXd center(d); center << 2, 1.5, -0.5, 4.5, -1; + double radius = 5; + typedef Function_Sm_in_Rd Function_sphere; + Function_sphere fun_sphere(radius, m, d, center); + test_function(fun_sphere); + } + { + // the affine plane testing part + std::size_t m = 0, d = 5; + Eigen::MatrixXd normal_matrix = Eigen::MatrixXd::Zero(d, d-m); + for (std::size_t i = 0; i < d-m; ++i) + normal_matrix(i,i) = 1; + typedef Function_affine_plane_in_Rd Function_plane; + Function_plane fun_plane(normal_matrix); + test_function(fun_plane); + } + { + // the constant function testing part + std::size_t k = 2, d = 5; + auto x = Eigen::VectorXd::Constant(k, 1); + Constant_function fun_const(d, k, x); + Eigen::VectorXd res_zero = fun_const(Eigen::VectorXd::Zero(d)); + for (std::size_t i = 0; i < k; ++i) + GUDHI_TEST_FLOAT_EQUALITY_CHECK(res_zero(i), x(i), 1e-10); + } + { + // the chair function + Function_chair_in_R3 fun_chair; + test_function(fun_chair); + } + { + // the torus function + Function_torus_in_R3 fun_torus; + test_function(fun_torus); + } + { + // the whitney umbrella function + Function_whitney_umbrella_in_R3 fun_umbrella; + test_function(fun_umbrella); + } + { + // the lemniscate revolution function + Function_lemniscate_revolution_in_R3 fun_lemniscate; + test_function(fun_lemniscate); + } + { + // the iron function + Function_iron_in_R3 fun_iron; + test_function(fun_iron); + } + { + Function_moment_curve_in_Rd fun_moment_curve(3, 5); + test_function(fun_moment_curve); + } + { + // random orthogonal matrix + Eigen::MatrixXd matrix = random_orthogonal_matrix(5); + Eigen::MatrixXd id_matrix = matrix.transpose() * matrix; + for (std::size_t i = 0; i < 5; ++i) + for (std::size_t j = 0; j < 5; ++j) + if (i == j) + GUDHI_TEST_FLOAT_EQUALITY_CHECK(id_matrix(i,j), 1.0, 1e-10); + else + GUDHI_TEST_FLOAT_EQUALITY_CHECK(id_matrix(i,j), 0.0, 1e-10); + } + { + // function embedding + Function_iron_in_R3 fun_iron; + auto fun_embed = make_embedding(fun_iron, 5); + test_function(fun_iron); + + // function translation + Eigen::VectorXd off = Eigen::VectorXd::Random(5); + auto fun_trans = translate(fun_embed, off); + test_function(fun_trans); + + // function linear transformation + Eigen::MatrixXd matrix = Eigen::MatrixXd::Random(5, 5); + BOOST_CHECK( matrix.determinant() != 0. ); + auto fun_lin = make_linear_transformation(fun_trans, matrix); + test_function(fun_lin); + + // function negative + auto fun_neg = negation(fun_lin); + test_function(fun_neg); + + // function product + typedef Function_Sm_in_Rd Function_sphere; + Function_sphere fun_sphere(1, 1); + auto fun_prod = make_product_function(fun_sphere, fun_sphere, fun_sphere); + test_function(fun_prod); + + // function PL approximation + Coxeter_triangulation<> cox_tr(6); + typedef Coxeter_triangulation<>::Vertex_handle Vertex_handle; + auto fun_pl = make_pl_approximation(fun_prod, cox_tr); + Vertex_handle v0 = Vertex_handle(cox_tr.dimension(), 0); + Eigen::VectorXd x0 = cox_tr.cartesian_coordinates(v0); + Eigen::VectorXd value0 = fun_prod(x0); + Eigen::VectorXd pl_value0 = fun_pl(x0); + for (std::size_t i = 0; i < fun_pl.cod_d(); i++) + GUDHI_TEST_FLOAT_EQUALITY_CHECK(value0(i), pl_value0(i), 1e-10); + Vertex_handle v1 = v0; + v1[0] += 1; + Eigen::VectorXd x1 = cox_tr.cartesian_coordinates(v1); + Eigen::VectorXd value1 = fun_prod(x1); + Eigen::VectorXd pl_value1 = fun_pl(x1); + for (std::size_t i = 0; i < fun_pl.cod_d(); i++) + GUDHI_TEST_FLOAT_EQUALITY_CHECK(value1(i), pl_value1(i), 1e-10); + Eigen::VectorXd pl_value_mid = fun_pl(0.5*x0 + 0.5*x1); + for (std::size_t i = 0; i < fun_pl.cod_d(); i++) + GUDHI_TEST_FLOAT_EQUALITY_CHECK(0.5*value0(i) + 0.5*value1(i), pl_value_mid(i), 1e-10); + } +} diff --git a/src/Coxeter_triangulation/test/manifold_tracing_test.cpp b/src/Coxeter_triangulation/test/manifold_tracing_test.cpp new file mode 100644 index 00000000..7bcb11db --- /dev/null +++ b/src/Coxeter_triangulation/test/manifold_tracing_test.cpp @@ -0,0 +1,62 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Siargey Kachanovich + * + * Copyright (C) 2019 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "manifold_tracing" +#include +#include + +#include + +#include +#include +#include +#include + +using namespace Gudhi::coxeter_triangulation; + +BOOST_AUTO_TEST_CASE(manifold_tracing) { + // manifold without boundary + Function_Sm_in_Rd fun_sph(5.1111, 2); + auto oracle = make_oracle(fun_sph); + Coxeter_triangulation<> cox_tr(oracle.amb_d()); + cox_tr.change_offset(Eigen::VectorXd::Random(oracle.amb_d())); + + using MT = Manifold_tracing >; + Eigen::VectorXd seed = fun_sph.seed(); + std::vector seed_points(1, seed); + typename MT::Out_simplex_map out_simplex_map; + manifold_tracing_algorithm(seed_points, cox_tr, oracle, out_simplex_map); + + for (auto si_pair: out_simplex_map) { + BOOST_CHECK ( si_pair.first.dimension() == oracle.function().cod_d() ); + BOOST_CHECK ( si_pair.second.size() == (long int)oracle.function().amb_d() ); + } + BOOST_CHECK ( out_simplex_map.size() == 1054 ); + + // manifold with boundary + Function_Sm_in_Rd fun_boundary(3.0, 2, fun_sph.seed()); + auto oracle_with_boundary = make_oracle(fun_sph, fun_boundary); + typename MT::Out_simplex_map interior_simplex_map, boundary_simplex_map; + manifold_tracing_algorithm(seed_points, cox_tr, oracle_with_boundary, interior_simplex_map, boundary_simplex_map); + for (auto si_pair: interior_simplex_map) { + BOOST_CHECK ( si_pair.first.dimension() == oracle.function().cod_d() ); + BOOST_CHECK ( si_pair.second.size() == (long int)oracle.function().amb_d() ); + } + BOOST_CHECK ( interior_simplex_map.size() == 89 ); + for (auto si_pair: boundary_simplex_map) { + BOOST_CHECK ( si_pair.first.dimension() == oracle.function().cod_d()+1 ); + BOOST_CHECK ( si_pair.second.size() == (long int)oracle.function().amb_d() ); + } + BOOST_CHECK ( boundary_simplex_map.size() == 54 ); + +} diff --git a/src/Coxeter_triangulation/test/oracle_test.cpp b/src/Coxeter_triangulation/test/oracle_test.cpp new file mode 100644 index 00000000..8d371656 --- /dev/null +++ b/src/Coxeter_triangulation/test/oracle_test.cpp @@ -0,0 +1,60 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Siargey Kachanovich + * + * Copyright (C) 2019 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "oracle" +#include +#include + +#include + +#include + +#include +#include + +#include + +#include +#include + +using namespace Gudhi::coxeter_triangulation; + +BOOST_AUTO_TEST_CASE(oracle) { + + Function_Sm_in_Rd fun_sph(5.1111, 2); + auto oracle = make_oracle(fun_sph); + Coxeter_triangulation<> cox_tr(oracle.amb_d()); + // cox_tr.change_offset(Eigen::VectorXd::Random(oracle.amb_d())); + + Eigen::VectorXd seed = fun_sph.seed(); + auto s = cox_tr.locate_point(seed); + + std::size_t num_intersected_edges = 0; + for (auto f: s.face_range(oracle.cod_d())) { + auto qr = oracle.intersects(f, cox_tr); + if (qr.success) + num_intersected_edges++; + auto vertex_it = f.vertex_range().begin(); + Eigen::Vector3d p1 = cox_tr.cartesian_coordinates(*vertex_it++); + Eigen::Vector3d p2 = cox_tr.cartesian_coordinates(*vertex_it++); + BOOST_CHECK( vertex_it == f.vertex_range().end() ); + Eigen::MatrixXd m(3,3); + if (qr.success) { + m.col(0) = qr.intersection; + m.col(1) = p1; + m.col(2) = p2; + GUDHI_TEST_FLOAT_EQUALITY_CHECK(m.determinant(), 0.0, 1e-10); + } + } + BOOST_CHECK( num_intersected_edges == 3 || num_intersected_edges == 4 ); +} diff --git a/src/Coxeter_triangulation/test/perm_rep_test.cpp b/src/Coxeter_triangulation/test/perm_rep_test.cpp new file mode 100644 index 00000000..f2cdbce1 --- /dev/null +++ b/src/Coxeter_triangulation/test/perm_rep_test.cpp @@ -0,0 +1,66 @@ +/* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): Siargey Kachanovich + * + * Copyright (C) 2019 Inria + * + * Modification(s): + * - YYYY/MM Author: Description of the modification + */ + +#define BOOST_TEST_DYN_LINK +#define BOOST_TEST_MODULE "permutahedral_representation" +#include + +#include + +BOOST_AUTO_TEST_CASE(permutahedral_representation) { + typedef std::vector Vertex; + typedef std::vector Part; + typedef std::vector Partition; + typedef Gudhi::coxeter_triangulation::Permutahedral_representation Simplex_handle; + Vertex v0(10, 0); + Partition omega = {Part({5}), Part({2}), Part({3,7}), Part({4,9}), Part({0,6,8}), Part({1,10})}; + Simplex_handle s(v0, omega); + + // Dimension check + BOOST_CHECK(s.dimension() == 5); + + // Vertex number check + std::vector vertices; + for (auto& v: s.vertex_range()) + vertices.push_back(v); + BOOST_CHECK(vertices.size() == 6); + + // Facet number check + std::vector facets; + for (auto& f: s.facet_range()) + facets.push_back(f); + BOOST_CHECK(facets.size() == 6); + + // Face of dim 3 number check + std::vector faces3; + for (auto& f: s.face_range(3)) + faces3.push_back(f); + BOOST_CHECK(faces3.size() == 15); + + // Cofacet number check + std::vector cofacets; + for (auto& f: s.cofacet_range()) + cofacets.push_back(f); + BOOST_CHECK(cofacets.size() == 12); + + // Is face check + Vertex v1(10, 0); + Partition omega1 = {Part({5}), Part({0,1,2,3,4,6,7,8,9,10})}; + Simplex_handle s1(v1, omega1); + Vertex v2(10, 0); v2[1] = -1; + Partition omega2 = {Part({1}), Part({5}), Part({2}), Part({3,7}), Part({4,9}), Part({0,6,8}), Part({10})}; + Simplex_handle s2(v2, omega2); + BOOST_CHECK(s.is_face_of(s)); + BOOST_CHECK(s1.is_face_of(s)); + BOOST_CHECK(!s2.is_face_of(s)); + BOOST_CHECK(s.is_face_of(s2)); +} -- cgit v1.2.3