ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ParticleDipoleFields.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#include "PidObservable.hpp"
25#include "system/System.hpp"
26
27#include <vector>
28
29namespace Observables {
30
31/** Extract particle dipole fields.
32 * For \f$n\f$ particles, return \f$3 n\f$ dipole fields ordered as
33 * \f$(h_d1_x, h_d1_y, h_d1_z, \dots, h_dn_x, h_dn_y, h_dn_z)\f$.
34 */
36 : public ParticleObservable<ParticleObservables::DipoleFields> {
37public:
39 ParticleObservables::DipoleFields>::ParticleObservable;
40 std::vector<double>
41 evaluate(boost::mpi::communicator const &comm,
42 ParticleReferenceRange const &local_particles,
43 const ParticleObservables::traits<Particle> &traits) const override {
44#ifdef DIPOLE_FIELD_TRACKING
46#endif
48 comm, local_particles, traits);
49 }
50};
51
52} // namespace Observables
Extract particle dipole fields.
std::vector< double > evaluate(boost::mpi::communicator const &comm, ParticleReferenceRange const &local_particles, const ParticleObservables::traits< Particle > &traits) const override
This class implements an interface to the particle_observables library that implements necessary algo...
std::vector< double > evaluate(boost::mpi::communicator const &comm, ParticleReferenceRange const &local_particles, ParticleObservables::traits< Particle > const &) const override
void calculate_long_range_fields()
Calculate dipole fields.
Definition energy.cpp:139
This file contains the defaults for ESPResSo.
std::vector< std::reference_wrapper< Particle const > > ParticleReferenceRange
System & get_system()