Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package verdict for openSUSE:Factory checked in at 2022-12-07 17:35:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/verdict (Old) and /work/SRC/openSUSE:Factory/.verdict.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "verdict" Wed Dec 7 17:35:00 2022 rev:2 rq:1040756 version:1.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/verdict/verdict.changes 2022-10-20 11:11:53.388041338 +0200 +++ /work/SRC/openSUSE:Factory/.verdict.new.1835/verdict.changes 2022-12-07 17:36:19.256984599 +0100 @@ -1,0 +2,12 @@ +Tue Dec 6 13:03:53 UTC 2022 - Dirk Müller <dmuel...@suse.com> + +- update to 1.4.1: + * VerdictVector: Use c++ headers, re-enable length function + * Use c++ version of math functions + * Fix install dir for verdict on Linux. + * ome fixes for building with the Intel compiler. + * Fix quad_aspect_ratio for concave quads. + * Remove unnecessary link to gtest_main + * improved README + +------------------------------------------------------------------- Old: ---- verdict-1.4.0.tar.gz New: ---- verdict-1.4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ verdict.spec ++++++ --- /var/tmp/diff_new_pack.7BiqkX/_old 2022-12-07 17:36:19.860987907 +0100 +++ /var/tmp/diff_new_pack.7BiqkX/_new 2022-12-07 17:36:19.864987929 +0100 @@ -19,7 +19,7 @@ %define libname libverdict1_4 Name: verdict -Version: 1.4.0 +Version: 1.4.1 Release: 0 Summary: Compute quality functions of 2 and 3-dimensional regions License: BSD-3-Clause @@ -61,8 +61,7 @@ %install %cmake_install -# README does not contain much useful info -rm %{buildroot}%{_docdir}/verdict/%{version}/README.md +rm -vrf %{buildroot}/%{_docdir} %check %ifarch %{ix86} @@ -79,6 +78,7 @@ %{_libdir}/lib*so.* %files devel +%doc README.md %{_includedir}/verdict*.h %{_libdir}/lib*so %{_libdir}/cmake/verdict ++++++ verdict-1.4.0.tar.gz -> verdict-1.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/verdict-1.4.0/CMakeLists.txt new/verdict-1.4.1/CMakeLists.txt --- old/verdict-1.4.0/CMakeLists.txt 2022-03-02 18:46:29.000000000 +0100 +++ new/verdict-1.4.1/CMakeLists.txt 2022-10-04 18:52:36.000000000 +0200 @@ -4,7 +4,10 @@ cmake_minimum_required(VERSION 3.16) -project(verdict VERSION 1.4.0) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED 1) + +project(verdict VERSION 1.4.1) # Includes include(GNUInstallDirs) @@ -53,6 +56,9 @@ add_library(verdict ${verdict_SOURCES}) target_include_directories(verdict PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>) +if(UNIX) + target_link_libraries(verdict PRIVATE m) +endif() # Setting the VERSION and SOVERSION of a library will include @@ -94,23 +100,42 @@ ######################### # Installation commands # ######################### +if (NOT verdict_INSTALL_DOC_DIR) + set(verdict_INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR}) +endif () +if (NOT verdict_INSTALL_INCLUDE_DIR) + set(verdict_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}) +endif () +if (NOT verdict_INSTALL_INCLUDE_SUBDIR) + set(verdict_INSTALL_INCLUDE_SUBDIR verdict) +endif () +if (NOT verdict_INSTALL_BIN_DIR) + set(verdict_INSTALL_BIN_DIR ${CMAKE_INSTALL_BINDIR}) +endif () +if (NOT verdict_INSTALL_LIB_DIR) + set(verdict_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR}) +endif () +if (NOT verdict_INSTALL_CMAKE_DIR) + set(verdict_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/verdict) +endif () # Install documentation install(FILES README.md - DESTINATION ${CMAKE_INSTALL_DOCDIR}/verdict/${verdict_VERSION}/ COMPONENT VerdictDevelopment) + DESTINATION ${verdict_INSTALL_DOC_DIR}/verdict/${verdict_VERSION}/ COMPONENT VerdictDevelopment) # Install required header files install(FILES ${CMAKE_CURRENT_BINARY_DIR}/verdict_config.h verdict.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT VerdictDevelopment) + DESTINATION ${verdict_INSTALL_INCLUDE_DIR} COMPONENT VerdictDevelopment) +target_include_directories(verdict PUBLIC $<INSTALL_INTERFACE:${verdict_INSTALL_INCLUDE_DIR}>) # Install library install(TARGETS verdict EXPORT ${VERDICT_EXPORT_GROUP} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime # .exe, .dll - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime # .so, .dll - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT VerdictDevelopment #[[.a, .lib]]) + RUNTIME DESTINATION ${verdict_INSTALL_BIN_DIR} COMPONENT Runtime # .exe, .dll + LIBRARY DESTINATION ${verdict_INSTALL_LIB_DIR} COMPONENT Runtime # .so, .dll + ARCHIVE DESTINATION ${verdict_INSTALL_LIB_DIR} COMPONENT VerdictDevelopment #[[.a, .lib]]) # Export Targets file export(EXPORT ${VERDICT_EXPORT_GROUP} @@ -121,12 +146,12 @@ install(EXPORT ${VERDICT_EXPORT_GROUP} FILE "VerdictTargets.cmake" NAMESPACE Verdict:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/verdict COMPONENT VerdictDevelopment) + DESTINATION ${verdict_INSTALL_CMAKE_DIR} COMPONENT VerdictDevelopment) # Create Config file configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/VerdictConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/VerdictConfig.cmake" - INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/verdict) + INSTALL_DESTINATION ${verdict_INSTALL_CMAKE_DIR}) # Generate the version file for the Config file write_basic_package_version_file( @@ -138,4 +163,4 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/VerdictConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/VerdictConfigVersion.cmake" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/verdict COMPONENT VerdictDevelopment) + DESTINATION ${verdict_INSTALL_CMAKE_DIR} COMPONENT VerdictDevelopment) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/verdict-1.4.0/V_QuadMetric.cpp new/verdict-1.4.1/V_QuadMetric.cpp --- old/verdict-1.4.0/V_QuadMetric.cpp 2022-03-02 18:46:29.000000000 +0100 +++ new/verdict-1.4.1/V_QuadMetric.cpp 2022-10-04 18:52:36.000000000 +0200 @@ -459,16 +459,10 @@ double mb = c1 > d1 ? c1 : d1; double hm = ma > mb ? ma : mb; - VerdictVector ab = edges[0] * edges[1]; - VerdictVector cd = edges[2] * edges[3]; - double denominator = ab.length() + cd.length(); + double corner_areas[4]; + signed_corner_areas(corner_areas, coordinates); - if (denominator < VERDICT_DBL_MIN) - { - return (double)VERDICT_DBL_MAX; - } - - double aspect_ratio = .5 * hm * (a1 + b1 + c1 + d1) / denominator; + double aspect_ratio = hm * (a1 + b1 + c1 + d1) / (corner_areas[0] + corner_areas[1] + corner_areas[2] + corner_areas[3]); if (aspect_ratio > 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/verdict-1.4.0/V_TetMetric.cpp new/verdict-1.4.1/V_TetMetric.cpp --- old/verdict-1.4.0/V_TetMetric.cpp 2022-03-02 18:46:29.000000000 +0100 +++ new/verdict-1.4.1/V_TetMetric.cpp 2022-10-04 18:52:36.000000000 +0200 @@ -1656,7 +1656,7 @@ return 0.0; } -double tet_mean_ratio(int /*num_nodes*/, const double coordinates[][3]) +double tet4_mean_ratio(const double coordinates[][3]) { const VerdictVector side0(coordinates[1][0] - coordinates[0][0], coordinates[1][1] - coordinates[0][1], coordinates[1][2] - coordinates[0][2]); @@ -1668,7 +1668,7 @@ coordinates[3][1] - coordinates[0][1], coordinates[3][2] - coordinates[0][2]); const double tetVolume = calculate_tet_volume_using_sides(side0, side2, side3); - if (std::abs(tetVolume) < VERDICT_DBL_MIN) + if (std::abs( tetVolume ) < VERDICT_DBL_MIN) { return 0.0; } @@ -1689,9 +1689,74 @@ const double side4_length_squared = side4.length_squared(); const double side5_length_squared = side5.length_squared(); - const int sign = tetVolume < 0. ? -1 : 1; - return sign * 12. * std::pow(3. * std::abs(tetVolume), 2. / 3.) / - (side0_length_squared + side1_length_squared + side2_length_squared + side3_length_squared + - side4_length_squared + side5_length_squared); + //const int sign = tetVolume < 0. ? -1 : 1; + //return sign * 12. * std::pow(3.*fabs(tetVolume), 2./3.) / (side0_length_squared + side1_length_squared + side2_length_squared + side3_length_squared + side4_length_squared + side5_length_squared); + double sum = (side0_length_squared + side1_length_squared + side2_length_squared + + side3_length_squared + side4_length_squared + side5_length_squared) / 6; + return 6 * std::pow(2, 0.5) * tetVolume / std::pow(sum, 3. / 2.); +} + +double tet10_mean_ratio(const double coordinates[][3]) +{ + double min_tet_mean_ratio = VERDICT_DBL_MAX; + + VerdictVector auxillary_node = tet10_auxillary_node_coordinate(coordinates); + + double aux_node_scale = 3.0 * std::pow(3., 0.5) * 0.25; + + for (int i = 0; i <= 11; i++) + { + int subtet_conn[4]; + subtet_conn[0] = tet10_subtet_conn[i][0]; + subtet_conn[1] = tet10_subtet_conn[i][1]; + subtet_conn[2] = tet10_subtet_conn[i][2]; + subtet_conn[3] = tet10_subtet_conn[i][3]; + + //get the coordinates of the nodes + double subtet_coords[4][3]; + for (int k = 0; k < 4; k++) + { + int node_index = subtet_conn[k]; + + if (10 == node_index) + { + subtet_coords[k][0] = auxillary_node.x(); + subtet_coords[k][1] = auxillary_node.y(); + subtet_coords[k][2] = auxillary_node.z(); + } + else + { + subtet_coords[k][0] = coordinates[node_index][0]; + subtet_coords[k][1] = coordinates[node_index][1]; + subtet_coords[k][2] = coordinates[node_index][2]; + } + } + + double tmp_mean_ratio = tet4_mean_ratio(subtet_coords); + + if (i > 3) + { + tmp_mean_ratio *= aux_node_scale; + } + + if (tmp_mean_ratio < min_tet_mean_ratio) + { + min_tet_mean_ratio = tmp_mean_ratio; + } + } + return min_tet_mean_ratio; +} + +double tet_mean_ratio(int num_nodes, const double coordinates[][3]) +{ + if (num_nodes == 4) + { + return tet4_mean_ratio(coordinates); + } + else if (num_nodes >= 10) + { + return tet10_mean_ratio(coordinates); + } + return 0.0; } } // namespace verdict diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/verdict-1.4.0/unittests/CMakeLists.txt new/verdict-1.4.1/unittests/CMakeLists.txt --- old/verdict-1.4.0/unittests/CMakeLists.txt 2022-03-02 18:46:29.000000000 +0100 +++ new/verdict-1.4.1/unittests/CMakeLists.txt 2022-10-04 18:52:36.000000000 +0200 @@ -5,4 +5,4 @@ ) ADD_EXECUTABLE(unittests_verdict ${TEST_SRCS}) -TARGET_LINK_LIBRARIES(unittests_verdict verdict GTest::GTest GTest::Main) +TARGET_LINK_LIBRARIES(unittests_verdict verdict GTest::GTest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/verdict-1.4.0/unittests/verdict.test.cpp new/verdict-1.4.1/unittests/verdict.test.cpp --- old/verdict-1.4.0/unittests/verdict.test.cpp 2022-03-02 18:46:29.000000000 +0100 +++ new/verdict-1.4.1/unittests/verdict.test.cpp 2022-10-04 18:52:36.000000000 +0200 @@ -345,8 +345,19 @@ TEST(verdict, quad_simple1) { - test_case testcase = { "quad_simple1", { { verdict::quad_skew, 0 } }, 4, - { { 0, 0, 0 }, { 1, 0, 0 }, { 1, 7, 0 }, { 0, 7, 0 } } }; + test_case testcase = { "quad_simple1", + { + /* 1 */ {verdict::quad_skew, 0}, + /* 2 */ {verdict::quad_aspect_ratio, 4.0}, + /* 3 */ {verdict::quad_max_edge_ratio, 7.0} + }, + 4, + { + { 0, 0, 0 }, + { 1, 0, 0 }, + { 1, 7, 0 }, + { 0, 7, 0 } + } }; runtest(testcase); } @@ -354,7 +365,7 @@ TEST(verdict, quad_simple2) { test_case testcase = { "quad_simple2", - { /* 1 */ { verdict::quad_aspect_ratio, 1.4299641718 }, + { /* 1 */ { verdict::quad_aspect_ratio, 1.74792 }, /* 2 */ { verdict::quad_skew, 0.092450032704 }, /* 3 */ { verdict::quad_taper, 0.74535599250 }, /* 4 */ { verdict::quad_warpage, 0.008 }, @@ -386,7 +397,7 @@ TEST(verdict, quad_chevron) { test_case testcase = { "quad_chevron", - { /* 1 */ { verdict::quad_aspect_ratio, 1.5317000291 }, + { /* 1 */ { verdict::quad_aspect_ratio, 3.00675 }, /* 2 */ { verdict::quad_skew, 6.5193481489e-01 }, /* 3 */ { verdict::quad_taper, 9.8606743061e-01 }, /* 4 */ { verdict::quad_warpage, -9.9459686559e-01 }, @@ -452,7 +463,7 @@ TEST(verdict, quad_bowtie) { test_case testcase = { "quad_bowtie", - { /* 1 */ { verdict::quad_aspect_ratio, 2.0295276589 }, + { /* 1 */ { verdict::quad_aspect_ratio, 15.132908 }, /* 2 */ { verdict::quad_skew, 6.0840291338e-01 }, /* 3 */ { verdict::quad_taper, 4.9416251426e+00 }, /* 4 */ { verdict::quad_warpage, -9.9972444493e-01 }, @@ -780,7 +791,7 @@ { test_case testcase = { "tet_meanRatio_unit_right_angle_tet", { - { verdict::tet_mean_ratio, 0.839947 }, + { verdict::tet_mean_ratio, 0.769800 }, }, 4, { @@ -797,7 +808,7 @@ { test_case testcase = { "tet_meanRatio_nearly_flat_right_angle_tet", { - { verdict::tet_mean_ratio, 0.0584774 }, + { verdict::tet_mean_ratio, 0.01414107 }, }, 4, { @@ -814,7 +825,7 @@ { test_case testcase = { "tet_meanRatio_nearly_flat_right_angle_tet", { - { verdict::tet_mean_ratio, -0.0584774 }, + { verdict::tet_mean_ratio, -0.014141 }, }, 4, { @@ -827,6 +838,57 @@ runtest(testcase); } +TEST(verdict, tet10_meanRatio_perfect_tet) +{ + test_case testcase = { + "tet10_meanRatio_perfect_tet", + { + { verdict::tet_mean_ratio, 1.0}, + }, + 10, + { + { 0, 0, 0 }, + { 0, 1, 1 }, + { 1, 0, 1 }, + { 1, 1, 0 }, + { 0, 0.5, 0.5 }, + { 0.5, 0.5, 1 }, + { 0.5, 0, 0.5 }, + { 0.5, 0.5, 0 }, + { 0.5, 1, 0.5 }, + { 1, 0.5, 0.5 }, + } + }; + + runtest(testcase); +} + +TEST(verdict, tet10_meanRatio_imperfect_tet) +{ + test_case testcase = { + "tet10_meanRatio_imperfect_tet", + { + { verdict::tet_mean_ratio, 0.39802657202178215 }, + }, + 10, + { + {-0.05, -0.1, 0.125}, + {0.9, 0.025, -0.075}, + {-0.1, 1.025, -0.075}, + {0.125, 0.1, 1.025}, + {0.525, 0.025, -0.05}, + {0.5, 0.525, 0.05}, + {0.125, 0.45, -0.075}, + {0.1, 0.075, 0.575}, + {0.475, -0.075, 0.55}, + {-0.075, 0.6, 0.45}, + } + }; + + runtest(testcase); +} + + TEST(verdict, tet_normalized_inradius_perfect_tet10) { test_case testcase = { "tet_normalized_subtet_perfect_tet",