1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::processorLduInterface
29 An abstract base class for processor coupled interfaces.
32 processorLduInterface.C
33 processorLduInterfaceTemplates.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef processorLduInterface_H
38 #define processorLduInterface_H
40 #include "lduInterface.H"
41 #include "primitiveFieldsFwd.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class processorLduInterface Declaration
50 \*---------------------------------------------------------------------------*/
52 class processorLduInterface
57 // Only sized and used when compressed or non-blocking comms used.
58 mutable List<char> sendBuf_;
61 // Only sized and used when compressed or non-blocking comms used.
62 mutable List<char> receiveBuf_;
64 //- Resize the buffer if required
65 void resizeBuf(List<char>& buf, const label size) const;
70 //- Runtime type information
71 TypeName("processorLduInterface");
77 processorLduInterface();
82 virtual ~processorLduInterface();
89 //- Return processor number
90 virtual int myProcNo() const = 0;
92 //- Return neigbour processor number
93 virtual int neighbProcNo() const = 0;
95 //- Return face transformation tensor
96 virtual const tensorField& forwardT() const = 0;
101 //- Raw send function
105 const Pstream::commsTypes commsType,
109 //- Raw field receive function
113 const Pstream::commsTypes commsType,
117 //- Raw field receive function returning field
119 tmp<Field<Type> > receive
121 const Pstream::commsTypes commsType,
126 //- Raw field send function with data compression
130 const Pstream::commsTypes commsType,
134 //- Raw field receive function with data compression
136 void compressedReceive
138 const Pstream::commsTypes commsType,
142 //- Raw field receive function with data compression returning field
144 tmp<Field<Type> > compressedReceive
146 const Pstream::commsTypes commsType,
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace Foam
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 # include "processorLduInterfaceTemplates.C"
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 // ************************************************************************* //