IPstream.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::IPstream
26 
27 Description
28  Input inter-processor communications stream.
29 
30 SourceFiles
31  IPstream.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #include "Pstream.H"
36 
37 #ifndef IPstream_H
38 #define IPstream_H
39 
40 #include "UIPstream.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class IPstream Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class IPstream
52 :
53  public Pstream,
54  public UIPstream
55 {
56 
57  //- Receive index
58  label externalBufPosition_;
59 
60 public:
61 
62  // Constructors
63 
64  //- Construct given process index to read from and optional buffer size,
65  // read format and IO version
66  IPstream
67  (
68  const commsTypes commsType,
69  const int fromProcNo,
70  const label bufSize = 0,
71  const int tag = UPstream::msgType(),
72  const label comm = UPstream::worldComm,
75  );
76 
77 };
78 
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 } // End namespace Foam
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 #endif
87 
88 // ************************************************************************* //
Input inter-processor communications stream operating on external buffer.
Definition: UIPstream.H:53
versionNumber version() const
Return the stream version.
Definition: IOstream.H:399
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
Inter-processor communications stream.
Definition: Pstream.H:53
Namespace for OpenFOAM.
streamFormat
Enumeration for the format of data in the stream.
Definition: IOstream.H:86
commsTypes
Types of communications.
Definition: UPstream.H:64
streamFormat format() const
Return current stream format.
Definition: IOstream.H:377
static int & msgType()
Message tag of standard messages.
Definition: UPstream.H:451
commsTypes commsType() const
Get the communications type of the stream.
Definition: UPstream.H:458
Input inter-processor communications stream.
Definition: IPstream.H:50
Version number type.
Definition: IOstream.H:96
static label worldComm
Default communicator (all processors)
Definition: UPstream.H:261
IPstream(const commsTypes commsType, const int fromProcNo, 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 read from and optional buffer size,.
Definition: IPstream.C:31
static const versionNumber currentVersion
Current version number.
Definition: IOstream.H:206