/*+ ARES/HADES/BORG Package -- ./libLSS/physics/classic_gpot.hpp Copyright (C) 2014-2020 Guilhem Lavaux Copyright (C) 2009-2020 Jens Jasche Additional contributions from: Guilhem Lavaux (2023) +*/ #ifndef __LIBLSS_PHYSICS_CLASSIC_GPOT_HPP #define __LIBLSS_PHYSICS_CLASSIC_GPOT_HPP #include #include "libLSS/tools/console.hpp" #include using namespace LibLSS; typedef boost::multi_array_types::extent_range range; using boost::extents; using boost::format; namespace LibLSS { template struct ClassicGravitationalPotential { typedef T Type; typedef boost::multi_array DensityArray; typedef boost::multi_array GravityArray; template static void potential(const PotentialArray& dens, PotentialArray& pot, T Om, T L0, T L1, T L2, int N0, int N1, int N2) { ConsoleContext ctx("Classic GravitationalPotential estimation"); //transform density to F-space MFCalls::execute_r2c(analysis_plan, dens.data(), AUX0.data()); double normphi=3./2.*Om; #pragma omp parallel for for (int i=0 ; i 0) { AUX0[0][0][0]=0; } MFCalls::execute_c2r(synthesis_plan, AUX0.data(), pot.data()); } }; } #endif