49 int 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);
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);
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
const dimensionSet dimless
Dimensionless.
List< labelList > labelListList
List of labelList.
#define forAll(list, i)
Loop across all elements in list.
vectorField pointField
pointField is a vectorField.
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER)))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const std::string patch
OpenFOAM patch number as a std::string.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< label > labelList
A List of labels.
List< instant > instantList
List of instants.
Foam::argList args(argc, argv)
static constexpr const zero Zero
Global zero (0)