ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
DPDStress.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-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#pragma once
20
21#include <config/config.hpp>
22
23#ifdef ESPRESSO_DPD
24
25#include "Observable.hpp"
26#include "dpd.hpp"
27#include "system/System.hpp"
28
29#include <cstddef>
30#include <vector>
31
32namespace Observables {
33
34class DPDStress : public Observable {
35public:
36 std::vector<std::size_t> shape() const override { return {3, 3}; }
37 std::vector<double>
38 operator()(boost::mpi::communicator const &comm) const override {
39 return dpd_stress(System::get_system(), comm);
40 }
41};
42
43} // Namespace Observables
44
45#endif // ESPRESSO_DPD
std::vector< double > operator()(boost::mpi::communicator const &comm) const override
Definition DPDStress.hpp:38
std::vector< std::size_t > shape() const override
Definition DPDStress.hpp:36
Base class for observables.
Utils::Vector9d dpd_stress(System::System &system, boost::mpi::communicator const &comm)
Viscous stress tensor of the DPD interaction.
Definition dpd.cpp:159
Routines to use DPD as thermostat or pair force .
System & get_system()