From 089e593907af5088885bf6c75a1fdc497987b9c1 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 13 Apr 2010 11:27:11 +0100 Subject: [PATCH 1/4] BUG: Was never calculating the patch-patch points. --- .../interpolation/volPointInterpolation/volPointInterpolation.C | 1 + 1 file changed, 1 insertion(+) diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index 37e61081ed..36a92ca66b 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C @@ -620,6 +620,7 @@ volPointInterpolation::~volPointInterpolation() void volPointInterpolation::updateMesh() { makeWeights(); + makePatchPatchAddressing(); } From 868d5866b4b3c60874d9cc4fb877e0b5e00337df Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 13 Apr 2010 15:01:08 +0100 Subject: [PATCH 2/4] ENH: Use reference instead of copy --- src/lagrangian/intermediate/particleForces/particleForces.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lagrangian/intermediate/particleForces/particleForces.C b/src/lagrangian/intermediate/particleForces/particleForces.C index 13f243c1ed..265f9b59ae 100644 --- a/src/lagrangian/intermediate/particleForces/particleForces.C +++ b/src/lagrangian/intermediate/particleForces/particleForces.C @@ -118,7 +118,7 @@ void Foam::particleForces::cacheFields(const bool store) { if (store && pressureGradient_) { - const volVectorField U = mesh_.lookupObject(UName_); + const volVectorField& U = mesh_.lookupObject(UName_); gradUPtr_ = fvc::grad(U).ptr(); } else From 8d2e5df846628e68f36c4d1b992fac6463bad723 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 13 Apr 2010 16:46:35 +0100 Subject: [PATCH 3/4] ENH: Allow pointPatchFields derived from constrained pointPatchField types. --- .../basicSymmetryPointPatchField.H | 7 ++ .../constraint/cyclic/cyclicPointPatchField.H | 8 ++ .../constraint/empty/emptyPointPatchField.H | 11 +++ .../processor/processorPointPatchField.H | 9 +++ .../constraint/wedge/wedgePointPatchField.H | 8 ++ .../pointPatchField/newPointPatchField.C | 76 +++++++++++++------ .../pointPatchField/pointPatchField.H | 8 +- .../constraint/cyclic/cyclicPointPatch.H | 6 ++ .../constraint/empty/emptyPointPatch.H | 6 ++ .../processor/processorPointPatch.H | 6 ++ .../constraint/symmetry/symmetryPointPatch.H | 6 ++ .../constraint/wedge/wedgePointPatch.H | 6 ++ .../pointPatches/pointPatch/pointPatch.H | 6 ++ 13 files changed, 137 insertions(+), 26 deletions(-) diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H index 445a67281f..5d77b05804 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H @@ -36,6 +36,7 @@ SourceFiles #define basicSymmetryPointPatchField_H #include "pointPatchField.H" +#include "symmetryPointPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -120,6 +121,12 @@ public: // Evaluation functions + //- Return the constraint type this pointPatchField implements + virtual const word& constraintType() const + { + return symmetryPointPatch::typeName; + } + //- Update the patch field virtual void evaluate ( diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H index 14785b36eb..72eabdaaf9 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H @@ -127,6 +127,14 @@ public: // Member functions + //- Constraint handling + + //- Return the constraint type this pointPatchField implements + virtual const word& constraintType() const + { + return cyclicPointPatch::typeName; + } + //- Cyclic coupled interface functions //- Does the patch field perform the transfromation diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H index cc578731a0..bb58e0eeea 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H @@ -119,6 +119,17 @@ public: ) ); } + + // Member functions + + //- Constraint handling + + //- Return the constraint type this pointPatchField implements + virtual const word& constraintType() const + { + return type(); + } + }; diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H index 17bcfc1cb8..7f6f7b7173 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H @@ -159,6 +159,15 @@ public: } + //- Constraint handling + + //- Return the constraint type this pointPatchField implements + virtual const word& constraintType() const + { + return type(); + } + + // Evaluation functions //- Evaluate the patch field diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H index 5f01f592e5..8c62f3e47b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H @@ -122,6 +122,14 @@ public: // Member functions + //- Constraint handling + + //- Return the constraint type this pointPatchField implements + virtual const word& constraintType() const + { + return type(); + } + // Evaluation functions //- Update the patch field diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/newPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/newPointPatchField.C index c77236f80d..b14fbeac8f 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/newPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/newPointPatchField.C @@ -50,7 +50,7 @@ Foam::autoPtr > Foam::pointPatchField::New ( "PointPatchField::New" "(const word&, const pointPatch&, const Field&)" - ) << "Unknown patchTypefield type " + ) << "Unknown patchFieldType type " << patchFieldType << endl << endl << "Valid patchField types are :" << endl @@ -58,16 +58,32 @@ Foam::autoPtr > Foam::pointPatchField::New << exit(FatalError); } - typename pointPatchConstructorTable::iterator patchTypeCstrIter = - pointPatchConstructorTablePtr_->find(p.type()); + autoPtr > pfPtr(cstrIter()(p, iF)); - if (patchTypeCstrIter != pointPatchConstructorTablePtr_->end()) + if (pfPtr().constraintType() == p.constraintType()) { - return autoPtr >(patchTypeCstrIter()(p, iF)); + // Compatible (constraint-wise) with the patch type + return pfPtr; } else { - return autoPtr >(cstrIter()(p, iF)); + // Use default constraint type + typename pointPatchConstructorTable::iterator patchTypeCstrIter = + pointPatchConstructorTablePtr_->find(p.type()); + + if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "PointPatchField::New" + "(const word&, const pointPatch&, const Field&)" + ) << "inconsistent patch and patchField types for \n" + << " patch type " << p.type() + << " and patchField type " << patchFieldType + << exit(FatalError); + } + + return patchTypeCstrIter()(p, iF); } } @@ -115,34 +131,44 @@ Foam::autoPtr > Foam::pointPatchField::New } } + // Construct (but not necesarily returned) + autoPtr > pfPtr(cstrIter()(p, iF, dict)); + if ( !dict.found("patchType") || word(dict.lookup("patchType")) != p.type() ) { - typename dictionaryConstructorTable::iterator patchTypeCstrIter - = dictionaryConstructorTablePtr_->find(p.type()); - - if - ( - patchTypeCstrIter != dictionaryConstructorTablePtr_->end() - && patchTypeCstrIter() != cstrIter() - ) + if (pfPtr().constraintType() == p.constraintType()) { - FatalIOErrorIn - ( - "PointPatchFieldconst pointPatch&, " - "const Field&, const dictionary&)", - dict - ) << "inconsistent patch and patchField types for \n" - << " patch type " << p.type() - << " and patchField type " << patchFieldType - << exit(FatalIOError); + // Compatible (constraint-wise) with the patch type + return pfPtr; + } + else + { + // Use default constraint type + typename dictionaryConstructorTable::iterator patchTypeCstrIter + = dictionaryConstructorTablePtr_->find(p.type()); + + if (patchTypeCstrIter == pointPatchConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "PointPatchFieldconst pointPatch&, " + "const Field&, const dictionary&)", + dict + ) << "inconsistent patch and patchField types for \n" + << " patch type " << p.type() + << " and patchField type " << patchFieldType + << exit(FatalIOError); + } + + return patchTypeCstrIter()(p, iF, dict); } } - return autoPtr >(cstrIter()(p, iF, dict)); + return cstrIter()(p, iF, dict); } @@ -185,7 +211,7 @@ Foam::autoPtr > Foam::pointPatchField::New << exit(FatalError); } - return autoPtr >(cstrIter()(ptf, p, iF, pfMapper)); + return cstrIter()(ptf, p, iF, pfMapper); } diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H index ae6ce5eb93..297b1c5370 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H @@ -337,9 +337,15 @@ public: const Field& pF ) const; - //- Return the type of the calculated for of pointPatchField + //- Return the type of the calculated form of pointPatchField static const word& calculatedType(); + //- Return the constraint type this pointPatchField implements. + virtual const word& constraintType() const + { + return word::null; + } + // Mapping functions diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H index 91fdb1cf84..df11e9cf3e 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H @@ -114,6 +114,12 @@ public: // Access + //- Return the constraint type this pointPatch implements. + virtual const word& constraintType() const + { + return type(); + } + //- Return the underlying cyclicPolyPatch const cyclicPolyPatch& cyclicPatch() const { diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/empty/emptyPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/empty/emptyPointPatch.H index c0450f1ce7..1352a71aa3 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/empty/emptyPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/empty/emptyPointPatch.H @@ -73,6 +73,12 @@ public: // Member Functions + //- Return the constraint type this pointPatch implements. + virtual const word& constraintType() const + { + return type(); + } + //- Accumulate the effect of constraint direction of this patch virtual void applyConstraint ( diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H index 9cdb82b2e3..6224e0c947 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H @@ -130,6 +130,12 @@ public: } } + //- Return the constraint type this pointPatch implements. + virtual const word& constraintType() const + { + return type(); + } + //- Return processor number int myProcNo() const { diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.H index 16d66dccf8..cc66f9c505 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.H @@ -73,6 +73,12 @@ public: // Member Functions + //- Return the constraint type this pointPatch implements. + virtual const word& constraintType() const + { + return type(); + } + //- Accumulate the effect of constraint direction of this patch virtual void applyConstraint ( diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/wedge/wedgePointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/wedge/wedgePointPatch.H index 0de34e8661..0841de7f9c 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/wedge/wedgePointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/wedge/wedgePointPatch.H @@ -73,6 +73,12 @@ public: // Member Functions + //- Return the constraint type this pointPatch implements. + virtual const word& constraintType() const + { + return type(); + } + //- Accumulate the effect of constraint direction of this patch virtual void applyConstraint ( diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H index 482c10128f..0bd6842743 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H @@ -158,6 +158,12 @@ public: //- Return point normals virtual const vectorField& pointNormals() const = 0; + //- Return the constraint type this pointPatch implements. + virtual const word& constraintType() const + { + return word::null; + } + //- Accumulate the effect of constraint direction of this patch virtual void applyConstraint ( From 1cdcfd729192c5f049ce286d6b61beda8d1f5ada Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 13 Apr 2010 16:49:18 +0100 Subject: [PATCH 4/4] ENH: new pointPatchField type cyclicSlip. --- src/OpenFOAM/Make/files | 1 + .../cyclicSlip/cyclicSlipPointPatchField.C | 122 ++++++++++++++ .../cyclicSlip/cyclicSlipPointPatchField.H | 154 ++++++++++++++++++ .../cyclicSlip/cyclicSlipPointPatchFields.C | 43 +++++ .../cyclicSlip/cyclicSlipPointPatchFields.H | 49 ++++++ 5 files changed, 369 insertions(+) create mode 100644 src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.C create mode 100644 src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H create mode 100644 src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchFields.C create mode 100644 src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchFields.H diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 17da5aefef..ed23f471d5 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -506,6 +506,7 @@ $(constraintPointPatchFields)/empty/emptyPointPatchFields.C $(constraintPointPatchFields)/symmetry/symmetryPointPatchFields.C $(constraintPointPatchFields)/wedge/wedgePointPatchFields.C $(constraintPointPatchFields)/cyclic/cyclicPointPatchFields.C +$(constraintPointPatchFields)/cyclicSlip/cyclicSlipPointPatchFields.C $(constraintPointPatchFields)/processor/processorPointPatchFields.C derivedPointPatchFields = $(pointPatchFields)/derived diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.C new file mode 100644 index 0000000000..7db347c5a6 --- /dev/null +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.C @@ -0,0 +1,122 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "cyclicSlipPointPatchField.H" +#include "pointConstraint.H" +#include "transformField.H" +#include "symmTransformField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +cyclicSlipPointPatchField::cyclicSlipPointPatchField +( + const pointPatch& p, + const DimensionedField& iF +) +: + cyclicPointPatchField(p, iF) +{} + + +template +cyclicSlipPointPatchField::cyclicSlipPointPatchField +( + const pointPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + cyclicPointPatchField(p, iF, dict) +{} + + +template +cyclicSlipPointPatchField::cyclicSlipPointPatchField +( + const cyclicSlipPointPatchField& ptf, + const pointPatch& p, + const DimensionedField& iF, + const pointPatchFieldMapper& mapper +) +: + cyclicPointPatchField(ptf, p, iF, mapper) +{} + + +template +cyclicSlipPointPatchField::cyclicSlipPointPatchField +( + const cyclicSlipPointPatchField& ptf, + const DimensionedField& iF +) +: + cyclicPointPatchField(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void cyclicSlipPointPatchField::evaluate(const Pstream::commsTypes) +{ + const vectorField& nHat = this->patch().pointNormals(); + + tmp > tvalues = + ( + ( + this->patchInternalField() + + transform(I - 2.0*sqr(nHat), this->patchInternalField()) + )/2.0 + ); + + // Get internal field to insert values into + Field& iF = const_cast&>(this->internalField()); + + setInInternalField(iF, tvalues()); +} + + +template +void cyclicSlipPointPatchField::applyConstraint +( + const label pointi, + pointConstraint& pc +) const +{ + pc.applyConstraint(this->patch().pointNormals()[pointi]); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H new file mode 100644 index 0000000000..52c59ab1b6 --- /dev/null +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H @@ -0,0 +1,154 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::cyclicSlipPointPatchField + +Description + Specialisation of cyclic that constrains to the patch + +SourceFiles + cyclicSlipPointPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicSlipPointPatchField_H +#define cyclicSlipPointPatchField_H + +#include "cyclicPointPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class cyclicSlipPointPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template +class cyclicSlipPointPatchField +: + public cyclicPointPatchField +{ + +public: + + //- Runtime type information + TypeName("cyclicSlip"); + + + // Constructors + + //- Construct from patch and internal field + cyclicSlipPointPatchField + ( + const pointPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + cyclicSlipPointPatchField + ( + const pointPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given patchField onto a new patch + cyclicSlipPointPatchField + ( + const cyclicSlipPointPatchField&, + const pointPatch&, + const DimensionedField&, + const pointPatchFieldMapper& + ); + + //- Construct and return a clone + virtual autoPtr > clone() const + { + return autoPtr > + ( + new cyclicSlipPointPatchField + ( + *this + ) + ); + } + + //- Construct as copy setting internal field reference + cyclicSlipPointPatchField + ( + const cyclicSlipPointPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual autoPtr > clone + ( + const DimensionedField& iF + ) const + { + return autoPtr > + ( + new cyclicSlipPointPatchField + ( + *this, iF + ) + ); + } + + + // Member functions + + //- Update the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::blocking + ); + + //- Accumulate the effect of constraint direction of this patch + virtual void applyConstraint + ( + const label pointi, + pointConstraint& + ) const; + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "cyclicSlipPointPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchFields.C b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchFields.C new file mode 100644 index 0000000000..71e09f575f --- /dev/null +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchFields.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "cyclicSlipPointPatchFields.H" +#include "pointPatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makePointPatchFields(cyclicSlip); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchFields.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchFields.H new file mode 100644 index 0000000000..da2196d9be --- /dev/null +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchFields.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicSlipPointPatchFields_H +#define cyclicSlipPointPatchFields_H + +#include "cyclicSlipPointPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePointPatchFieldTypedefs(cyclicSlip); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //