mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: motionSmoother: split off patch consistency
This commit is contained in:
@ -678,34 +678,8 @@ void Foam::motionSmoother::correct()
|
||||
}
|
||||
|
||||
|
||||
void Foam::motionSmoother::setDisplacement(pointField& patchDisp)
|
||||
void Foam::motionSmoother::setDisplacementPatchFields()
|
||||
{
|
||||
// See comment in .H file about shared points.
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if (pp.coupled())
|
||||
{
|
||||
const labelList& meshPoints = pp.meshPoints();
|
||||
|
||||
forAll(meshPoints, i)
|
||||
{
|
||||
displacement_[meshPoints[i]] = vector::zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const labelList& ppMeshPoints = pp_.meshPoints();
|
||||
|
||||
// Set internal point data from displacement on combined patch points.
|
||||
forAll(ppMeshPoints, patchPointI)
|
||||
{
|
||||
displacement_[ppMeshPoints[patchPointI]] = patchDisp[patchPointI];
|
||||
}
|
||||
|
||||
// Adapt the fixedValue bc's (i.e. copy internal point data to
|
||||
// boundaryField for all affected patches)
|
||||
forAll(adaptPatchIDs_, i)
|
||||
@ -765,6 +739,42 @@ void Foam::motionSmoother::setDisplacement(pointField& patchDisp)
|
||||
displacement_.boundaryField()[patchI] ==
|
||||
displacement_.boundaryField()[patchI].patchInternalField();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::motionSmoother::setDisplacement(pointField& patchDisp)
|
||||
{
|
||||
// See comment in .H file about shared points.
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if (pp.coupled())
|
||||
{
|
||||
const labelList& meshPoints = pp.meshPoints();
|
||||
|
||||
forAll(meshPoints, i)
|
||||
{
|
||||
displacement_[meshPoints[i]] = vector::zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const labelList& ppMeshPoints = pp_.meshPoints();
|
||||
|
||||
// Set internal point data from displacement on combined patch points.
|
||||
forAll(ppMeshPoints, patchPointI)
|
||||
{
|
||||
displacement_[ppMeshPoints[patchPointI]] = patchDisp[patchPointI];
|
||||
}
|
||||
|
||||
|
||||
// Adapt the fixedValue bc's (i.e. copy internal point data to
|
||||
// boundaryField for all affected patches)
|
||||
setDisplacementPatchFields();
|
||||
|
||||
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -385,6 +385,10 @@ public:
|
||||
//- Take over existing mesh position.
|
||||
void correct();
|
||||
|
||||
//- Set patch fields on displacement to be consistent with
|
||||
// internal values.
|
||||
void setDisplacementPatchFields();
|
||||
|
||||
//- Set displacement field from displacement on patch points.
|
||||
// Modify provided displacement to be consistent with actual
|
||||
// boundary conditions on displacement. Note: resets the
|
||||
|
||||
Reference in New Issue
Block a user