ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
EKWalberla.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 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
26#include <utils/Vector.hpp>
27
28#include <memory>
29#include <stdexcept>
30#include <utility>
31
32// forward declarations
34template <class Base> class EKContainer;
35template <class Base> class EKReactions;
36namespace walberla {
37class EKReactionBase;
38}
39namespace System {
40class System;
41}
42
43namespace EK {
44
45struct EKWalberla {
48 std::shared_ptr<ek_container_type> ek_container;
49 std::shared_ptr<ek_reactions_type> ek_reactions;
50
51 EKWalberla(std::shared_ptr<ek_container_type> ek_container_instance,
52 std::shared_ptr<ek_reactions_type> ek_reactions_instance)
53 : ek_container{std::move(ek_container_instance)},
54 ek_reactions{std::move(ek_reactions_instance)} {}
55
56 double get_tau() const;
57 void veto_time_step(double time_step) const;
58 void veto_kT(double kT) const;
59 void sanity_checks(System::System const &system) const;
60 bool is_ready_for_propagation() const noexcept;
61 void propagate();
62 void perform_reactions();
63
65 void veto_boxl_change() const {
66 throw std::runtime_error("MD cell geometry change not supported by EK");
67 }
68 void on_boxl_change() const { veto_boxl_change(); }
69 void on_node_grid_change() const {
70 throw std::runtime_error("MPI topology change not supported by EK");
71 }
72 void on_timestep_change() const {}
73 void on_temperature_change() const {}
74};
75
76} // namespace EK
77
78#endif // WALBERLA
Vector implementation and trait types for boost qvm interoperability.
Interface of a lattice-based electrokinetic model.
Main system class.
This file contains the defaults for ESPResSo.
void veto_kT(double kT) const
double get_tau() const
void veto_time_step(double time_step) const
void on_boxl_change() const
void perform_reactions()
std::shared_ptr< ek_reactions_type > ek_reactions
void on_cell_structure_change() const
void veto_boxl_change() const
void sanity_checks(System::System const &system) const
std::shared_ptr< ek_container_type > ek_container
EKWalberla(std::shared_ptr< ek_container_type > ek_container_instance, std::shared_ptr< ek_reactions_type > ek_reactions_instance)
void on_node_grid_change() const
void on_timestep_change() const
void on_temperature_change() const
bool is_ready_for_propagation() const noexcept