Commit e24f04f4 authored by Quentin Khan's avatar Quentin Khan

Add Taylor kernel to PerfTest

parent 0355015d
......@@ -52,7 +52,7 @@ struct kernel_descriptor {
*/
template<typename FReal>
struct kernel_descriptor<FReal, 0> {
//enum : bool {disabled = true};
enum : bool {disabled = false};
/// Kernel lookup name
constexpr static const char* name = "lagrange";
/// Interpolation order
......@@ -90,7 +90,7 @@ struct kernel_descriptor<FReal, 0> {
#include "Adaptive/new/FAdaptChebKernel.hpp"
template<typename FReal> struct kernel_descriptor<FReal, 1> {
enum : bool {disabled = true};
enum : bool {disabled = false};
/// Kernel lookup name
constexpr static const char* name = "chebyshev";
/// Kernel interpolation order
......@@ -127,6 +127,7 @@ template<typename FReal> struct kernel_descriptor<FReal, 1> {
#include "../../Adaptive/FCountKernel.hpp"
template<typename FReal> struct kernel_descriptor<FReal, 2> {
//enum : bool {disabled = true};
/// Kernel lookup name
constexpr static const char* name = "count";
/// Kernel cell data
......@@ -158,6 +159,40 @@ template<typename FReal> struct kernel_descriptor<FReal, 2> {
}
};
#include "Kernels/Taylor/FTaylorCell.hpp"
#include "Kernels/Taylor/FTaylorKernel.hpp"
template<typename FReal> struct kernel_descriptor<FReal, 3> {
enum : bool {disabled = false};
/// Kernel lookup name
constexpr static const char* name = "taylor";
/// Kernel interpolation order
constexpr static const int ORDER = 7;
/// Kernel cell data
using cell_data_t = FTaylorCell<FReal, ORDER, 1>;
/// Particle container data type
using container_t = FP2PParticleContainerIndexed<FReal>;
/// Direct interaction kernel type
using MatrixKernelClass = FInterpMatrixKernelR<FReal>;
template<typename tree_descriptor>
struct kernel_factory {
/// Kernel type
using kernel_t = FTaylorKernel<FReal, cell_data_t, container_t, ORDER, 1>;
/// Direct interaction kernel instance
MatrixKernelClass MatrixKernel;
/** \brief Build method */
template<typename tree_t>
std::unique_ptr<kernel_t> build(const FPerfTestParams&, tree_t& tree) {
return std::make_unique<kernel_t>(static_cast<int>(tree.getHeight()),
tree.getBoxWidth(),
tree.getBoxCenter());
}
};
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment