Skip to content
Snippets Groups Projects
Commit da53221a authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add temporary test files

parent ffe89939
No related branches found
No related tags found
No related merge requests found
Pipeline #1979 passed
......@@ -65,6 +65,9 @@
#include <utils/checkpointing/WriteIQuadratureDescriptor.hpp>
#include <utils/checkpointing/WriteVariableBCDescriptor.hpp>
#warning REMOVE
#include <scheme/test_reconstruction.hpp>
#include <memory>
SchemeModule::SchemeModule()
......@@ -756,6 +759,12 @@ SchemeModule::SchemeModule()
));
this->_addBuiltinFunction("test_reconstruction", std::function{[](std::shared_ptr<const DiscreteFunctionVariant> df,
size_t degree, size_t number) -> void {
//
test_reconstruction(df, degree, number);
}});
MathFunctionRegisterForVh{*this};
}
......
......@@ -12,6 +12,8 @@ add_library(
HyperelasticSolver.cpp
LoadBalancer.cpp
PolynomialReconstruction.cpp
test_reconstruction.cpp
)
target_link_libraries(
......
#include <scheme/test_reconstruction.hpp>
#include <scheme/PolynomialReconstruction.hpp>
#include <utils/Timer.hpp>
void
test_reconstruction(std::shared_ptr<const DiscreteFunctionVariant> df, size_t degree, size_t number)
{
PolynomialReconstructionDescriptor descriptor{IntegrationMethodType::boundary, degree};
PolynomialReconstruction rec_builder{descriptor};
Timer t;
for (size_t i = 0; i < number; ++i) {
auto rec = rec_builder.build(df);
}
std::cout << "*** Elapsed time for " << number << " reconstructions: " << t.seconds() << "s ***\n";
}
#ifndef TEST_RECONSTRUCTION_HPP
#define TEST_RECONSTRUCTION_HPP
#include <scheme/DiscreteFunctionVariant.hpp>
#warning REMOVE
void test_reconstruction(std::shared_ptr<const DiscreteFunctionVariant> df, size_t degree, size_t number);
#endif // TEST_RECONSTRUCTION_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment