1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
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
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 "calculatedFvsPatchField.H"
28 #include "fvPatchFieldMapper.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 const word& fvsPatchField<Type>::calculatedType()
38 return calculatedFvsPatchField<Type>::typeName;
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44 calculatedFvsPatchField<Type>::calculatedFvsPatchField
47 const DimensionedField<Type, surfaceMesh>& iF
50 fvsPatchField<Type>(p, iF)
55 calculatedFvsPatchField<Type>::calculatedFvsPatchField
57 const calculatedFvsPatchField<Type>& ptf,
59 const DimensionedField<Type, surfaceMesh>& iF,
60 const fvPatchFieldMapper& mapper
63 fvsPatchField<Type>(ptf, p, iF, mapper)
68 calculatedFvsPatchField<Type>::calculatedFvsPatchField
71 const DimensionedField<Type, surfaceMesh>& iF,
72 const dictionary& dict
75 fvsPatchField<Type>(p, iF, Field<Type>("value", dict, p.size()))
80 calculatedFvsPatchField<Type>::calculatedFvsPatchField
82 const calculatedFvsPatchField<Type>& ptf
85 fvsPatchField<Type>(ptf)
90 calculatedFvsPatchField<Type>::calculatedFvsPatchField
92 const calculatedFvsPatchField<Type>& ptf,
93 const DimensionedField<Type, surfaceMesh>& iF
96 fvsPatchField<Type>(ptf, iF)
101 template<class Type2>
102 tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
104 const fvsPatchField<Type2>& pf
107 typename patchConstructorTable::iterator patchTypeCstrIter =
108 patchConstructorTablePtr_->find(pf.patch().type());
110 if (patchTypeCstrIter != patchConstructorTablePtr_->end())
112 return patchTypeCstrIter()
120 return tmp<fvsPatchField<Type> >
122 new calculatedFvsPatchField<Type>
132 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
136 void calculatedFvsPatchField<Type>::write(Ostream& os) const
138 fvsPatchField<Type>::write(os);
139 this->writeEntry("value", os);
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 } // End namespace Foam
147 // ************************************************************************* //