Skip to content
Snippets Groups Projects
Commit 821f43c9 authored by mattijs's avatar mattijs
Browse files

BUG: solidBodyMotionFvMesh: zero-cellZone processor would decide to move all points

parent 458e53d9
Branches
Tags
No related merge requests found
...@@ -74,6 +74,7 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io) ...@@ -74,6 +74,7 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
false false
) )
), ),
zoneID_(-1),
pointIDs_() pointIDs_()
{ {
word cellZoneName = word cellZoneName =
...@@ -81,11 +82,11 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io) ...@@ -81,11 +82,11 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
if (cellZoneName != "none") if (cellZoneName != "none")
{ {
label zoneI = cellZones().findZoneID(cellZoneName); zoneID_ = cellZones().findZoneID(cellZoneName);
Info<< "Applying solid body motion to cellZone " << cellZoneName Info<< "Applying solid body motion to cellZone " << cellZoneName
<< endl; << endl;
const cellZone& cz = cellZones()[zoneI]; const cellZone& cz = cellZones()[zoneID_];
// collect point IDs of points in cell zone // collect point IDs of points in cell zone
...@@ -139,7 +140,7 @@ bool Foam::solidBodyMotionFvMesh::update() ...@@ -139,7 +140,7 @@ bool Foam::solidBodyMotionFvMesh::update()
{ {
static bool hasWarned = false; static bool hasWarned = false;
if (pointIDs_.size() > 0) if (zoneID_ != -1)
{ {
pointField transformedPts(undisplacedPoints_); pointField transformedPts(undisplacedPoints_);
......
...@@ -57,7 +57,7 @@ class solidBodyMotionFvMesh ...@@ -57,7 +57,7 @@ class solidBodyMotionFvMesh
// Private data // Private data
//- Dictionary of motion control parameters //- Dictionary of motion control parameters
dictionary dynamicMeshCoeffs_; const dictionary dynamicMeshCoeffs_;
//- The motion control function //- The motion control function
autoPtr<solidBodyMotionFunction> SBMFPtr_; autoPtr<solidBodyMotionFunction> SBMFPtr_;
...@@ -65,6 +65,9 @@ class solidBodyMotionFvMesh ...@@ -65,6 +65,9 @@ class solidBodyMotionFvMesh
//- The reference points which are transformed //- The reference points which are transformed
pointIOField undisplacedPoints_; pointIOField undisplacedPoints_;
//- Specified cellZone or -1 for whole-body
label zoneID_;
//- Points to move when cell zone is supplied //- Points to move when cell zone is supplied
labelList pointIDs_; labelList pointIDs_;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment