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
29 An abstract base class for ggi coupled interfaces.
32 Hrvoje Jasak, Wikki Ltd. All rights reserved
37 \*---------------------------------------------------------------------------*/
39 #ifndef ggiLduInterface_H
40 #define ggiLduInterface_H
42 #include "lduInterface.H"
43 #include "primitiveFieldsFwd.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class ggiLduInterface Declaration
52 \*---------------------------------------------------------------------------*/
61 mutable labelField labelTransferBuffer_;
63 //- Field transfer buffer
64 mutable scalarField fieldTransferBuffer_;
69 //- Runtime type information
70 TypeName("ggiLduInterface");
77 labelTransferBuffer_(),
78 fieldTransferBuffer_()
84 virtual ~ggiLduInterface();
89 //- Is this the master side?
90 virtual bool master() const = 0;
92 //- Is this the fine level?
93 virtual bool fineLevel() const = 0;
95 //- Return shadow interface index
96 virtual label shadowIndex() const = 0;
98 //- Return shadow interface
99 virtual const ggiLduInterface& shadowInterface() const = 0;
102 virtual label zoneSize() const = 0;
104 //- Return zone addressing
105 virtual const labelList& zoneAddressing() const = 0;
107 //- Return fine level addressing
108 virtual const labelListList& addressing() const = 0;
110 //- Is the patch localised on a single processor
111 virtual bool localParallel() const = 0;
114 virtual const scalarListList& weights() const = 0;
116 //- Return face transformation tensor
117 virtual const tensorField& forwardT() const = 0;
119 //- Return face reverse transformation tensor
120 virtual const tensorField& reverseT() const = 0;
123 // Transfer buffer access
125 //- Return contents of the label transfer buffer
126 const labelField& labelTransferBuffer() const
128 return labelTransferBuffer_;
131 //- Return contents of the field transfer buffer
132 const scalarField& fieldTransferBuffer() const
134 return fieldTransferBuffer_;
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 // ************************************************************************* //