BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / OpenFOAM / fields / pointPatchFields / constraint / nonuniformTransformCyclic / nonuniformTransformCyclicPointPatchField.C
blob3f31c34d2e584534a1619262fd17b17950ab3840
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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
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
19     for more details.
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  * * * * * * * * * * * * * * //
33 template<class Type>
34 Foam::nonuniformTransformCyclicPointPatchField<Type>::
35 nonuniformTransformCyclicPointPatchField
37     const pointPatch& p,
38     const DimensionedField<Type, pointMesh>& iF
41     cyclicPointPatchField<Type>(p, iF)
45 template<class Type>
46 Foam::nonuniformTransformCyclicPointPatchField<Type>::
47 nonuniformTransformCyclicPointPatchField
49     const pointPatch& p,
50     const DimensionedField<Type, pointMesh>& iF,
51     const dictionary& dict
54     cyclicPointPatchField<Type>(p, iF, dict)
58 template<class Type>
59 Foam::nonuniformTransformCyclicPointPatchField<Type>::
60 nonuniformTransformCyclicPointPatchField
62     const nonuniformTransformCyclicPointPatchField<Type>& ptf,
63     const pointPatch& p,
64     const DimensionedField<Type, pointMesh>& iF,
65     const pointPatchFieldMapper& mapper
68     cyclicPointPatchField<Type>(ptf, p, iF, mapper)
72 template<class Type>
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  * * * * * * * * * * * * * //
86 template<class Type>
87 void Foam::nonuniformTransformCyclicPointPatchField<Type>::evaluate
89     const Pstream::commsTypes
92     const vectorField& nHat = this->patch().pointNormals();
94     tmp<Field<Type> > tvalues =
95     (
96         (
97             this->patchInternalField()
98           + transform(I - 2.0*sqr(nHat), this->patchInternalField())
99         )/2.0
100     );
102     // Get internal field to insert values into
103     Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
105     this->setInInternalField(iF, tvalues());
109 // ************************************************************************* //