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 | Copyright (C) 2011-2013 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::OPstream
26 
27 Description
28  Output inter-processor communications stream.
29 
30 SourceFiles
31  OPstream.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #include "Pstream.H"
36 
37 #ifndef OPstream_H
38 #define OPstream_H
39 
40 #include "UOPstream.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class OPstream Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class OPstream
52 :
53  public Pstream,
54  public UOPstream
55 {
56 
57 public:
58 
59  // Constructors
60 
61  //- Construct given process index to send to and optional buffer size,
62  // write format and IO version
63  OPstream
64  (
65  const commsTypes commsType,
66  const int toProcNo,
67  const label bufSize = 0,
68  const int tag = UPstream::msgType(),
69  const label comm = UPstream::worldComm,
72  );
73 
74 };
75 
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 } // End namespace Foam
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 #endif
84 
85 // ************************************************************************* //
streamFormat format() const
Return current stream format.
Definition: IOstream.H:377
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
commsTypes
Types of communications.
Definition: UPstream.H:64
static int & msgType()
Message tag of standard messages.
Definition: UPstream.H:464
static label worldComm
Default communicator (all processors)
Definition: UPstream.H:274
OPstream(const commsTypes commsType, const int toProcNo, const label bufSize=0, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, streamFormat format=BINARY, versionNumber version=currentVersion)
Construct given process index to send to and optional buffer size,.
Definition: OPstream.C:31
Inter-processor communications stream.
Definition: Pstream.H:53
streamFormat
Enumeration for the format of data in the stream.
Definition: IOstream.H:86
versionNumber version() const
Return the stream version.
Definition: IOstream.H:399
Output inter-processor communications stream operating on external buffer.
Definition: UOPstream.H:54
Output inter-processor communications stream.
Definition: OPstream.H:50
commsTypes commsType() const
Get the communications type of the stream.
Definition: UPstream.H:471
static const versionNumber currentVersion
Current version number.
Definition: IOstream.H:206
Version number type.
Definition: IOstream.H:96
Namespace for OpenFOAM.