33 constexpr static unsigned Dim = FieldLHS::dim;
34 using Trhs =
typename FieldRHS::value_type;
35 using mesh_type =
typename FieldLHS::Mesh_t;
36 using Tg =
typename FieldLHS::value_type::value_type;
40 using Base = Poisson<FieldLHS, FieldRHS>;
43 using typename Base::lhs_type,
typename Base::rhs_type;
46 typedef FFT<RCTransform, FieldRHS> FFT_t;
100 typedef typename FieldLHS::Centering_t
Centering;
104 typedef typename FFT_t::ComplexField CxField_t;
106 typedef typename mesh_type::matrix_type Matrix_t;
113 using memory_space =
typename FieldLHS::memory_space;
114 using buffer_type = mpi::Communicator::buffer_type<memory_space>;
117 using vector_type =
typename mesh_type::vector_type;
118 using scalar_type =
typename mesh_type::value_type;
128 void setRhs(rhs_type& rhs)
override;
136 void solve()
override;
140 bool hessian = this->params_m.template get<bool>(
"hessian");
143 "FFTOpenPoissonSolver::getHessian()",
144 "Cannot call getHessian() if 'hessian' flag in ParameterList is false");
194 void initializeFields();
197 void communicateVico(
Vector<int, Dim> size,
typename CxField_gt::view_type view_g,
203 void communicateVico(
Vector<int, Dim> size,
typename Field_t::view_type view_g,
215 Field_t& grn_mr = storage_field;
229 IField_t grnIField_m[Dim];
235 std::unique_ptr<FFT_t> fft_m;
242 std::unique_ptr<mesh_type> mesh2_m;
243 std::unique_ptr<FieldLayout_t> layout2_m;
246 std::unique_ptr<mesh_type> meshComplex_m;
247 std::unique_ptr<FieldLayout_t> layoutComplex_m;
264 std::unique_ptr<FFT<CCTransform, CxField_gt>> fft4n_m;
266 std::unique_ptr<mesh_type> mesh4_m;
267 std::unique_ptr<FieldLayout_t> layout4_m;
274 std::unique_ptr<FFT<Cos1Transform, Field_t>> fft2n1_m;
276 std::unique_ptr<mesh_type> mesh2n1_m;
277 std::unique_ptr<FieldLayout_t> layout2n1_m;
301 KOKKOS_INLINE_FUNCTION
static scalar_type integratedGreenAntiderivative(
302 const scalar_type& x,
const scalar_type& y,
const scalar_type& z);
304 KOKKOS_INLINE_FUNCTION
static scalar_type integratedGreenLogTerm(
const scalar_type& a,
305 const scalar_type& b,
306 const scalar_type& c,
307 const scalar_type& r);
309 KOKKOS_INLINE_FUNCTION
static scalar_type integratedGreenAtanTerm(
310 const scalar_type& numerator,
const scalar_type& denominator);
319 KOKKOS_INLINE_FUNCTION
static scalar_type integratedGreenAverage(
const scalar_type& x,
320 const scalar_type& y,
321 const scalar_type& z,
322 const vector_type& h);
326 using heffteBackend =
typename FFT_t::heffteBackend;
327 heffte::plan_options opts = heffte::default_options<heffteBackend>();
328 this->params_m.
add(
"use_pencils", opts.use_pencils);
329 this->params_m.
add(
"use_reorder", opts.use_reorder);
330 this->params_m.
add(
"use_gpu_aware", opts.use_gpu_aware);
331 this->params_m.
add(
"r2c_direction", 0);
333 switch (opts.algorithm) {
334 case heffte::reshape_algorithm::alltoall:
335 this->params_m.
add(
"comm", a2a);
337 case heffte::reshape_algorithm::alltoallv:
338 this->params_m.
add(
"comm", a2av);
340 case heffte::reshape_algorithm::p2p:
341 this->params_m.
add(
"comm", p2p);
343 case heffte::reshape_algorithm::p2p_plined:
344 this->params_m.
add(
"comm", p2p_pl);
347 throw IpplException(
"FFTOpenPoissonSolver::setDefaultParameters",
348 "Unrecognized heffte communication type");
351 this->params_m.
add(
"algorithm", HOCKNEY);
352 this->params_m.
add(
"greens_function", STANDARD);
353 this->params_m.
add(
"hessian",
false);
void shiftedGreensFunction(const Vector< double, Dim > &shift)
Replace the cached kernel by a shifted Hockney Green function.
Definition FFTOpenPoissonSolver.hpp:2212