OpenFOAM logo
Open Source CFD Toolkit

processorLduCoupledInterface.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2005 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     processorLduCoupledInterface
00027 
00028 Description
00029     This class contains the generic elements of a processor interface
00030 
00031 SourceFiles
00032     processorLduCoupledInterface.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef processorLduCoupledInterface_H
00037 #define processorLduCoupledInterface_H
00038 
00039 #include "lduCoupledInterface.H"
00040 #include "tensorField.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                   Class processorLduCoupledInterface Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class processorLduCoupledInterface
00052 :
00053     virtual public lduCoupledInterface
00054 {
00055 
00056 protected:
00057 
00058     // Protected member functions
00059 
00060         //- Raw field send function
00061         template<class Type>
00062         void send
00063         (
00064             const tmp<Field<Type> >&,
00065             const bool bufferdTransfer
00066         ) const;
00067 
00068         //- Raw field receive function returning field
00069         template<class Type>
00070         tmp<Field<Type> > receive(const label size) const;
00071 
00072 
00073         //- Raw field send function with data compression
00074         template<class Type>
00075         void compressedSend
00076         (
00077             const tmp<Field<Type> >&,
00078             const bool bufferdTransfer
00079         ) const;
00080 
00081         //- Raw field receive function with data compression returning field
00082         template<class Type>
00083         tmp<Field<Type> > compressedReceive(const label size) const;
00084 
00085 
00086 public:
00087 
00088     //- Runtime type information
00089     TypeName("processorLduCoupledInterface");
00090 
00091     // Constructors
00092 
00093     // Destructor
00094 
00095         virtual ~processorLduCoupledInterface();
00096 
00097 
00098     // Member Functions
00099 
00100         // Access
00101 
00102             //- Return processor number
00103             virtual int myProcNo() const = 0;
00104 
00105             //- Return neigbour processor number
00106             virtual int neighbProcNo() const = 0;
00107 
00108             //- Is the transform required
00109             virtual bool doTransform() const = 0;
00110 
00111             //- Return face transformation tensor
00112             virtual const tensorField& forwardT() const = 0;
00113 
00114             //- Return rank of component for transform
00115             virtual int rank() const = 0;
00116 
00117         //- Transform given patch component field
00118         void transformProcCoupleField
00119         (
00120             scalarField& f,
00121             const direction cmpt
00122         ) const;
00123 
00124 };
00125 
00126 
00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00128 
00129 } // End namespace Foam
00130 
00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00132 
00133 #ifdef NoRepository
00134 #   include "processorLduCoupledInterfaceTemplates.C"
00135 #endif
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 #endif
00140 
00141 // ************************************************************************* //
For further information go to www.openfoam.org