diff options
Diffstat (limited to 'vcpkg/ports/verdict')
| -rw-r--r-- | vcpkg/ports/verdict/fix_osx.patch | 112 | ||||
| -rw-r--r-- | vcpkg/ports/verdict/include.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/verdict/portfile.cmake | 24 | ||||
| -rw-r--r-- | vcpkg/ports/verdict/vcpkg.json | 17 |
4 files changed, 166 insertions, 0 deletions
diff --git a/vcpkg/ports/verdict/fix_osx.patch b/vcpkg/ports/verdict/fix_osx.patch new file mode 100644 index 0000000..5aefe93 --- /dev/null +++ b/vcpkg/ports/verdict/fix_osx.patch @@ -0,0 +1,112 @@ +diff --git a/V_HexMetric.cpp b/V_HexMetric.cpp +index fda4771..74eecb2 100644 +--- a/V_HexMetric.cpp ++++ b/V_HexMetric.cpp +@@ -2974,10 +2974,10 @@ double hex_distortion(int num_nodes, const double coordinates[][3]) + double weight[maxTotalNumberGaussPoints]; + + // create an object of GaussIntegration +- GaussIntegration gint{}; +- gint.initialize(number_of_gauss_points, num_nodes, number_dimension); +- gint.calculate_shape_function_3d_hex(); +- gint.get_shape_func(shape_function[0], dndy1[0], dndy2[0], dndy3[0], weight); ++ GaussIntegration gaussint; ++ gaussint.initialize(number_of_gauss_points, num_nodes, number_dimension); ++ gaussint.calculate_shape_function_3d_hex(); ++ gaussint.get_shape_func(shape_function[0], dndy1[0], dndy2[0], dndy3[0], weight); + + VerdictVector xxi, xet, xze, xin; + +@@ -3014,7 +3014,7 @@ double hex_distortion(int num_nodes, const double coordinates[][3]) + double dndy2_at_node[maxNumberNodes][maxNumberNodes]; + double dndy3_at_node[maxNumberNodes][maxNumberNodes]; + +- gint.calculate_derivative_at_nodes_3d(dndy1_at_node, dndy2_at_node, dndy3_at_node); ++ gaussint.calculate_derivative_at_nodes_3d(dndy1_at_node, dndy2_at_node, dndy3_at_node); + int node_id; + for (node_id = 0; node_id < num_nodes; node_id++) + { +diff --git a/V_QuadMetric.cpp b/V_QuadMetric.cpp +index 2486146..68af002 100644 +--- a/V_QuadMetric.cpp ++++ b/V_QuadMetric.cpp +@@ -1409,10 +1409,10 @@ double quad_distortion(int num_nodes, const double coordinates[][3]) + double weight[maxTotalNumberGaussPoints]; + + // create an object of GaussIntegration +- GaussIntegration gint{}; +- gint.initialize(number_of_gauss_points, num_nodes); +- gint.calculate_shape_function_2d_quad(); +- gint.get_shape_func(shape_function[0], dndy1[0], dndy2[0], weight); ++ GaussIntegration gaussint; ++ gaussint.initialize(number_of_gauss_points, num_nodes); ++ gaussint.calculate_shape_function_2d_quad(); ++ gaussint.get_shape_func(shape_function[0], dndy1[0], dndy2[0], weight); + + // calculate element area + int ife, ja; +@@ -1435,7 +1435,7 @@ double quad_distortion(int num_nodes, const double coordinates[][3]) + double dndy1_at_node[maxNumberNodes][maxNumberNodes]; + double dndy2_at_node[maxNumberNodes][maxNumberNodes]; + +- gint.calculate_derivative_at_nodes(dndy1_at_node, dndy2_at_node); ++ gaussint.calculate_derivative_at_nodes(dndy1_at_node, dndy2_at_node); + + VerdictVector normal_at_nodes[9]; + +diff --git a/V_TetMetric.cpp b/V_TetMetric.cpp +index db3b7c3..b227006 100644 +--- a/V_TetMetric.cpp ++++ b/V_TetMetric.cpp +@@ -1360,10 +1360,10 @@ double tet_distortion(int num_nodes, const double coordinates[][3]) + double weight[maxTotalNumberGaussPoints]; + + // create an object of GaussIntegration for tet +- GaussIntegration gint{}; +- gint.initialize(number_of_gauss_points, num_nodes, number_dims, is_tri); +- gint.calculate_shape_function_3d_tet(); +- gint.get_shape_func(shape_function[0], dndy1[0], dndy2[0], dndy3[0], weight); ++ GaussIntegration gaussint; ++ gaussint.initialize(number_of_gauss_points, num_nodes, number_dims, is_tri); ++ gaussint.calculate_shape_function_3d_tet(); ++ gaussint.get_shape_func(shape_function[0], dndy1[0], dndy2[0], dndy3[0], weight); + + // vector xxi is the derivative vector of coordinates w.r.t local xi coordinate in the + // computation space +@@ -1408,7 +1408,7 @@ double tet_distortion(int num_nodes, const double coordinates[][3]) + double dndy2_at_node[maxNumberNodes][maxNumberNodes]; + double dndy3_at_node[maxNumberNodes][maxNumberNodes]; + +- gint.calculate_derivative_at_nodes_3d_tet(dndy1_at_node, dndy2_at_node, dndy3_at_node); ++ gaussint.calculate_derivative_at_nodes_3d_tet(dndy1_at_node, dndy2_at_node, dndy3_at_node); + int node_id; + for (node_id = 0; node_id < num_nodes; node_id++) + { +diff --git a/V_TriMetric.cpp b/V_TriMetric.cpp +index 3a2a16a..a2caba5 100644 +--- a/V_TriMetric.cpp ++++ b/V_TriMetric.cpp +@@ -778,10 +778,10 @@ double tri_distortion(int num_nodes, const double coordinates[][3]) + // create an object of GaussIntegration + int number_dims = 2; + int is_tri = 1; +- GaussIntegration gint{}; +- gint.initialize(number_of_gauss_points, num_nodes, number_dims, is_tri); +- gint.calculate_shape_function_2d_tri(); +- gint.get_shape_func(shape_function[0], dndy1[0], dndy2[0], weight); ++ GaussIntegration gaussint; ++ gaussint.initialize(number_of_gauss_points, num_nodes, number_dims, is_tri); ++ gaussint.calculate_shape_function_2d_tri(); ++ gaussint.get_shape_func(shape_function[0], dndy1[0], dndy2[0], weight); + + // calculate element area + int ife, ja; +@@ -805,7 +805,7 @@ double tri_distortion(int num_nodes, const double coordinates[][3]) + double dndy1_at_node[maxNumberNodes][maxNumberNodes]; + double dndy2_at_node[maxNumberNodes][maxNumberNodes]; + +- gint.calculate_derivative_at_nodes_2d_tri(dndy1_at_node, dndy2_at_node); ++ gaussint.calculate_derivative_at_nodes_2d_tri(dndy1_at_node, dndy2_at_node); + + VerdictVector normal_at_nodes[7]; + diff --git a/vcpkg/ports/verdict/include.patch b/vcpkg/ports/verdict/include.patch new file mode 100644 index 0000000..541fea9 --- /dev/null +++ b/vcpkg/ports/verdict/include.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73c4de3..2cdd102 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,7 +54,7 @@ configure_file( + + add_library(verdict ${verdict_SOURCES} ${verdict_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/verdict_config.h) + target_include_directories(verdict PUBLIC +- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>) ++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> $<INSTALL_INTERFACE:include>) + if(UNIX) + target_link_libraries(verdict PRIVATE m) + endif() diff --git a/vcpkg/ports/verdict/portfile.cmake b/vcpkg/ports/verdict/portfile.cmake new file mode 100644 index 0000000..4b0c639 --- /dev/null +++ b/vcpkg/ports/verdict/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sandialabs/verdict + REF ${VERSION} + SHA512 e4a38fabcb7b56cbc50b59ee2d97c8a4cc3a2afea6ec22860005b77b79536a8dae16acef48197ae881f5b6dbd20495c16ba5b3eadd57d7d478482e5734a98b1d + HEAD_REF master + PATCHES include.patch + fix_osx.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DVERDICT_ENABLE_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/verdict" PACKAGE_NAME verdict) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") + diff --git a/vcpkg/ports/verdict/vcpkg.json b/vcpkg/ports/verdict/vcpkg.json new file mode 100644 index 0000000..58b2901 --- /dev/null +++ b/vcpkg/ports/verdict/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "verdict", + "version": "1.4.2", + "description": "Compute quality functions of 2 and 3-dimensional regions.", + "homepage": "https://github.com/sandialabs/verdict", + "license": null, + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |