ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
EKPoissonSolverSlice.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
25
26#include "EKPoissonSolver.hpp"
27#include "EKSpeciesSlice.hpp"
28
29#include "LatticeSlice.hpp"
30
33
35
36#include <utils/Vector.hpp>
37
38#include <cassert>
39#include <memory>
40#include <string>
41#include <unordered_map>
42#include <vector>
43
45
46class EKPoissonSolverSlice : public LatticeSlice<EKFieldSerializer> {
48 std::shared_ptr<LatticeModel> m_ek_poisson_solver;
49 std::shared_ptr<EKPoissonSolver> m_ek_solver_sip;
50 std::unordered_map<std::string, std::vector<int>> m_shape_val;
51
52public:
53 void do_construct(VariantMap const &params) override {
54 m_ek_solver_sip =
56 m_ek_poisson_solver = m_ek_solver_sip->get_instance();
57 assert(m_ek_poisson_solver);
60 get_value<Utils::Vector3i>(params, "slice_lower_corner");
62 get_value<Utils::Vector3i>(params, "slice_upper_corner");
63 m_shape_val["potential"] = std::vector<int>{1};
64 }
65
66 Variant do_call_method(std::string const &name,
67 VariantMap const &params) override;
68
69 ::LatticeWalberla const &get_lattice() const override {
70 return m_ek_poisson_solver->get_lattice();
71 }
72};
73
74} // namespace ScriptInterface::walberla
75
76#endif // ESPRESSO_WALBERLA
Vector implementation and trait types for boost qvm interoperability.
Class that runs and controls the BlockForest in waLBerla.
std::string_view name() const
::LatticeWalberla const & get_lattice() const override
void do_construct(VariantMap const &params) override
Variant do_call_method(std::string const &name, VariantMap const &params) override
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
std::unordered_map< std::string, Variant > VariantMap
Definition Variant.hpp:133
static SteepestDescentParameters params
Currently active steepest descent instance.
Recursive variant implementation.
Definition Variant.hpp:84