|
|
|
processorGAMGInterface.HGo 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-2009 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 Foam::processorGAMGInterface 00027 00028 Description 00029 GAMG agglomerated processor interface. 00030 00031 SourceFiles 00032 processorGAMGInterface.C 00033 processorGAMGInterfaceTemplates.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef processorGAMGInterface_H 00038 #define processorGAMGInterface_H 00039 00040 #include "GAMGInterface.H" 00041 #include "processorLduInterface.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class processorGAMGInterface Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class processorGAMGInterface 00053 : 00054 public GAMGInterface, 00055 public processorLduInterface 00056 { 00057 // Private data 00058 00059 //- Reference tor the processorLduInterface from which this is 00060 // agglomerated 00061 const processorLduInterface& fineProcInterface_; 00062 00063 00064 // Private Member Functions 00065 00066 //- Disallow default bitwise copy construct 00067 processorGAMGInterface(const processorGAMGInterface&); 00068 00069 //- Disallow default bitwise assignment 00070 void operator=(const processorGAMGInterface&); 00071 00072 00073 public: 00074 00075 //- Runtime type information 00076 TypeName("processor"); 00077 00078 // Constructors 00079 00080 //- Construct from fine-level interface, 00081 // local and neighbour restrict addressing 00082 processorGAMGInterface 00083 ( 00084 const lduInterface& fineInterface, 00085 const labelField& restrictAddressing, 00086 const labelField& neighbourRestrictAddressing 00087 ); 00088 00089 00090 // Destructor 00091 00092 virtual ~processorGAMGInterface(); 00093 00094 00095 // Member Functions 00096 00097 // Interface transfer functions 00098 00099 //- Initialise interface data transfer 00100 virtual void initTransfer 00101 ( 00102 const Pstream::commsTypes commsType, 00103 const unallocLabelList& interfaceData 00104 ) const; 00105 00106 //- Transfer and return neighbour field 00107 virtual tmp<labelField> transfer 00108 ( 00109 const Pstream::commsTypes commsType, 00110 const unallocLabelList& interfaceData 00111 ) const; 00112 00113 //- Initialise neighbour field transfer 00114 virtual void initInternalFieldTransfer 00115 ( 00116 const Pstream::commsTypes commsType, 00117 const unallocLabelList& iF 00118 ) const; 00119 00120 //- Transfer and return internal field adjacent to the interface 00121 virtual tmp<labelField> internalFieldTransfer 00122 ( 00123 const Pstream::commsTypes commsType, 00124 const unallocLabelList& iF 00125 ) const; 00126 00127 00128 //- Processor interface functions 00129 00130 //- Return processor number 00131 virtual int myProcNo() const 00132 { 00133 return fineProcInterface_.myProcNo(); 00134 } 00135 00136 //- Return neigbour processor number 00137 virtual int neighbProcNo() const 00138 { 00139 return fineProcInterface_.neighbProcNo(); 00140 } 00141 00142 //- Return face transformation tensor 00143 virtual const tensorField& forwardT() const 00144 { 00145 return fineProcInterface_.forwardT(); 00146 } 00147 }; 00148 00149 00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00151 00152 } // End namespace Foam 00153 00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00155 00156 #endif 00157 00158 // ************************************************************************* // |