diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files
index 0016b235f1..aebfd27178 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/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/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
+
+// ************************************************************************* //
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 b5474e46d7..cc1760a7b2 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H
@@ -158,6 +158,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/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
index 8961fbb9db..98604bb4bf 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
@@ -336,9 +336,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/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C
index c77236f80d..b14fbeac8f 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.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/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H
index 4b7090ae43..2682c194c8 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H
+++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H
@@ -113,6 +113,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 ef30fb27f2..1654b58d4b 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H
+++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H
@@ -129,6 +129,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 76f04d1d12..e2e01c4553 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H
+++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/pointPatch/pointPatch.H
@@ -157,6 +157,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
(
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();
}
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