initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / derived / fixedInternalValueFvPatchField / fixedInternalValueFvPatchField.H
blobd79672dd500a21b1db57e7160f833d3b31bd759e
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::fixedInternalValueFvPatchField
28 Description
29     Boundary condition providing mechanism to set boundary (cell) values
30     directly into a matrix, i.e. to set a constraint condition. Default
31     behaviour is to act as a zero gradient condition.
33 SourceFiles
34     fixedInternalValueFvPatchField.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef fixedInternalValueFvPatchField_H
39 #define fixedInternalValueFvPatchField_H
41 #include "zeroGradientFvPatchField.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49               Class fixedInternalValueFvPatchField Declaration
50 \*---------------------------------------------------------------------------*/
52 template<class Type>
53 class fixedInternalValueFvPatchField
55     public zeroGradientFvPatchField<Type>
58 public:
60     //- Runtime type information
61     TypeName("fixedInternalValue");
64     // Constructors
66         //- Construct from patch and internal field
67         fixedInternalValueFvPatchField
68         (
69             const fvPatch&,
70             const DimensionedField<Type, volMesh>&
71         );
73         //- Construct from patch, internal field and dictionary
74         fixedInternalValueFvPatchField
75         (
76             const fvPatch&,
77             const DimensionedField<Type, volMesh>&,
78             const dictionary&
79         );
81         //- Construct by mapping the given fixedInternalValueFvPatchField<Type>
82         //  onto a new patch
83         fixedInternalValueFvPatchField
84         (
85             const fixedInternalValueFvPatchField<Type>&,
86             const fvPatch&,
87             const DimensionedField<Type, volMesh>&,
88             const fvPatchFieldMapper&
89         );
91         //- Construct as copy
92         fixedInternalValueFvPatchField
93         (
94             const fixedInternalValueFvPatchField<Type>&
95         );
97         //- Construct and return a clone
98         virtual tmp<fvPatchField<Type> > clone() const
99         {
100             return tmp<fvPatchField<Type> >
101             (
102                 new fixedInternalValueFvPatchField<Type>(*this)
103             );
104         }
106         //- Construct as copy setting internal field reference
107         fixedInternalValueFvPatchField
108         (
109             const fixedInternalValueFvPatchField<Type>&,
110             const DimensionedField<Type, volMesh>&
111         );
113         //- Construct and return a clone setting internal field reference
114         virtual tmp<fvPatchField<Type> > clone
115         (
116             const DimensionedField<Type, volMesh>& iF
117         ) const
118         {
119             return tmp<fvPatchField<Type> >
120             (
121                 new fixedInternalValueFvPatchField<Type>(*this, iF)
122             );
123         }
126     // Member functions
128         // Evaluation functions
130             //-Manipulate a matrix
131             virtual void manipulateMatrix(fvMatrix<Type>& matrix);
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 } // End namespace Foam
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 #ifdef NoRepository
142 #   include "fixedInternalValueFvPatchField.C"
143 #endif
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 #endif
149 // ************************************************************************* //