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/elasticContactSolidFoam/moveSolidMesh.H
2013-07-18 10:15:54 +02:00

30 lines
672 B
C

{
// Create point interpolation
volPointInterpolation pointInterpolation(mesh);
// Calculate mesh points displacement
pointVectorField pointU = pointInterpolation.interpolate(U);
// const vectorField& pointUI = pointU.internalField();
vectorField pointUI = pointU.internalField();
// Move mesh
vectorField newPoints = mesh.allPoints();
forAll (pointUI, pointI)
{
newPoints[pointI] += pointUI[pointI];
}
# include "correctGlobalFaceZoneMesh.H"
twoDPointCorrector twoDCorrector(mesh);
twoDCorrector.correctPoints(newPoints);
mesh.movePoints(newPoints);
// pMesh.movePoints(newPoints);
mesh.V00();
mesh.moving(false);
}