UPstream.C
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-2015 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 \*---------------------------------------------------------------------------*/
25 
26 #include "UPstream.H"
27 #include "PstreamReduceOps.H"
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
32 {}
33 
34 
35 bool Foam::UPstream::init(int& argc, char**& argv)
36 {
38  << "Trying to use the dummy Pstream library." << nl
39  << "This dummy library cannot be used in parallel mode"
41 
42  return false;
43 }
44 
45 
46 void Foam::UPstream::exit(int errnum)
47 {
49 }
50 
51 
53 {
55 }
56 
57 
58 void Foam::reduce(scalar&, const sumOp<scalar>&, const int, const label)
59 {}
60 
61 
62 void Foam::reduce(scalar&, const minOp<scalar>&, const int, const label)
63 {}
64 
65 
66 void Foam::reduce(vector2D&, const sumOp<vector2D>&, const int, const label)
67 {}
68 
69 
70 void Foam::sumReduce
71 (
72  scalar&,
73  label&,
74  const int,
75  const label
76 )
77 {}
78 
79 
80 void Foam::reduce(scalar&, const sumOp<scalar>&, const int, const label, label&)
81 {}
82 
83 
85 (
86  const label,
87  const label
88 )
89 {}
90 
91 
93 {}
94 
95 
97 {
98  return 0;
99 }
100 
101 
103 {}
104 
105 
107 {}
108 
109 
111 {}
112 
113 
115 {
117  return false;
118 }
119 
120 
121 // ************************************************************************* //
Foam::UPstream::resetRequests
static void resetRequests(const label sz)
Truncate number of outstanding requests.
Definition: UPstream.C:102
UPstream.H
Foam::UPstream::exit
static void exit(int errnum=1)
Exit program.
Definition: UPstream.C:46
Foam::minOp
Definition: ops.H:173
Foam::UPstream::waitRequests
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
Definition: UPstream.C:106
Foam::UPstream::abort
static void abort()
Abort program.
Definition: UPstream.C:52
Foam::UPstream::freePstreamCommunicator
static void freePstreamCommunicator(const label index)
Free a communicator.
Definition: UPstream.C:92
Foam::Vector2D< scalar >
Foam::UPstream::allocatePstreamCommunicator
static void allocatePstreamCommunicator(const label parentIndex, const label index)
Allocate a communicator with index.
Definition: UPstream.C:85
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:43
Foam::label
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
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::UPstream::waitRequest
static void waitRequest(const label i)
Wait until request i has finished.
Definition: UPstream.C:110
Foam::UPstream::addValidParOptions
static void addValidParOptions(HashTable< string > &validParOptions)
Add the valid option this type of communications library.
Definition: UPstream.C:31
Foam::FatalError
error FatalError
PstreamReduceOps.H
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
Foam::HashTable
An STL-conforming hash table.
Definition: HashTable.H:61
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
Foam::UPstream::nRequests
static label nRequests()
Get number of outstanding requests.
Definition: UPstream.C:96
Foam::sumOp
Definition: ops.H:162
Foam::UPstream::finishedRequest
static bool finishedRequest(const label i)
Non-blocking comms: has request i finished?
Definition: UPstream.C:114
Foam::sumReduce
void sumReduce(T &Value, label &Count, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Definition: PstreamReduceOps.H:125
Foam::UPstream::init
static bool init(int &argc, char **&argv)
Initialisation function called from main.
Definition: UPstream.C:35