From 268bb07d15d8d2de5df531f7702df54da05f15ad Mon Sep 17 00:00:00 2001 From: Dario Zivkovic Date: Sun, 28 Oct 2018 15:25:36 +0100 Subject: [PATCH] Bugfix: added mapping methods to point patch vector fields that have pointField 'p0_' member. --- ...rOscillatingDisplacementPointPatchVectorField.C | 25 +++++++++++++++++++++- ...rOscillatingDisplacementPointPatchVectorField.H | 16 ++++++++++++++ ...gularOscillatingVelocityPointPatchVectorField.C | 25 +++++++++++++++++++++- ...gularOscillatingVelocityPointPatchVectorField.H | 16 ++++++++++++++ .../oscillatingVelocityPointPatchVectorField.C | 25 +++++++++++++++++++++- .../oscillatingVelocityPointPatchVectorField.H | 16 ++++++++++++++ 6 files changed, 120 insertions(+), 3 deletions(-) diff --git a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C index 540a5d836..3fd847bcd 100644 --- a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C +++ b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C @@ -99,7 +99,7 @@ angularOscillatingDisplacementPointPatchVectorField angle0_(ptf.angle0_), amplitude_(ptf.amplitude_), omega_(ptf.omega_), - p0_(ptf.p0_) + p0_(ptf.p0_, mapper) {} @@ -122,6 +122,29 @@ angularOscillatingDisplacementPointPatchVectorField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +void angularOscillatingDisplacementPointPatchVectorField::autoMap +( + const PointPatchFieldMapper& m +) +{ + fixedValuePointPatchVectorField::autoMap(m); + p0_.autoMap(m); +} + +void angularOscillatingDisplacementPointPatchVectorField::rmap +( + const PointPatchField + & ptf, + const labelList& addr +) +{ + const angularOscillatingDisplacementPointPatchVectorField& aODptf = + refCast(ptf); + + fixedValuePointPatchVectorField::rmap(aODptf, addr); + p0_.rmap(aODptf.p0_, addr); +} + void angularOscillatingDisplacementPointPatchVectorField::updateCoeffs() { if (this->updated()) diff --git a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H index 5e91e06b6..f40b0d6d1 100644 --- a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H +++ b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H @@ -138,6 +138,22 @@ public: // Member functions + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + void autoMap + ( + const PointPatchFieldMapper& + ); + + //- Reverse map the given pointPatchField onto this pointPatchField + void rmap + ( + const PointPatchField + &, + const labelList& + ); + // Evaluation functions //- Update the coefficients associated with the patch field diff --git a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C index 0ba8a8711..82501c621 100644 --- a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C +++ b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C @@ -99,7 +99,7 @@ angularOscillatingVelocityPointPatchVectorField angle0_(ptf.angle0_), amplitude_(ptf.amplitude_), omega_(ptf.omega_), - p0_(ptf.p0_) + p0_(ptf.p0_, mapper) {} @@ -122,6 +122,29 @@ angularOscillatingVelocityPointPatchVectorField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +void angularOscillatingVelocityPointPatchVectorField::autoMap +( + const PointPatchFieldMapper& m +) +{ + fixedValuePointPatchVectorField::autoMap(m); + p0_.autoMap(m); +} + +void angularOscillatingVelocityPointPatchVectorField::rmap +( + const PointPatchField + & ptf, + const labelList& addr +) +{ + const angularOscillatingVelocityPointPatchVectorField& aOVptf = + refCast(ptf); + + fixedValuePointPatchVectorField::rmap(aOVptf, addr); + p0_.rmap(aOVptf.p0_, addr); +} + void angularOscillatingVelocityPointPatchVectorField::updateCoeffs() { if (this->updated()) diff --git a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H index 8c7054614..eae094f9c 100644 --- a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H +++ b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H @@ -130,6 +130,22 @@ public: // Member functions + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + void autoMap + ( + const PointPatchFieldMapper& + ); + + //- Reverse map the given pointPatchField onto this pointPatchField + void rmap + ( + const PointPatchField + &, + const labelList& + ); + // Evaluation functions //- Update the coefficients associated with the patch field diff --git a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C index aa0fa36d6..b7d5d03e3 100644 --- a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C +++ b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C @@ -90,7 +90,7 @@ oscillatingVelocityPointPatchVectorField fixedValuePointPatchVectorField(ptf, p, iF, mapper), amplitude_(ptf.amplitude_), omega_(ptf.omega_), - p0_(ptf.p0_) + p0_(ptf.p0_, mapper) {} @@ -110,6 +110,29 @@ oscillatingVelocityPointPatchVectorField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +void oscillatingVelocityPointPatchVectorField::autoMap +( + const PointPatchFieldMapper& m +) +{ + fixedValuePointPatchVectorField::autoMap(m); + p0_.autoMap(m); +} + +void oscillatingVelocityPointPatchVectorField::rmap +( + const PointPatchField + & ptf, + const labelList& addr +) +{ + const oscillatingVelocityPointPatchVectorField& oVptf = + refCast(ptf); + + fixedValuePointPatchVectorField::rmap(oVptf, addr); + p0_.rmap(oVptf.p0_, addr); +} + void oscillatingVelocityPointPatchVectorField::updateCoeffs() { if (this->updated()) diff --git a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H index 3dc0be99a..6cd44e071 100644 --- a/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H +++ b/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H @@ -128,6 +128,22 @@ public: // Member functions + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + void autoMap + ( + const PointPatchFieldMapper& + ); + + //- Reverse map the given pointPatchField onto this pointPatchField + void rmap + ( + const PointPatchField + &, + const labelList& + ); + // Evaluation functions //- Update the coefficients associated with the patch field -- 2.11.4.GIT