1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
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 "processorPointPatchField.H"
27 //#include "transformField.H"
28 #include "processorPolyPatch.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
38 processorPointPatchField<Type>::processorPointPatchField
41 const DimensionedField<Type, pointMesh>& iF
44 coupledPointPatchField<Type>(p, iF),
45 procPatch_(refCast<const processorPointPatch>(p))
50 processorPointPatchField<Type>::processorPointPatchField
53 const DimensionedField<Type, pointMesh>& iF,
54 const dictionary& dict
57 coupledPointPatchField<Type>(p, iF, dict),
58 procPatch_(refCast<const processorPointPatch>(p))
63 processorPointPatchField<Type>::processorPointPatchField
65 const processorPointPatchField<Type>& ptf,
67 const DimensionedField<Type, pointMesh>& iF,
68 const pointPatchFieldMapper& mapper
71 coupledPointPatchField<Type>(ptf, p, iF, mapper),
72 procPatch_(refCast<const processorPointPatch>(ptf.patch()))
77 processorPointPatchField<Type>::processorPointPatchField
79 const processorPointPatchField<Type>& ptf,
80 const DimensionedField<Type, pointMesh>& iF
83 coupledPointPatchField<Type>(ptf, iF),
84 procPatch_(refCast<const processorPointPatch>(ptf.patch()))
88 // * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
91 processorPointPatchField<Type>::~processorPointPatchField()
95 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
98 void processorPointPatchField<Type>::initSwapAddSeparated
100 const Pstream::commsTypes commsType,
105 // if (Pstream::parRun())
107 // // Get internal field into correct order for opposite side
110 // this->patchInternalField
113 // procPatch_.reverseMeshPoints()
120 // procPatch_.neighbProcNo(),
121 // reinterpret_cast<const char*>(pf.begin()),
130 void processorPointPatchField<Type>::swapAddSeparated
132 const Pstream::commsTypes commsType,
136 // if (Pstream::parRun())
138 // Field<Type> pnf(this->size());
143 // procPatch_.neighbProcNo(),
144 // reinterpret_cast<char*>(pnf.begin()),
149 // if (doTransform())
151 // const processorPolyPatch& ppp = procPatch_.procPolyPatch();
152 // const tensor& forwardT = ppp.forwardT();
154 // transform(pnf, forwardT, pnf);
157 // addToInternalField(pField, pnf, procPatch_.separatedPoints());
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace Foam
166 // ************************************************************************* //