ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
dp3m_heffte.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2025 The ESPResSo project
3 * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
4 * Max-Planck-Institute for Polymer Research, Theory Group
5 *
6 * This file is part of ESPResSo.
7 *
8 * ESPResSo is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * ESPResSo is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#include <config/config.hpp>
23
24#ifdef ESPRESSO_DP3M
25
27
30
31#include <memory>
32#include <utility>
33
34template <typename FloatType, Arch Architecture>
35std::shared_ptr<DipolarP3M>
37 double prefactor) {
38 using DefaultFFTConfig =
40 false, 2>;
41 auto obj = std::make_shared<
43 std::make_unique<DipolarP3MState<FloatType, DefaultFFTConfig>>(
44 std::move(p3m)),
45 tuning_params, prefactor);
48 return obj;
49}
50
51std::shared_ptr<DipolarP3M>
53 TuningParameters const &tuning_params, double prefactor,
56 if (single_precision) {
58 } else {
60 }
61 return fptr(std::move(p3m_params), tuning_params, prefactor);
62}
63
64#endif // ESPRESSO_DP3M
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
std::shared_ptr< DipolarP3M > new_dipolar_p3m_heffte(P3MParameters &&p3m_params, TuningParameters const &tuning_params, double prefactor, bool single_precision, Arch arch)
std::shared_ptr< DipolarP3M > new_dipolar_p3m_impl(P3MParameters &&p3m, TuningParameters const &tuning_params, double prefactor)
Arch
P3M kernel architecture.
Structure to hold P3M parameters and some dependent variables.