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"
24#include "PairwiseDistances.hpp"
26#include "PidObservable.hpp"
28#include "ProfileObservable.hpp"
29#include "RDF.hpp"
30#include "config/config.hpp"
31
58
59namespace ScriptInterface {
60namespace Observables {
61
62/** @name Observables registration
63 * Convenience macro functions to automatize the registration of observable
64 * interfaces via a factory.
65 */
66/**@{*/
67
68/** Register a @ref ScriptInterface::Observables::ParamlessObservableInterface
69 * "ParamlessObservableInterface"
70 */
71#define REGISTER(name) om->register_new<name>("Observables::" #name "");
72
73/** Register a @ref ScriptInterface::Observables::PidObservable
74 * "PidObservable"
75 */
76#define REGISTER_PID_OBS(name) \
77 om->register_new<PidObservable<::Observables::name>>("Observables::" #name \
78 "");
79
80/** Register a @ref ScriptInterface::Observables::PidProfileObservable
81 * "PidProfileObservable"
82 */
83#define REGISTER_PID_PROFILE_OBS(name) \
84 om->register_new<PidProfileObservable<::Observables::name>>( \
85 "Observables::" #name "");
86
87/** Register a @ref
88 * ScriptInterface::Observables::CylindricalPidProfileObservable
89 * "CylindricalPidProfileObservable"
90 */
91#define REGISTER_CYLPID_PROFILE_OBS(name) \
92 om->register_new<CylindricalPidProfileObservable<::Observables::name>>( \
93 "Observables::" #name "");
94
95/** Register a @ref ScriptInterface::Observables::CylindricalLBProfileObservable
96 * "CylindricalLBProfileObservable"
97 */
98#define REGISTER_CYLLB_OBS(name) \
99 om->register_new<CylindricalLBProfileObservable<::Observables::name>>( \
100 "Observables::" #name "");
101
102/** Register an @ref ScriptInterface::Observables::LBProfileObservable
103 * "LBProfileObservable"
104 */
105#define REGISTER_LB_OBS(name) \
106 om->register_new<LBProfileObservable<::Observables::name>>( \
107 "Observables::" #name "");
108/**@}*/
109
110#define REGISTER_PAIRWISE_DISTANCES(name) \
111 om->register_new<PairwiseDistances<::Observables::name>>( \
112 "Observables::" #name "");
113
115 // Manual registration:
116 // om->register_new<ScriptInterface::Observables::ParticleVelocities>::
117 // register_new("Observables::ParticleVelocities");
118
122 REGISTER_PID_OBS(ParticlePositions);
123 REGISTER_PID_OBS(ParticleDirectors);
124 REGISTER_PID_OBS(ParticleDipoleFields);
125 REGISTER_PID_OBS(ParticleVelocities);
126 REGISTER_PID_OBS(ParticleForces);
127 REGISTER_PID_OBS(ParticleBodyVelocities);
128#ifdef ROTATION
129 REGISTER_PID_OBS(ParticleAngularVelocities);
130 REGISTER_PID_OBS(ParticleBodyAngularVelocities);
131#endif
132#ifdef ELECTROSTATICS
133 REGISTER_PID_OBS(DipoleMoment);
134#endif
135#ifdef DIPOLES
136 REGISTER_PID_OBS(MagneticDipoleMoment);
137#endif
138 REGISTER_PID_OBS(ComPosition);
139 REGISTER_PID_OBS(ComVelocity);
140 REGISTER_PID_OBS(ParticleDistances);
141 REGISTER_PID_OBS(TotalForce);
142 REGISTER_PID_OBS(BondAngles);
143 REGISTER_PID_OBS(BondDihedrals);
144 REGISTER_PID_OBS(CosPersistenceAngles);
145 REGISTER_PID_PROFILE_OBS(DensityProfile);
146 REGISTER_PID_PROFILE_OBS(ForceDensityProfile);
147 REGISTER_PID_PROFILE_OBS(FluxDensityProfile);
148 REGISTER_CYLPID_PROFILE_OBS(CylindricalDensityProfile);
149 REGISTER_CYLPID_PROFILE_OBS(CylindricalVelocityProfile);
150 REGISTER_CYLPID_PROFILE_OBS(CylindricalFluxDensityProfile);
152
153#ifdef DPD
155#endif
158 CylindricalLBFluxDensityProfileAtParticlePositions);
159 REGISTER_CYLPID_PROFILE_OBS(CylindricalLBVelocityProfileAtParticlePositions);
160 REGISTER_CYLLB_OBS(CylindricalLBVelocityProfile);
161 REGISTER_LB_OBS(LBVelocityProfile);
162 REGISTER(RDF);
163
164#undef REGISTER
165#undef REGISTER_PID_OBS
166}
167} /* namespace Observables */
168} /* 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_PAIRWISE_DISTANCES(name)
#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.