diff --git a/applications/test/hexRef8/Test-hexRef8.C b/applications/test/hexRef8/Test-hexRef8.C index 67477aae4468087f0e76eae15fde45a98bbeb22f..ed108078095e4f521effd418c37a9c448e37f379 100644 --- a/applications/test/hexRef8/Test-hexRef8.C +++ b/applications/test/hexRef8/Test-hexRef8.C @@ -34,11 +34,13 @@ Description #include "Time.H" #include "volFields.H" #include "surfaceFields.H" +#include "pointFields.H" #include "hexRef8.H" #include "mapPolyMesh.H" #include "polyTopoChange.H" #include "Random.H" #include "zeroGradientFvPatchFields.H" +#include "calculatedPointPatchFields.H" #include "fvcDiv.H" using namespace Foam; @@ -144,6 +146,29 @@ int main(int argc, char *argv[]) surfaceOne.write(); + // Uniform point field + pointScalarField pointX + ( + IOobject + ( + "pointX", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pointMesh::New(mesh), + dimensionedScalar("one", dimless, 1.0), + calculatedPointPatchScalarField::typeName + ); + pointX.internalField() = mesh.points().component(0); + pointX.correctBoundaryConditions(); + Info<< "Writing x-component field " + << pointX.name() << " in " << runTime.timeName() << endl; + pointX.write(); + + + // Force allocation of V. Important for any mesh changes since otherwise // old time volumes are not stored const scalar totalVol = gSum(mesh.V());