ENH: Test-hexref8: added pointFields

This commit is contained in:
mattijs
2013-12-20 13:20:50 +00:00
parent 9fda4249f0
commit 1186a190aa

View File

@ -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());