1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "nonuniformTransformCyclicPointPatchField.H"
27 #include "transformField.H"
28 #include "symmTransformField.H"
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
34 Foam::nonuniformTransformCyclicPointPatchField<Type>::
35 nonuniformTransformCyclicPointPatchField
38 const DimensionedField<Type, pointMesh>& iF
41 cyclicPointPatchField<Type>(p, iF)
46 Foam::nonuniformTransformCyclicPointPatchField<Type>::
47 nonuniformTransformCyclicPointPatchField
50 const DimensionedField<Type, pointMesh>& iF,
51 const dictionary& dict
54 cyclicPointPatchField<Type>(p, iF, dict)
59 Foam::nonuniformTransformCyclicPointPatchField<Type>::
60 nonuniformTransformCyclicPointPatchField
62 const nonuniformTransformCyclicPointPatchField<Type>& ptf,
64 const DimensionedField<Type, pointMesh>& iF,
65 const pointPatchFieldMapper& mapper
68 cyclicPointPatchField<Type>(ptf, p, iF, mapper)
73 Foam::nonuniformTransformCyclicPointPatchField<Type>::
74 nonuniformTransformCyclicPointPatchField
76 const nonuniformTransformCyclicPointPatchField<Type>& ptf,
77 const DimensionedField<Type, pointMesh>& iF
80 cyclicPointPatchField<Type>(ptf, iF)
84 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
87 void Foam::nonuniformTransformCyclicPointPatchField<Type>::evaluate
89 const Pstream::commsTypes
92 const vectorField& nHat = this->patch().pointNormals();
94 tmp<Field<Type> > tvalues =
97 this->patchInternalField()
98 + transform(I - 2.0*sqr(nHat), this->patchInternalField())
102 // Get internal field to insert values into
103 Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
105 this->setInInternalField(iF, tvalues());
109 // ************************************************************************* //