fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / tetDecompositionFiniteElement / fields / tetPolyPatchFields / tetPolyPatchField / tetPolyPatchField.H
blobbb76113f8f18b58d6e17f3d4e6372544d7e25978
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     tetPolyPatchField
28 Description
29     Abstract base class for tetrahedral mesh patch fields. Note the special
30     mechanism at work here: the field itself holds no values, as the point
31     values belong to the internal field. However, the field will create a
32     list of values if required.
34 SourceFiles
35     tetPolyPatchField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef tetPolyPatchField_H
40 #define tetPolyPatchField_H
42 #include "PointPatchField.H"
43 #include "tetPolyPatch.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 // Class forward declarations
51 template<class> class tetFemMatrix;
52 class tetPointMesh;
54 /*---------------------------------------------------------------------------*\
55                        Class tetPolyPatchField Declaration
56 \*---------------------------------------------------------------------------*/
58 template<class Type>
59 class tetPolyPatchField
61     public PointPatchField
62     <
63         tetPolyPatchField,
64         tetPointMesh,
65         tetPolyPatch,
66         tetFemMatrix,
67         Type
68     >
71 public:
73     // Constructors
75         //- Construct from patch and internal field
76         tetPolyPatchField
77         (
78             const tetPolyPatch&,
79             const DimensionedField<Type, tetPointMesh>&
80         );
82         //- Construct as copy
83         tetPolyPatchField(const tetPolyPatchField<Type>&);
85         //- Construct and return a clone
86         virtual autoPtr<tetPolyPatchField<Type> > clone() const
87         {
88             return autoPtr<tetPolyPatchField<Type> >
89             (
90                 new tetPolyPatchField<Type>(*this)
91             );
92         }
94         //- Construct as copy setting internal field reference
95         tetPolyPatchField
96         (
97             const tetPolyPatchField<Type>&,
98             const DimensionedField<Type, tetPointMesh>&
99         );
101         //- Construct and return a clone setting internal field reference
102         virtual autoPtr<tetPolyPatchField<Type> > clone
103         (
104             const DimensionedField<Type, tetPointMesh>& iF
105         ) const
106         {
107             return autoPtr<tetPolyPatchField<Type> >
108             (
109                 new tetPolyPatchField<Type>(*this, iF)
110             );
111         }
114     // Destructor
116         virtual ~tetPolyPatchField()
117         {}
120     // Member operators
122         virtual void operator=(const Type& t)
123         {
124             PointPatchField
125             <
126                 Foam::tetPolyPatchField,
127                 tetPointMesh,
128                 tetPolyPatch,
129                 Foam::tetFemMatrix,
130                 Type
131             >::operator=(t);
132         }
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 } // End namespace Foam
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 #ifdef NoRepository
143 #   include "tetPolyPatchField.C"
144 #endif
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 #endif
151 // ************************************************************************* //