![]() |
|
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 tetPolyPatchField 00027 00028 Description 00029 Abstract base class for tetrahedral mesh patch fields. Note the special 00030 mechanism at work here: the field itself holds no values, as the point 00031 values belong to the internal field. However, the field will create a 00032 list of values if required. 00033 00034 SourceFiles 00035 tetPolyPatchField.C 00036 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #ifndef tetPolyPatchField_H 00040 #define tetPolyPatchField_H 00041 00042 #include "TetPointPatchField.H" 00043 #include "tetPolyPatch.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 00050 // Class forward declarations 00051 00052 template<class T> class Map; 00053 template<class Type> class constraint; 00054 template<class Type> class tetFemMatrix; 00055 00056 00057 /*---------------------------------------------------------------------------*\ 00058 Class tetPolyPatchField Declaration 00059 \*---------------------------------------------------------------------------*/ 00060 00061 template<class Type> 00062 class tetPolyPatchField 00063 : 00064 public TetPointPatchField<tetPolyPatchField, tetPolyPatch, Type> 00065 { 00066 00067 public: 00068 00069 // Constructors 00070 00071 //- Construct from patch and internal field 00072 tetPolyPatchField 00073 ( 00074 const tetPolyPatch&, 00075 const Field<Type>& 00076 ); 00077 00078 //- Construct as copy 00079 tetPolyPatchField(const tetPolyPatchField<Type>&); 00080 00081 //- Construct and return a clone 00082 virtual autoPtr<tetPolyPatchField<Type> > clone() const 00083 { 00084 return autoPtr<tetPolyPatchField<Type> > 00085 ( 00086 new tetPolyPatchField<Type>(*this) 00087 ); 00088 } 00089 00090 //- Construct as copy setting internal field reference 00091 tetPolyPatchField(const tetPolyPatchField<Type>&, const Field<Type>&); 00092 00093 //- Construct and return a clone setting internal field reference 00094 virtual autoPtr<tetPolyPatchField<Type> > clone 00095 ( 00096 const Field<Type>& iF 00097 ) const 00098 { 00099 return autoPtr<tetPolyPatchField<Type> > 00100 ( 00101 new tetPolyPatchField<Type>(*this, iF) 00102 ); 00103 } 00104 00105 00106 // Destructor 00107 00108 virtual ~tetPolyPatchField() 00109 {} 00110 00111 00112 // Member functions 00113 00114 //- Add boundary source for gradient-type conditions 00115 virtual void addBoundarySourceDiag 00116 ( 00117 tetFemMatrix<Type>& 00118 ) const 00119 {} 00120 00121 00122 //- Set boundary condition to matrix 00123 virtual void setBoundaryCondition 00124 ( 00125 Map<constraint<Type> > & 00126 ) const 00127 {} 00128 00129 00130 // Member operators 00131 00132 virtual void operator=(const Type& t) 00133 { 00134 TetPointPatchField<Foam::tetPolyPatchField, tetPolyPatch, Type>:: 00135 operator=(t); 00136 } 00137 }; 00138 00139 00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00141 00142 } // End namespace Foam 00143 00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00145 00146 #ifdef NoRepository 00147 # include "tetPolyPatchField.C" 00148 #endif 00149 00150 00151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00152 00153 #endif 00154 00155 // ************************************************************************* // 00156