ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
walberla/initialize.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2023 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#include <config/config.hpp>
21
22#ifdef ESPRESSO_WALBERLA
23
24#include "LatticeWalberla.hpp"
25
26#include "LBFluid.hpp"
27#include "LBFluidNode.hpp"
28#include "LBFluidSlice.hpp"
29
30#include "EKContainer.hpp"
31#include "EKFFT.hpp"
32#include "EKFFT_GPU.hpp"
33#include "EKNone.hpp"
36
37#include "EKSpecies.hpp"
38#include "EKSpeciesNode.hpp"
39#include "EKSpeciesSlice.hpp"
40
41#include "EKReactant.hpp"
42#include "EKReaction.hpp"
43#include "EKReactions.hpp"
44
46
47#include <utils/Factory.hpp>
48
49#include <unordered_map>
50
51#ifdef ESPRESSO_WALBERLA_STATIC_ASSERT
52#error "waLBerla headers should not be visible to the ESPResSo script interface"
53#endif
54
56
58 om->register_new<LatticeWalberla>("walberla::LatticeWalberla");
59
60 om->register_new<LBFluidCPU>("walberla::LBFluidCPU");
61#ifdef ESPRESSO_CUDA
62 om->register_new<LBFluidGPU>("walberla::LBFluidGPU");
63#endif // ESPRESSO_CUDA
64 om->register_new<LBFluidNode>("walberla::LBFluidNode");
65 om->register_new<LBFluidSlice>("walberla::LBFluidSlice");
66 om->register_new<LBVTKHandle>("walberla::LBVTKHandle");
67
68 om->register_new<EKContainer>("walberla::EKContainer");
69 om->register_new<EKSpeciesCPU>("walberla::EKSpeciesCPU");
70#ifdef ESPRESSO_CUDA
71 om->register_new<EKSpeciesGPU>("walberla::EKSpeciesGPU");
72#endif // ESPRESSO_CUDA
73 om->register_new<EKSpeciesNode>("walberla::EKSpeciesNode");
74 om->register_new<EKSpeciesSlice>("walberla::EKSpeciesSlice");
75#ifdef ESPRESSO_WALBERLA_FFT
76 om->register_new<EKFFT>("walberla::EKFFT");
77#ifdef ESPRESSO_CUDA
78 om->register_new<EKFFTGPU>("walberla::EKFFTGPU");
79#endif // ESPRESSO_CUDA
80#endif // WALBERLA_FFT
81 om->register_new<EKNone>("walberla::EKNone");
82 om->register_new<EKPoissonSolverNode>("walberla::EKPoissonSolverNode");
83 om->register_new<EKPoissonSolverSlice>("walberla::EKPoissonSolverSlice");
84 om->register_new<EKVTKHandle>("walberla::EKVTKHandle");
85 om->register_new<EKPoissonVTKHandle>("walberla::EKPoissonVTKHandle");
86
87 om->register_new<EKReactant>("walberla::EKReactant");
88 om->register_new<EKBulkReaction>("walberla::EKBulkReaction");
89 om->register_new<EKIndexedReaction>("walberla::EKIndexedReaction");
90 om->register_new<EKReactions>("walberla::EKReactions");
91}
92
93#ifdef ESPRESSO_WALBERLA_FFT
94std::unordered_map<std::string, int> const EKPoissonVTKHandle::obs_map = {
95 {"potential", static_cast<int>(EKPoissonOutputVTK::potential)},
96};
97#else
98std::unordered_map<std::string, int> const EKPoissonVTKHandle::obs_map = {};
99#endif
100
101} // namespace ScriptInterface::walberla
102
103#endif // ESPRESSO_WALBERLA
Factory template.
Definition Factory.hpp:78
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
void initialize(Utils::Factory< ObjectHandle > *om)