49int main(
int argc,
char *argv[])
51 timeSelector::addOptions();
59 #include "createFields.H"
66 for (
const fvPatch& patch :
mesh.boundary())
71 if (!isA<coupledFvPatch>(patch) && !isA<emptyFvPatch>(patch))
77 const labelList& pointFaces = patchPointFaces[ppI];
80 const label& localFaceIndex = pointFaces[pfI];
81 pointNormals[meshPoints[ppI]] += nf[localFaceIndex];
87 syncTools::syncPointList
89 mesh, pointNormals, plusEqOp<vector>(), vector::zero
91 pointNormals /=
mag(pointNormals) + VSMALL;
95 runTime.setTime(timeDirs[timeI], timeI);
99 const pointMesh& pMesh(pointMesh::New(
mesh));
106 "normalDisplacement",
130 Info<<
"Calculating cumulative mesh movement for time "
136 const polyPatch&
patch =
mesh.boundaryMesh()[pI];
140 label pointI = localPoints[ppI];
141 normalDisplacement[pointI] =
142 (meshPoints[pointI] -
points0[pointI])
143 & pointNormals[pointI];
146 normalDisplacement.write();
148 displacement.primitiveFieldRef() = meshPoints -
points0;
149 displacement.write();
153 mesh.time().printExecutionTime(Info);
const std::string patch
OpenFOAM patch number as a std::string.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
vectorField pointField
pointField is a vectorField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< instant > instantList
List of instants.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
List< labelList > labelListList
A List of labelList.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, false)))