This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/solidMechanics/elasticContactIncrSolidFoam/moveSolidMesh.H

29 lines
627 B
C
Raw Normal View History

{
2012-09-11 15:42:55 +00:00
//- move mesh for the contact correction
// Create point interpolation
volPointInterpolation pointInterpolation(mesh);
// Calculate mesh points displacement
pointVectorField pointU = pointInterpolation.interpolate(U);
const vectorField& pointUI = pointU.internalField();
2012-09-11 15:42:55 +00:00
// Move mesh
vectorField newPoints = mesh.allPoints();
2012-09-11 15:42:55 +00:00
forAll (pointUI, pointI)
{
newPoints[pointI] += pointUI[pointI];
}
# include "correctGlobalFaceZoneMesh.H"
2012-09-11 15:42:55 +00:00
twoDPointCorrector twoDCorrector(mesh);
twoDCorrector.correctPoints(newPoints);
2012-09-11 15:42:55 +00:00
mesh.movePoints(newPoints);
mesh.V00();
mesh.moving(false);
}