changed isA<wallPolyPatch> & isA<wallFvPatch> almost everywhere
[openfoam-extend-OpenFOAM-1.6-ext.git] / src / turbulenceModels / incompressible / RAS / derivedFvPatchFields / wallFunctions / kqRWallFunctions / kqRWallFunction / kqRWallFunctionFvPatchField.C
blob4ac2e0d658fd2978e5bba25a743356e5a05aacee
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 \*---------------------------------------------------------------------------*/
27 #include "kqRWallFunctionFvPatchField.H"
28 #include "fvPatchFieldMapper.H"
29 #include "addToRunTimeSelectionTable.H"
30 #include "wallFvPatch.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace Foam
36 namespace incompressible
38 namespace RASModels
41 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
43 template<class Type>
44 void kqRWallFunctionFvPatchField<Type>::checkType()
46     if (!this->patch().isWall()) 
47     {
48         FatalErrorIn("kqRWallFunctionFvPatchField::checkType()")
49             << "Invalid wall function specification" << nl
50             << "    Patch type for patch " << this->patch().name()
51             << " must be wall" << nl
52             << "    Current patch type is " << this->patch().type()
53             << nl << endl
54             << abort(FatalError);
55     }
59 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
61 template<class Type>
62 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
64     const fvPatch& p,
65     const DimensionedField<Type, volMesh>& iF
68     zeroGradientFvPatchField<Type>(p, iF)
70     checkType();
74 template<class Type>
75 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
77     const kqRWallFunctionFvPatchField& ptf,
78     const fvPatch& p,
79     const DimensionedField<Type, volMesh>& iF,
80     const fvPatchFieldMapper& mapper
83     zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
85     checkType();
89 template<class Type>
90 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
92     const fvPatch& p,
93     const DimensionedField<Type, volMesh>& iF,
94     const dictionary& dict
97     zeroGradientFvPatchField<Type>(p, iF, dict)
99     checkType();
103 template<class Type>
104 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
106     const kqRWallFunctionFvPatchField& tkqrwfpf
109     zeroGradientFvPatchField<Type>(tkqrwfpf)
111     checkType();
115 template<class Type>
116 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
118     const kqRWallFunctionFvPatchField& tkqrwfpf,
119     const DimensionedField<Type, volMesh>& iF
122     zeroGradientFvPatchField<Type>(tkqrwfpf, iF)
124     checkType();
128 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
130 template<class Type>
131 void kqRWallFunctionFvPatchField<Type>::evaluate
133     const Pstream::commsTypes commsType
136     zeroGradientFvPatchField<Type>::evaluate(commsType);
140 template<class Type>
141 void kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const
143     zeroGradientFvPatchField<Type>::write(os);
144     this->writeEntry("value", os);
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace RASModels
151 } // End namespace incompressible
152 } // End namespace Foam
154 // ************************************************************************* //