Commit d8032aea authored by COULAUD Olivier's avatar COULAUD Olivier
Browse files

Fix pb in cheb

parent e7ea8034
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
// /examples/RelWithDebInfo/test_l2p --input-file ../data/datal2p_10.fma --order 4
using value_type = double; using value_type = double;
namespace functions { namespace functions {
...@@ -197,13 +198,15 @@ auto main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[]) -> int ...@@ -197,13 +198,15 @@ auto main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[]) -> int
interpolator_type2 cheb(matrix_kernel_type{}, order, interpolator_type2 cheb(matrix_kernel_type{}, order,
static_cast<std::size_t>(tree_height), static_cast<std::size_t>(tree_height),
box.width(0)); box.width(0));
std::clog << " warn 1 \n";
auto roots2_1d = cheb.roots(static_cast<std::size_t>(order)); auto roots2_1d = cheb.roots(static_cast<std::size_t>(order));
std::cout << "roots: " << roots2_1d << std::endl;
interpolator_type2 chebychev(matrix_kernel_type{}, order, interpolator_type2 chebychev(matrix_kernel_type{}, order,
static_cast<std::size_t>(tree_height), static_cast<std::size_t>(tree_height),
box.width(0)); box.width(0));
far_field_type2 far_cheb(chebychev); far_field_type2 far_cheb(chebychev);
std::cout << "roots: " << roots2_1d << std::endl;
/// ///
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
......
...@@ -83,9 +83,6 @@ namespace scalfmm::interpolation ...@@ -83,9 +83,6 @@ namespace scalfmm::interpolation
[[nodiscard]] inline auto roots_impl(std::size_t order) const -> xt::xarray<value_type> [[nodiscard]] inline auto roots_impl(std::size_t order) const -> xt::xarray<value_type>
{ {
const value_type coeff = value_type(3.14159265358979323846264338327950) / (value_type(order)); const value_type coeff = value_type(3.14159265358979323846264338327950) / (value_type(order));
// xfunction xt::cos
std::cout << " cos(n) " << (xt::cos(coeff * (xt::arange(int(order - 1), int(-1), -1) + 0.5))) << std::endl;
// const auto p = xt::eval(xt::cos(coeff * (xt::arange(int(order - 1), int(-1), -1) + 0.5)));
return xt::cos(coeff * (xt::arange(int(order - 1), int(-1), -1) + 0.5)); return xt::cos(coeff * (xt::arange(int(order - 1), int(-1), -1) + 0.5));
} }
/** /**
......
Supports Markdown
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