ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
EKFFT_GPU.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025 The ESPResSo project
3 *
4 * This file is part of ESPResSo.
5 *
6 * ESPResSo is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ESPResSo is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <config/config.hpp>
23
24#ifdef ESPRESSO_WALBERLA_FFT
25#ifdef ESPRESSO_CUDA
26
27#include "EKPoissonSolver.hpp"
28#include "LatticeWalberla.hpp"
29
31
34
38
40
42
43class EKFFTGPU : public EKFFT {
44
45public:
46 void make_instance(VariantMap const &args) override {
47 // unit conversions
48 auto const agrid = get_value<double>(m_lattice->get_parameter("agrid"));
49 m_conv_permittivity = Utils::int_pow<2>(agrid);
50 auto const permittivity =
52
55 m_instance->setup_fft(::communication_environment->is_mpi_gpu_aware());
56 }
57};
58
59} // namespace ScriptInterface::walberla
60
61#endif // ESPRESSO_CUDA
62#endif // ESPRESSO_WALBERLA_FFT
void make_instance(VariantMap const &args) override
Definition EKFFT_GPU.hpp:46
std::shared_ptr< LatticeWalberla > m_lattice
Definition EKFFT.hpp:48
std::unique_ptr< CommunicationEnvironment > communication_environment
This file contains the asynchronous MPI communication.
T get_value(Variant const &v)
Extract value of specific type T from a Variant.
std::unordered_map< std::string, Variant > VariantMap
Definition Variant.hpp:133
std::shared_ptr< walberla::PoissonSolver > new_ek_poisson_fft_cuda(std::shared_ptr< LatticeWalberla > const &lattice, double permittivity, bool single_precision)