ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
observables/initialize.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015-2022 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 "initialize.hpp"
25#include "PidObservable.hpp"
27#include "ProfileObservable.hpp"
28#include "RDF.hpp"
29#include "config/config.hpp"
30
56
57namespace ScriptInterface {
58namespace Observables {
59
60/** @name Observables registration
61 * Convenience macro functions to automatize the registration of observable
62 * interfaces via a factory.
63 */
64/**@{*/
65
66/** Register a @ref ScriptInterface::Observables::ParamlessObservableInterface
67 * "ParamlessObservableInterface"
68 */
69#define REGISTER(name) om->register_new<name>("Observables::" #name "");
70
71/** Register a @ref ScriptInterface::Observables::PidObservable
72 * "PidObservable"
73 */
74#define REGISTER_PID_OBS(name) \
75 om->register_new<PidObservable<::Observables::name>>("Observables::" #name \
76 "");
77
78/** Register a @ref ScriptInterface::Observables::PidProfileObservable
79 * "PidProfileObservable"
80 */
81#define REGISTER_PID_PROFILE_OBS(name) \
82 om->register_new<PidProfileObservable<::Observables::name>>( \
83 "Observables::" #name "");
84
85/** Register a @ref
86 * ScriptInterface::Observables::CylindricalPidProfileObservable
87 * "CylindricalPidProfileObservable"
88 */
89#define REGISTER_CYLPID_PROFILE_OBS(name) \
90 om->register_new<CylindricalPidProfileObservable<::Observables::name>>( \
91 "Observables::" #name "");
92
93/** Register a @ref ScriptInterface::Observables::CylindricalLBProfileObservable
94 * "CylindricalLBProfileObservable"
95 */
96#define REGISTER_CYLLB_OBS(name) \
97 om->register_new<CylindricalLBProfileObservable<::Observables::name>>( \
98 "Observables::" #name "");
99
100/** Register an @ref ScriptInterface::Observables::LBProfileObservable
101 * "LBProfileObservable"
102 */
103#define REGISTER_LB_OBS(name) \
104 om->register_new<LBProfileObservable<::Observables::name>>( \
105 "Observables::" #name "");
106/**@}*/
107
109 // Manual registration:
110 // om->register_new<ScriptInterface::Observables::ParticleVelocities>::
111 // register_new("Observables::ParticleVelocities");
112
116 REGISTER_PID_OBS(ParticlePositions);
117 REGISTER_PID_OBS(ParticleDirectors);
118 REGISTER_PID_OBS(ParticleDipoleFields);
119 REGISTER_PID_OBS(ParticleVelocities);
120 REGISTER_PID_OBS(ParticleForces);
121 REGISTER_PID_OBS(ParticleBodyVelocities);
122#ifdef ROTATION
123 REGISTER_PID_OBS(ParticleAngularVelocities);
124 REGISTER_PID_OBS(ParticleBodyAngularVelocities);
125#endif
126#ifdef ELECTROSTATICS
127 REGISTER_PID_OBS(DipoleMoment);
128#endif
129#ifdef DIPOLES
130 REGISTER_PID_OBS(MagneticDipoleMoment);
131#endif
132 REGISTER_PID_OBS(ComPosition);
133 REGISTER_PID_OBS(ComVelocity);
134 REGISTER_PID_OBS(ParticleDistances);
135 REGISTER_PID_OBS(TotalForce);
136 REGISTER_PID_OBS(BondAngles);
137 REGISTER_PID_OBS(BondDihedrals);
138 REGISTER_PID_OBS(CosPersistenceAngles);
139 REGISTER_PID_PROFILE_OBS(DensityProfile);
140 REGISTER_PID_PROFILE_OBS(ForceDensityProfile);
141 REGISTER_PID_PROFILE_OBS(FluxDensityProfile);
142 REGISTER_CYLPID_PROFILE_OBS(CylindricalDensityProfile);
143 REGISTER_CYLPID_PROFILE_OBS(CylindricalVelocityProfile);
144 REGISTER_CYLPID_PROFILE_OBS(CylindricalFluxDensityProfile);
145#ifdef DPD
147#endif
150 CylindricalLBFluxDensityProfileAtParticlePositions);
151 REGISTER_CYLPID_PROFILE_OBS(CylindricalLBVelocityProfileAtParticlePositions);
152 REGISTER_CYLLB_OBS(CylindricalLBVelocityProfile);
153 REGISTER_LB_OBS(LBVelocityProfile);
154 REGISTER(RDF);
155
156#undef REGISTER
157#undef REGISTER_PID_OBS
158}
159} /* namespace Observables */
160} /* namespace ScriptInterface */
Cython interface for parameter-free observables.
Factory template.
Definition Factory.hpp:78
This file contains the defaults for ESPResSo.
void initialize(Utils::Factory< ObjectHandle > *om)
T get_value(Variant const &v)
Extract value of specific type T from a Variant.
#define REGISTER_CYLPID_PROFILE_OBS(name)
Register a CylindricalPidProfileObservable.
#define REGISTER_CYLLB_OBS(name)
Register a CylindricalLBProfileObservable.
#define REGISTER_PID_PROFILE_OBS(name)
Register a PidProfileObservable.
#define REGISTER_PID_OBS(name)
Register a PidObservable.
#define REGISTER(name)
Register a ParamlessObservableInterface.
#define REGISTER_LB_OBS(name)
Register an LBProfileObservable.