OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

basicSymmetryPointPatchField.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #include "basicSymmetryPointPatchField.H"
00028 #include "transformField.H"
00029 
00030 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00031 
00032 namespace Foam
00033 {
00034 
00035 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00036 
00037 template<class Type>
00038 basicSymmetryPointPatchField<Type>::basicSymmetryPointPatchField
00039 (
00040     const pointPatch& p,
00041     const DimensionedField<Type, pointMesh>& iF
00042 )
00043 :
00044     pointPatchField<Type>(p, iF)
00045 {}
00046 
00047 
00048 template<class Type>
00049 basicSymmetryPointPatchField<Type>::basicSymmetryPointPatchField
00050 (
00051     const pointPatch& p,
00052     const DimensionedField<Type, pointMesh>& iF,
00053     const dictionary& dict
00054 )
00055 :
00056     pointPatchField<Type>(p, iF, dict)
00057 {}
00058 
00059 
00060 template<class Type>
00061 basicSymmetryPointPatchField<Type>::basicSymmetryPointPatchField
00062 (
00063     const basicSymmetryPointPatchField<Type>& ptf,
00064     const pointPatch& p,
00065     const DimensionedField<Type, pointMesh>& iF,
00066     const pointPatchFieldMapper&
00067 )
00068 :
00069     pointPatchField<Type>(p, iF)
00070 {}
00071 
00072 
00073 template<class Type>
00074 basicSymmetryPointPatchField<Type>::basicSymmetryPointPatchField
00075 (
00076     const basicSymmetryPointPatchField<Type>& ptf,
00077     const DimensionedField<Type, pointMesh>& iF
00078 )
00079 :
00080     pointPatchField<Type>(ptf, iF)
00081 {}
00082 
00083 
00084 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00085 
00086 template<class Type>
00087 void basicSymmetryPointPatchField<Type>::evaluate(const Pstream::commsTypes)
00088 {
00089     const vectorField& nHat = this->patch().pointNormals();
00090 
00091     tmp<Field<Type> > tvalues =
00092         transform(I - nHat*nHat, this->patchInternalField());
00093 
00094     // Get internal field to insert values into
00095     Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
00096 
00097     setInInternalField(iF, tvalues());
00098 }
00099 
00100 
00101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00102 
00103 } // End namespace Foam
00104 
00105 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd