Commit 19cfb571 by ESTERIE Pierre

### Fix roots problem in chebychev

parent b3682271
 ... ... @@ -27,11 +27,11 @@ namespace scalfmm::container template struct point { static_assert(std::is_arithmetic::value, "Point's inner type should be arithmetic!"); static_assert(meta::is_arithmetic::value, "Point's inner type should be arithmetic!"); }; template struct point::value>::type> struct point::value>::type> : public std::array { public: ... ...
 ... ... @@ -80,14 +80,14 @@ namespace scalfmm::interpolation auto operator=(chebyshev_interpolator&&) noexcept -> chebyshev_interpolator& = default; ~chebyshev_interpolator() = default; [[nodiscard]] inline auto roots_impl(std::size_t order) const [[nodiscard]] inline auto roots_impl(std::size_t order) const -> xt::xarray { 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::linspace(value_type(-1.), value_type(1), order); return xt::cos(coeff * (xt::arange(int(order - 1), int(-1), -1) + 0.5)); //return xt::linspace(value_type(-1.), value_type(1), order); } /** * Chebyshev polynomials of first kind \f$T_n(x) = \cos(n \arccos(x)) \f$ ... ... @@ -127,6 +127,10 @@ namespace scalfmm::interpolation return value_type(n * (sin(n * acos(x))) / sqrt(1 - x * x)); } inline auto generate_interactions_matrixes_impl(value_type width, std::size_t tree_height) -> void {} template [[nodiscard]] inline auto generate_matrix_k_impl(TensorViewX&& X, TensorViewY&& Y, std::size_t order, matrix_kernel_type const& far_field, std::size_t n, ... ...
 ... ... @@ -286,10 +286,11 @@ namespace scalfmm::meta { }; } // namespace scalfmm::meta template struct is_arithmetic : std::is_arithmetic {}; template struct is_integral : std::is_integral {}; namespace std { template struct is_arithmetic> : is_arithmetic { ... ... @@ -299,6 +300,6 @@ namespace std struct is_integral> : is_integral { }; } // namespace std } // namespace scalfmm::meta #endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!