OPstream.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2013 OpenFOAM Foundation
9  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::OPstream
29 
30 Description
31  Output inter-processor communications stream.
32 
33 SourceFiles
34  OPstream.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #include "Pstream.H"
39 
40 #ifndef OPstream_H
41 #define OPstream_H
42 
43 #include "UOPstream.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class OPstream Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class OPstream
55 :
56  public Pstream,
57  public UOPstream
58 {
59 public:
60 
61  // Constructors
62 
63  //- Construct for given process index to send to
64  //- and optional buffer size, write format
65  OPstream
66  (
67  const commsTypes commsType,
68  const int toProcNo,
69  const label bufSize = 0,
70  const int tag = UPstream::msgType(),
71  const label comm = UPstream::worldComm,
73  );
74 };
75 
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 } // End namespace Foam
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 #endif
84 
85 // ************************************************************************* //
Foam::UPstream::commsType
commsTypes commsType() const noexcept
Get the communications type of the stream.
Definition: UPstream.H:547
Foam::UOPstream
Output inter-processor communications stream operating on external buffer.
Definition: UOPstream.H:57
Foam::OPstream
Output inter-processor communications stream.
Definition: OPstream.H:53
Foam::IOstreamOption::streamFormat
streamFormat
Data format (ascii | binary)
Definition: IOstreamOption.H:70
Pstream.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:69
Foam::IOstreamOption::BINARY
"binary"
Definition: IOstreamOption.H:73
Foam::UPstream::msgType
static int & msgType() noexcept
Message tag of standard messages.
Definition: UPstream.H:540
UOPstream.H
Foam::Pstream
Inter-processor communications stream.
Definition: Pstream.H:56
Foam::UPstream::worldComm
static label worldComm
Default communicator (all processors)
Definition: UPstream.H:293
Foam::OPstream::OPstream
OPstream(const commsTypes commsType, const int toProcNo, const label bufSize=0, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Definition: OPstream.C:34