24 template <
typename T >
25 static real_t real_c( T t )
27 return static_cast< real_t >( t );
30 template <
typename T >
31 static uint_t uint_c( T t )
33 return static_cast< uint_t >( t );
89 for (
uint_t i = 0; i <= deg; ++i )
91 for (
uint_t j = 0; j <= i; ++j )
94 if ( i == deg && j == ord )
304template < std::
floating_po
int ScalarTypeCoeff, std::
floating_po
int ScalarTypeGr
id >
311 "sph_coeffs_degree_l_" + std::to_string( degree_l ) +
"_order_m_" + std::to_string( order_m ),
312 coords_shell.extent( 0 ),
313 coords_shell.extent( 1 ),
314 coords_shell.extent( 2 ) );
316 auto sph_coeffs_host = Kokkos::create_mirror_view( Kokkos::HostSpace{}, sph_coeffs );
317 auto coords_shell_host = Kokkos::create_mirror_view( Kokkos::HostSpace{}, coords_shell );
322 for (
int local_subdomain_id = 0; local_subdomain_id < sph_coeffs.extent( 0 ); ++local_subdomain_id )
324 for (
int i = 0; i < sph_coeffs.extent( 1 ); ++i )
326 for (
int j = 0; j < sph_coeffs.extent( 2 ); ++j )
328 const auto x = coords_shell_host( local_subdomain_id, i, j, 0 );
329 const auto y = coords_shell_host( local_subdomain_id, i, j, 1 );
330 const auto z = coords_shell_host( local_subdomain_id, i, j, 2 );
331 const auto coeff = sph_tool.shconvert_eval( degree_l, order_m, x, y, z );
332 sph_coeffs_host( local_subdomain_id, i, j ) = coeff;
338 Kokkos::deep_copy( sph_coeffs, sph_coeffs_host );
Kokkos::View< ScalarType ***[VecDim], Layout > Grid3DDataVec
Definition grid_types.hpp:40
Kokkos::View< ScalarType ***, Layout > Grid3DDataScalar
Definition grid_types.hpp:22
Definition radial_profiles.hpp:10
grid::Grid3DDataScalar< ScalarTypeCoeff > spherical_harmonics_coefficients_grid(const int degree_l, const int order_m, const grid::Grid3DDataVec< ScalarTypeGrid, 3 > &coords_shell)
Interpolates spherical harmonics coefficients of a specific order and degree into a grid (on the host...
Definition spherical_harmonics.hpp:305
double real_t
Definition types.hpp:4