![]() |
|
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 00025 Class 00026 fvMeshAdder 00027 00028 Description 00029 Adds two fvMeshes without using any polyMesh morphing. 00030 Uses fvMeshAdder. 00031 00032 SourceFiles 00033 fvMeshAdder.C 00034 fvMeshAdderTemplates.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef fvMeshAdder_H 00039 #define fvMeshAdder_H 00040 00041 #include "polyMeshAdder.H" 00042 #include "fvPatchFieldsFwd.H" 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 // Class forward declarations 00050 class IOobject; 00051 class faceCoupleInfo; 00052 class IOobjectList; 00053 class fvMesh; 00054 class volMesh; 00055 00056 /*---------------------------------------------------------------------------*\ 00057 Class fvMeshAdder Declaration 00058 \*---------------------------------------------------------------------------*/ 00059 00060 class fvMeshAdder 00061 : 00062 public polyMeshAdder 00063 { 00064 00065 private: 00066 // Private data 00067 00068 00069 // Private Member Functions 00070 00071 //- Map from old to new according to map. Handles map = -1. 00072 template<class Type> 00073 static void map 00074 ( 00075 const Field<Type>&, 00076 const labelList& map, 00077 Field<Type>& 00078 ); 00079 00080 //- Map from old to new fvPatchField. Handles map = -1. 00081 template<class Type> 00082 static void mapPatchField 00083 ( 00084 const Field<Type>& oldFld, 00085 const label oldStart, 00086 const labelList& oldToNew, 00087 fvPatchField<Type>& fld 00088 ); 00089 00090 //- Update single volField. 00091 template<class Type> 00092 void MapVolField 00093 ( 00094 const labelList& oldPatchStarts, 00095 GeometricField<Type, fvPatchField, volMesh>& fld, 00096 const GeometricField<Type, fvPatchField, volMesh>& fldToAdd 00097 ) const; 00098 00099 template<class Type> 00100 void MapVolFields 00101 ( 00102 const labelList& oldPatchStarts, 00103 const fvMesh& mesh, 00104 const fvMesh& meshToAdd 00105 ) const; 00106 00107 public: 00108 00109 // Constructors 00110 00111 //- Construct null 00112 fvMeshAdder(); 00113 00114 00115 // Member Functions 00116 00117 //- Inplace add mesh to fvMesh. Maps all stored fields. 00118 void add 00119 ( 00120 fvMesh& mesh0, 00121 const fvMesh& mesh1, 00122 const faceCoupleInfo& coupleInfo 00123 ); 00124 }; 00125 00126 00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00128 00129 } // End namespace Foam 00130 00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00132 00133 #ifdef NoRepository 00134 # include "fvMeshAdderTemplates.C" 00135 #endif 00136 00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00138 00139 #endif 00140 00141 // ************************************************************************* //