From fd575f169968d1c0bbd8e70f2137a4bf7a42fec9 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Sun, 13 Oct 2024 21:16:55 +0200 Subject: [PATCH] Remove temporary performances tests --- src/analysis/PyramidGaussQuadrature.cpp | 7 +++++ src/language/modules/SchemeModule.cpp | 24 ----------------- src/scheme/CMakeLists.txt | 4 +-- src/scheme/test_reconstruction.cpp | 35 ------------------------- src/scheme/test_reconstruction.hpp | 14 ---------- 5 files changed, 8 insertions(+), 76 deletions(-) delete mode 100644 src/scheme/test_reconstruction.cpp delete mode 100644 src/scheme/test_reconstruction.hpp diff --git a/src/analysis/PyramidGaussQuadrature.cpp b/src/analysis/PyramidGaussQuadrature.cpp index 679f3ded5..e85a74ac1 100644 --- a/src/analysis/PyramidGaussQuadrature.cpp +++ b/src/analysis/PyramidGaussQuadrature.cpp @@ -24,6 +24,11 @@ PyramidGaussQuadrature::_buildPointAndWeightLists(const size_t degree) const double w = (4. / 3) * unit_weight; + // gcc's bound checking are messed up due to the use of + // std::array and the following dynamic/general switch +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" + switch (id) { case 1: { Assert(value_list.size() == 1); @@ -96,6 +101,8 @@ PyramidGaussQuadrature::_buildPointAndWeightLists(const size_t degree) } // LCOV_EXCL_STOP } + +#pragma GCC diagnostic pop } }; diff --git a/src/language/modules/SchemeModule.cpp b/src/language/modules/SchemeModule.cpp index 010247fbe..5ad47feff 100644 --- a/src/language/modules/SchemeModule.cpp +++ b/src/language/modules/SchemeModule.cpp @@ -43,7 +43,6 @@ #include <scheme/OutflowBoundaryConditionDescriptor.hpp> #include <scheme/SymmetryBoundaryConditionDescriptor.hpp> #include <scheme/VariableBCDescriptor.hpp> -#include <scheme/test_reconstruction.hpp> #include <utils/Socket.hpp> #include <memory> @@ -692,29 +691,6 @@ SchemeModule::SchemeModule() )); -#warning REMOVE AFTER TESTS FINISHED - this->_addBuiltinFunction("test_reconstruction", - std::function( - - [](const std::vector<std::shared_ptr<const DiscreteFunctionVariant>>& - discrete_function_variant_list) -> void { - test_reconstruction(discrete_function_variant_list); - } - - )); - -#warning REMOVE AFTER TESTS FINISHED - this->_addBuiltinFunction("test_reconstruction", - std::function( - - [](const std::vector<std::shared_ptr<const DiscreteFunctionVariant>>& - discrete_function_variant_list, - uint64_t degree) -> void { - test_reconstruction(discrete_function_variant_list, degree); - } - - )); - MathFunctionRegisterForVh{*this}; } diff --git a/src/scheme/CMakeLists.txt b/src/scheme/CMakeLists.txt index a759fca6a..a52ac4e6c 100644 --- a/src/scheme/CMakeLists.txt +++ b/src/scheme/CMakeLists.txt @@ -3,16 +3,14 @@ add_library( PugsScheme AcousticSolver.cpp - HyperelasticSolver.cpp DiscreteFunctionIntegrator.cpp DiscreteFunctionInterpoler.cpp DiscreteFunctionUtils.cpp DiscreteFunctionVectorIntegrator.cpp DiscreteFunctionVectorInterpoler.cpp FluxingAdvectionSolver.cpp + HyperelasticSolver.cpp PolynomialReconstruction.cpp - - test_reconstruction.cpp ) target_link_libraries( diff --git a/src/scheme/test_reconstruction.cpp b/src/scheme/test_reconstruction.cpp deleted file mode 100644 index 629d1337e..000000000 --- a/src/scheme/test_reconstruction.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include <scheme/test_reconstruction.hpp> - -#include <mesh/NamedBoundaryDescriptor.hpp> -#include <scheme/IntegrationMethodType.hpp> -#include <scheme/PolynomialReconstruction.hpp> -#include <utils/Timer.hpp> - -void -test_reconstruction(const std::vector<std::shared_ptr<const DiscreteFunctionVariant>>& discrete_function_variant_list, - uint64_t degree) -{ - std::vector descriptor_list = { - PolynomialReconstructionDescriptor{IntegrationMethodType::boundary, - degree, - {std::make_shared<NamedBoundaryDescriptor>("XMIN"), - std::make_shared<NamedBoundaryDescriptor>("XMAX"), - std::make_shared<NamedBoundaryDescriptor>("YMIN"), - std::make_shared<NamedBoundaryDescriptor>("YMAX")}}}; - - for (auto&& descriptor : descriptor_list) { - const size_t nb_loops = 1; - std::cout << "** variable list at once (" << nb_loops << " times) using " << rang::fgB::yellow - << name(descriptor.integrationMethodType()) << rang::fg::reset << "\n"; - - PolynomialReconstruction reconstruction{descriptor}; - Timer t; - for (size_t i = 0; i < nb_loops; ++i) { - auto res = reconstruction.build(discrete_function_variant_list); - } - t.pause(); - std::cout << "t = " << t << '\n'; - } - - std::cout << "finished!\n"; -} diff --git a/src/scheme/test_reconstruction.hpp b/src/scheme/test_reconstruction.hpp deleted file mode 100644 index d2fc5bd03..000000000 --- a/src/scheme/test_reconstruction.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef TEST_RECONSTRUCTION_HPP -#define TEST_RECONSTRUCTION_HPP - -#warning REMOVE AFTER TESTS FINISHED -#include <mesh/MeshVariant.hpp> -#include <scheme/DiscreteFunctionVariant.hpp> - -#include <vector> - -void test_reconstruction( - const std::vector<std::shared_ptr<const DiscreteFunctionVariant>>& discrete_function_variant_list, - uint64_t degree = 1); - -#endif // TEST_RECONSTRUCTION_HPP -- GitLab