initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / basic / transform / transformFvPatchField.H
blob7e65bb8bc0d044d997d59579fbf4cd33111490e8
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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     Foam::transformFvPatchField
28 Description
29     Foam::transformFvPatchField
31 SourceFiles
32     transformFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef transformFvPatchField_H
37 #define transformFvPatchField_H
39 #include "fvPatchField.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                         Class transformFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class Type>
51 class transformFvPatchField
53     public fvPatchField<Type>
56 public:
58     //- Runtime type information
59     TypeName("transform");
62     // Constructors
64         //- Construct from patch and internal field
65         transformFvPatchField
66         (
67             const fvPatch&,
68             const DimensionedField<Type, volMesh>&
69         );
71         //- Construct from patch, internal field and dictionary
72         transformFvPatchField
73         (
74             const fvPatch&,
75             const DimensionedField<Type, volMesh>&,
76             const dictionary&
77         );
79         //- Construct by mapping the given transformFvPatchField<Type>
80         //  onto a new patch
81         transformFvPatchField
82         (
83             const transformFvPatchField<Type>&,
84             const fvPatch&,
85             const DimensionedField<Type, volMesh>&,
86             const fvPatchFieldMapper&
87         );
89         //- Construct as copy
90         transformFvPatchField
91         (
92             const transformFvPatchField<Type>&
93         );
95         //- Construct and return a clone
96         virtual tmp<fvPatchField<Type> > clone() const = 0;
98         //- Construct as copy setting internal field reference
99         transformFvPatchField
100         (
101             const transformFvPatchField<Type>&,
102             const DimensionedField<Type, volMesh>&
103         );
105         //- Construct and return a clone setting internal field reference
106         virtual tmp<fvPatchField<Type> > clone
107         (
108             const DimensionedField<Type, volMesh>&
109         ) const = 0;
112     // Member functions
114         // Evaluation functions
116             //- Return gradient at boundary
117             virtual tmp<Field<Type> > snGrad() const = 0;
119             //- Return face-gradient transform diagonal
120             virtual tmp<Field<Type> > snGradTransformDiag() const = 0;
122             //- Return the matrix diagonal coefficients corresponding to the
123             //  evaluation of the value of this patchField with given weights
124             virtual tmp<Field<Type> > valueInternalCoeffs
125             (
126                 const tmp<scalarField>&
127             ) const;
129             //- Return the matrix source coefficients corresponding to the
130             //  evaluation of the value of this patchField with given weights
131             virtual tmp<Field<Type> > valueBoundaryCoeffs
132             (
133                 const tmp<scalarField>&
134             ) const;
136             //- Return the matrix diagonal coefficients corresponding to the
137             //  evaluation of the gradient of this patchField
138             virtual tmp<Field<Type> > gradientInternalCoeffs() const;
140             //- Return the matrix source coefficients corresponding to the
141             //  evaluation of the gradient of this patchField
142             virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
145     // Member operators
147         virtual void operator=(const fvPatchField<Type>&);
151 // * * * * * * * * * * * Template Specialisations  * * * * * * * * * * * * * //
153 template<>
154 tmp<scalarField > transformFvPatchField<scalar>::gradientInternalCoeffs() const;
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 #ifdef NoRepository
164 #   include "transformFvPatchField.C"
165 #endif
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 #endif
171 // ************************************************************************* //