Added load balance switch to topoChanger
This commit is contained in:
parent
d9e45cb58c
commit
faf418d2fd
2 changed files with 14 additions and 1 deletions
|
@ -65,7 +65,8 @@ immersedBoundaryDynamicRefineSolidBodyMotionFvMesh(const IOobject& io)
|
||||||
// subdictionary in dynamicMeshDict (see dynamicPolyRefinementFvMesh
|
// subdictionary in dynamicMeshDict (see dynamicPolyRefinementFvMesh
|
||||||
// constructor). VV, 17/May/2018.
|
// constructor). VV, 17/May/2018.
|
||||||
dynamicPolyRefinementFvMesh(io, typeName),
|
dynamicPolyRefinementFvMesh(io, typeName),
|
||||||
ibMotions_()
|
ibMotions_(),
|
||||||
|
loadBalance_(refinementDict().lookup("loadBalance"))
|
||||||
{
|
{
|
||||||
// Read Immersed Boundary motion functions from base class dictionary
|
// Read Immersed Boundary motion functions from base class dictionary
|
||||||
PtrList<entry> motionDicts(refinementDict().lookup("motionFunctions"));
|
PtrList<entry> motionDicts(refinementDict().lookup("motionFunctions"));
|
||||||
|
@ -85,6 +86,7 @@ immersedBoundaryDynamicRefineSolidBodyMotionFvMesh(const IOobject& io)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,8 +119,16 @@ bool immersedBoundaryDynamicRefineSolidBodyMotionFvMesh::update()
|
||||||
ibMotions_[ibI].movePoints();
|
ibMotions_[ibI].movePoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Refine the mesh
|
||||||
bool hasChanged = dynamicPolyRefinementFvMesh::update();
|
bool hasChanged = dynamicPolyRefinementFvMesh::update();
|
||||||
|
|
||||||
|
// Load balance
|
||||||
|
if (loadBalance_)
|
||||||
|
{
|
||||||
|
hasChanged = loadBalance(refinementDict());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// If the background mesh has not changed, execute dummy mesh sync
|
// If the background mesh has not changed, execute dummy mesh sync
|
||||||
// and mesh motion to re-calculate immersed boundary parameters,
|
// and mesh motion to re-calculate immersed boundary parameters,
|
||||||
// since the immersed boundary has been moved
|
// since the immersed boundary has been moved
|
||||||
|
|
|
@ -67,6 +67,9 @@ class immersedBoundaryDynamicRefineSolidBodyMotionFvMesh
|
||||||
//- Immersed boundary motion control function
|
//- Immersed boundary motion control function
|
||||||
PtrList<movingImmersedBoundary> ibMotions_;
|
PtrList<movingImmersedBoundary> ibMotions_;
|
||||||
|
|
||||||
|
//- Load balance
|
||||||
|
Switch loadBalance_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
|
Reference in a new issue