![]() |
|
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 SlicedGeometricField 00027 00028 Description 00029 Special for of GeometricField which holds slices of given complete fields 00030 in a form that they act as a GeometricField. The destructor is wrapped 00031 to avoid deallocation of the storage of the complete fields when this is 00032 destroyed. 00033 00034 SlicedGeometricField can only be instantiated with a valid form of 00035 SlicedPatchField to handle the slicing and storage deallocation of the 00036 boundary field. 00037 00038 SourceFiles 00039 SlicedGeometricField.C 00040 00041 \*---------------------------------------------------------------------------*/ 00042 00043 #ifndef SlicedGeometricField_H 00044 #define SlicedGeometricField_H 00045 00046 #include "GeometricField.H" 00047 00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00049 00050 namespace Foam 00051 { 00052 00053 /*---------------------------------------------------------------------------*\ 00054 Class SlicedGeometricField Declaration 00055 \*---------------------------------------------------------------------------*/ 00056 00057 template 00058 < 00059 class Type, 00060 template<class> class PatchField, 00061 template<class> class SlicedPatchField, 00062 class GeoMesh 00063 > 00064 class SlicedGeometricField 00065 : 00066 public GeometricField<Type, PatchField, GeoMesh> 00067 { 00068 public: 00069 00070 typedef typename GeoMesh::Mesh Mesh; 00071 typedef typename Mesh::BoundaryMesh BoundaryMesh; 00072 00073 00074 private: 00075 00076 // Private Member Functions 00077 00078 //- Slice the given field and a create a PtrList of SlicedPatchField 00079 // from which teh boundary field is built 00080 tmp<FieldField<PatchField, Type> > slicedBoundaryField 00081 ( 00082 const Mesh& mesh, 00083 const Field<Type>& completeField 00084 ); 00085 00086 //- Disallow default bitwise copy construct 00087 SlicedGeometricField(const SlicedGeometricField&); 00088 00089 //- Disallow default bitwise assignment 00090 void operator=(const SlicedGeometricField&); 00091 00092 00093 public: 00094 00095 // Constructors 00096 00097 //- Construct from components and field to slice 00098 SlicedGeometricField 00099 ( 00100 const IOobject&, 00101 const Mesh&, 00102 const dimensionSet&, 00103 const Field<Type>& completeField 00104 ); 00105 00106 //- Construct from components and separate fields to slice for the 00107 // internal field and boundary field 00108 SlicedGeometricField 00109 ( 00110 const IOobject&, 00111 const Mesh&, 00112 const dimensionSet&, 00113 const Field<Type>& completeIField, 00114 const Field<Type>& completeBField 00115 ); 00116 00117 00118 // Destructor 00119 00120 ~SlicedGeometricField(); 00121 00122 00123 // Member Functions 00124 00125 // Access 00126 00127 // Check 00128 00129 // Edit 00130 }; 00131 00132 00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00134 00135 } // End namespace Foam 00136 00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00138 00139 #ifdef NoRepository 00140 # include "SlicedGeometricField.C" 00141 #endif 00142 00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00144 00145 #endif 00146 00147 // ************************************************************************* //