Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake-single-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_VISUALIZATION=OFF

- name: Build
# Build your program with the given configuration
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ add_compile_options(-fPIC)
add_compile_options(-Wno-register)
set(DIR_EXT "${CMAKE_CURRENT_SOURCE_DIR}/ext")

list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# Set options if top level
if (PROJECT_IS_TOP_LEVEL)
# Options to generate python bindings
Expand Down Expand Up @@ -37,8 +39,6 @@ if (PROJECT_IS_TOP_LEVEL)
option ( SUITESPARSE_USE_CUDA OFF )
endif()

list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(boost)
#include(eigen)

Expand Down
4 changes: 2 additions & 2 deletions cmake/Catch2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1
GIT_TAG v3.15.0
)
FetchContent_MakeAvailable(Catch2)
FetchContent_MakeAvailable(Catch2)
4 changes: 4 additions & 0 deletions cmake/conformal_ideal_delaunay.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ FetchContent_Declare(
GIT_TAG penner_optimization
)
FetchContent_MakeAvailable(conformal_ideal_delaunay)

if(TARGET conformal_ideal_delaunay AND APPLE)
target_compile_options(conformal_ideal_delaunay PRIVATE -Wno-extra-tokens)
endif()
3 changes: 3 additions & 0 deletions src/optimization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,8 @@ if(BUILD_CURVATURE_METRIC_TESTS)
add_executable(penner_tests tests/tests.cpp)
target_link_libraries(penner_tests PRIVATE PennerOptimizationLib Catch2::Catch2WithMain)
target_include_directories(penner_tests PRIVATE tests)
target_compile_definitions(penner_tests PRIVATE
TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/tests/regression"
)
add_test(NAME penner_tests COMMAND penner_tests)
endif()
11 changes: 6 additions & 5 deletions src/optimization/tests/test_area.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
*********************************************************************************/
#include <catch2/catch_test_macros.hpp>

#include "area.hh"
#include "shapes.hh"
#include "common.hh"
#include "cone_metric.hh"
#include "optimization/core/area.h"
#include "optimization/util/shapes.h"
#include "optimization/core/common.h"
#include "optimization/core/cone_metric.h"

using namespace CurvatureMetric;
using namespace Penner;
using namespace Penner::Optimization;

TEST_CASE( "The squared area of a triangle can be computed", "[area]" )
{
Expand Down
11 changes: 6 additions & 5 deletions src/optimization/tests/test_energies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
*********************************************************************************/
#include <catch2/catch_test_macros.hpp>

#include "energies.hh"
#include "shapes.hh"
#include "common.hh"
#include "cone_metric.hh"
#include "optimization/metric_optimization/energies.h"
#include "optimization/util/shapes.h"
#include "optimization/core/common.h"
#include "optimization/core/cone_metric.h"

using namespace CurvatureMetric;
using namespace Penner;
using namespace Penner::Optimization;

TEST_CASE( "The energies of a triangle can be computed", "[energies]" )
{
Expand Down
15 changes: 8 additions & 7 deletions src/optimization/tests/test_optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
*********************************************************************************/
#include <catch2/catch_test_macros.hpp>

#include "implicit_optimization.hh"
#include "shapes.hh"
#include "common.hh"
#include "cone_metric.hh"
#include "energy_functor.hh"

using namespace CurvatureMetric;
#include "optimization/metric_optimization/implicit_optimization.h"
#include "optimization/util/shapes.h"
#include "optimization/core/common.h"
#include "optimization/core/cone_metric.h"
#include "optimization/metric_optimization/energy_functor.h"

using namespace Penner;
using namespace Penner::Optimization;

TEST_CASE("The optimium edge length for a triangle can be computed", "[optimize]")
{
Expand Down
12 changes: 7 additions & 5 deletions src/optimization/tests/test_refinement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@
*********************************************************************************/
#include <catch2/catch_test_macros.hpp>

#include "common.hh"
#include "refinement.hh"
#include "triangulation.hh"
#include "optimization/core/common.h"
#include "optimization/parameterization/refinement.h"
#include "optimization/parameterization/triangulation.h"

using namespace CurvatureMetric;
using namespace Penner;
using namespace Penner::Optimization;

TEST_CASE( "A self overlapping polygon can be identified", "[refinement]" )
{
std::vector<std::vector<bool>> is_self_overlapping_subpolygon;
std::vector<std::vector<int>> splitting_vertices;
std::vector<std::vector<Scalar>> min_face_areas;
std::vector<VectorX> uv_vertices, vertices;
std::vector<Eigen::Vector2d> uv_vertices;
std::vector<Eigen::Vector3d> vertices;

SECTION ( "Vertex" )
{
Expand Down
11 changes: 6 additions & 5 deletions src/optimization/tests/test_regression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@
#include <catch2/catch_test_macros.hpp>
#include <igl/readOBJ.h>

#include "common.hh"
#include "penner_optimization_interface.hh"
#include "io.hh"
#include "vector.hh"
#include "optimization/core/common.h"
#include "optimization/interface.h"
#include "util/io.h"
#include "util/vector.h"

using namespace CurvatureMetric;
using namespace Penner;
using namespace Penner::Optimization;

namespace
{
Expand Down
19 changes: 10 additions & 9 deletions src/optimization/tests/test_shear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@
*********************************************************************************/
#include <catch2/catch_test_macros.hpp>

#include "shear.hh"
#include "shapes.hh"
#include "embedding.hh"
#include "common.hh"
#include "cone_metric.hh"
#include "penner_optimization_interface.hh"
#include "projection.hh"

using namespace CurvatureMetric;
#include "optimization/core/shear.h"
#include "optimization/util/shapes.h"
#include "util/embedding.h"
#include "optimization/core/common.h"
#include "optimization/core/cone_metric.h"
#include "optimization/interface.h"
#include "optimization/core/projection.h"

using namespace Penner;
using namespace Penner::Optimization;

TEST_CASE( "A dual shear coordinate basis can be computed", "[shear]" )
{
Expand Down
Loading