ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
magnetostatics/actor.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 DIPOLES
25
26#include "system/Leaf.hpp"
27
28#include <stdexcept>
29
30namespace Dipoles {
31
32template <typename Class> class Actor : public System::Leaf<Actor<Class>> {
33public:
34 /**
35 * @brief Magnetostatics prefactor.
36 */
37 double prefactor = 0.;
38
39 void set_prefactor(double new_prefactor) {
40 if (new_prefactor <= 0.) {
41 throw std::domain_error("Parameter 'prefactor' must be > 0");
42 }
43 prefactor = new_prefactor;
44 }
45};
46
47} // namespace Dipoles
48
49#endif // DIPOLES
void set_prefactor(double new_prefactor)
double prefactor
Magnetostatics prefactor.
Abstract class that represents a component of the system.
This file contains the defaults for ESPResSo.