ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
script_interface/walberla/EKReactions.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022-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#pragma once
21
22#include "config/config.hpp"
23
24#ifdef WALBERLA
25
27
30
31#include "EKReaction.hpp"
32
35
36#include <memory>
37
39
40class EKReactions : public ObjectList<EKReaction> {
41 std::shared_ptr<::EK::EKWalberla::ek_reactions_type> m_ek_reactions;
42
43 bool has_in_core(std::shared_ptr<EKReaction> const &obj_ptr) const override {
44 return m_ek_reactions->contains(obj_ptr->get_instance());
45 }
46 void add_in_core(std::shared_ptr<EKReaction> const &obj_ptr) override {
47 m_ek_reactions->add(obj_ptr->get_instance());
48 }
49 void remove_in_core(std::shared_ptr<EKReaction> const &obj_ptr) override {
50 m_ek_reactions->remove(obj_ptr->get_instance());
51 }
52
53protected:
54 void do_construct(VariantMap const &params) override {
55 m_ek_reactions = std::make_shared<::EK::EKWalberla::ek_reactions_type>();
56 }
57
58public:
59 auto &get_handle() { return m_ek_reactions; }
60};
61
62} // namespace ScriptInterface::walberla
63
64#endif // WALBERLA
Owning list of ObjectHandles.
void add_in_core(std::shared_ptr< EKReaction > const &obj_ptr) override
bool has_in_core(std::shared_ptr< EKReaction > const &obj_ptr) const override
void remove_in_core(std::shared_ptr< EKReaction > const &obj_ptr) override
This file contains the defaults for ESPResSo.
std::unordered_map< std::string, Variant > VariantMap
Definition Variant.hpp:69
static SteepestDescentParameters params
Currently active steepest descent instance.