1 //--------------------------------------------------//
3 //--------------------------------------------------//
4 // if(min(J.internalField()) > 0)
6 Info << "Moving mesh using least squares interpolation" << endl;
8 leastSquaresVolPointInterpolation pointInterpolation(mesh);
11 pointMesh pMesh(mesh);
15 pMesh.boundary().size(),
16 calculatedFvPatchVectorField::typeName
19 pointVectorField pointDU
28 dimensionedVector("zero", dimLength, vector::zero),
32 pointInterpolation.interpolate(DU, pointDU);
34 const vectorField& pointDUI =
35 pointDU.internalField();
38 vectorField newPoints = mesh.allPoints();
40 forAll (pointDUI, pointI)
42 newPoints[pointI] += pointDUI[pointI];
45 twoDPointCorrector twoDCorrector(mesh);
46 twoDCorrector.correctPoints(newPoints);
47 mesh.movePoints(newPoints);
53 // FatalErrorIn(args.executable())
54 // << "Negative Jacobian"
55 // << exit(FatalError);