ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
core/io/mpiio/mpiio.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
4 * Max-Planck-Institute for Polymer Research, Theory Group
5 *
6 * This file is part of ESPResSo.
7 *
8 * ESPResSo is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * ESPResSo is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24/** @file
25 * Implements binary output using MPI-IO.
26 */
27
28#include "ParticleRange.hpp"
31
32#include <string>
33
34namespace Mpiio {
35
36/**
37 * @brief Constants which indicate what to output.
38 * To indicate the output of multiple fields, OR the
39 * corresponding values.
40 */
48
50 std::vector<double> pos;
51 std::vector<double> vel;
52 std::vector<int> id;
53 std::vector<int> type;
54};
55
56/**
57 * @brief Parallel binary output using MPI-IO.
58 * To be called by all MPI processes. Aborts ESPResSo if an error occurs.
59 * On 1 MPI rank, the error is converted to a runtime error and can be
60 * recovered by removing any file that may have already been written.
61 *
62 * @param prefix Filepath prefix.
63 * @param fields Specifier for which fields to dump.
64 * @param bonded_ias Bonds to serialize.
65 * @param particles Range of particles to serialize.
66 * @param buffers Write buffers.
67 */
68void mpi_mpiio_common_write(std::string const &prefix, unsigned fields,
69 BondedInteractionsMap const &bonded_ias,
70 ParticleRange const &particles,
71 write_buffers &buffers);
72
73/**
74 * @brief Parallel binary input using MPI-IO.
75 * To be called by all MPI processes. Aborts ESPResSo if an error occurs.
76 * On 1 MPI rank, the error is converted to a runtime error and can be
77 * recovered.
78 *
79 * @param prefix Filepath prefix.
80 * @param fields Specifier for which fields to read.
81 * @param cell_structure Bonds to serialize.
82 */
83void mpi_mpiio_common_read(std::string const &prefix, unsigned fields,
84 CellStructure &cell_structure);
85
86} // namespace Mpiio
Data structures for bonded interactions.
container for bonded interactions.
A range of particles.
void mpi_mpiio_common_write(std::string const &prefix, unsigned fields, BondedInteractionsMap const &bonded_ias, ParticleRange const &particles, write_buffers &buffers)
Parallel binary output using MPI-IO.
Definition mpiio.cpp:214
MPIIOOutputFields
Constants which indicate what to output.
void mpi_mpiio_common_read(const std::string &prefix, unsigned fields, CellStructure &cell_structure)
Parallel binary input using MPI-IO.
Definition mpiio.cpp:406
Describes a cell structure / cell system.
std::vector< double > pos
std::vector< double > vel