24 constexpr static unsigned Dim = FieldLHS::dim;
25 using Trhs =
typename FieldRHS::value_type;
26 using mesh_type =
typename FieldRHS::Mesh_t;
29 using Field_t = FieldRHS;
31 using Complex_t =
typename FFT_t::Complex_t;
32 using CxField_t =
typename FFT_t::ComplexField;
37 using typename Base::lhs_type,
typename Base::rhs_type;
38 using scalar_type =
typename FieldLHS::Mesh_t::value_type;
39 using vector_type =
typename FieldLHS::Mesh_t::vector_type;
43 using T =
typename FieldLHS::value_type::value_type;
44 static_assert(std::is_floating_point<T>::value,
"Not a floating point type");
51 using T =
typename FieldLHS::value_type::value_type;
52 static_assert(std::is_floating_point<T>::value,
"Not a floating point type");
59 void setRhs(rhs_type& rhs)
override;
61 void solve()
override;
66 std::shared_ptr<FFT_t> fft_mp;
67 CxField_t fieldComplex_m;
68 CxField_t tempFieldComplex_m;
70 std::shared_ptr<Layout_t> layoutComplex_mp;
74 using heffteBackend =
typename FFT_t::heffteBackend;
75 heffte::plan_options opts = heffte::default_options<heffteBackend>();
76 this->params_m.
add(
"use_pencils", opts.use_pencils);
77 this->params_m.
add(
"use_reorder", opts.use_reorder);
78 this->params_m.
add(
"use_gpu_aware", opts.use_gpu_aware);
79 this->params_m.
add(
"r2c_direction", 0);
81 switch (opts.algorithm) {
82 case heffte::reshape_algorithm::alltoall:
83 this->params_m.
add(
"comm", a2a);
85 case heffte::reshape_algorithm::alltoallv:
86 this->params_m.
add(
"comm", a2av);
88 case heffte::reshape_algorithm::p2p:
89 this->params_m.
add(
"comm", p2p);
91 case heffte::reshape_algorithm::p2p_plined:
92 this->params_m.
add(
"comm", p2p_pl);
95 throw IpplException(
"FFTPeriodicPoissonSolver::setDefaultParameters",
96 "Unrecognized heffte communication type");