fvMeshAdder.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef fvMeshAdder_H
00039 #define fvMeshAdder_H
00040
00041 #include "polyMeshAdder.H"
00042 #include "fvPatchFieldsFwd.H"
00043 #include "fvsPatchFieldsFwd.H"
00044 #include "fvPatchFieldMapper.H"
00045
00046
00047
00048 namespace Foam
00049 {
00050
00051
00052 class IOobject;
00053 class faceCoupleInfo;
00054 class IOobjectList;
00055 class fvMesh;
00056 class volMesh;
00057 class surfaceMesh;
00058 class mapAddedPolyMesh;
00059
00060
00061
00062
00063
00064 class fvMeshAdder
00065 :
00066 public polyMeshAdder
00067 {
00068
00069 private:
00070
00071
00072
00073
00074 class directFvPatchFieldMapper
00075 :
00076 public fvPatchFieldMapper
00077 {
00078
00079
00080 const labelList& directAddressing_;
00081
00082 public:
00083
00084
00085
00086
00087 directFvPatchFieldMapper(const labelList& directAddressing)
00088 :
00089 fvPatchFieldMapper(),
00090 directAddressing_(directAddressing)
00091 {}
00092
00093
00094
00095
00096 virtual ~directFvPatchFieldMapper()
00097 {}
00098
00099
00100
00101
00102 label size() const
00103 {
00104 return directAddressing_.size();
00105 }
00106
00107 bool direct() const
00108 {
00109 return true;
00110 }
00111
00112 const unallocLabelList& directAddressing() const
00113 {
00114 return directAddressing_;
00115 }
00116 };
00117
00118
00119
00120
00121
00122
00123 static labelList calcPatchMap
00124 (
00125 const label oldStart,
00126 const label oldSize,
00127 const labelList& oldToNew,
00128 const polyPatch& newPatch,
00129 const label unmappedIndex
00130 );
00131
00132
00133 template<class Type>
00134 static void map
00135 (
00136 const Field<Type>&,
00137 const labelList& map,
00138 Field<Type>&
00139 );
00140
00141
00142 template<class Type>
00143 static void MapVolField
00144 (
00145 const mapAddedPolyMesh& meshMap,
00146
00147 GeometricField<Type, fvPatchField, volMesh>& fld,
00148 const GeometricField<Type, fvPatchField, volMesh>& fldToAdd
00149 );
00150
00151
00152 template<class Type>
00153 static void MapSurfaceField
00154 (
00155 const mapAddedPolyMesh& meshMap,
00156
00157 GeometricField<Type, fvsPatchField, surfaceMesh>& fld,
00158 const GeometricField<Type, fvsPatchField, surfaceMesh>& fldToAdd
00159 );
00160
00161 public:
00162
00163
00164
00165
00166 static autoPtr<mapAddedPolyMesh> add
00167 (
00168 fvMesh& mesh0,
00169 const fvMesh& mesh1,
00170 const faceCoupleInfo& coupleInfo,
00171 const bool validBoundary = true
00172 );
00173
00174
00175 template<class Type>
00176 static void MapVolFields
00177 (
00178 const mapAddedPolyMesh&,
00179 const fvMesh& mesh,
00180 const fvMesh& meshToAdd
00181 );
00182
00183
00184 template<class Type>
00185 static void MapSurfaceFields
00186 (
00187 const mapAddedPolyMesh&,
00188 const fvMesh& mesh,
00189 const fvMesh& meshToAdd
00190 );
00191 };
00192
00193
00194
00195
00196 }
00197
00198
00199
00200 #ifdef NoRepository
00201 # include "fvMeshAdderTemplates.C"
00202 #endif
00203
00204
00205
00206 #endif
00207
00208
Copyright © 2000-2009 OpenCFD Ltd