Skip to content
Snippets Groups Projects
Commit 1186a190 authored by mattijs's avatar mattijs
Browse files

ENH: Test-hexref8: added pointFields

parent 9fda4249
Branches
Tags
No related merge requests found
...@@ -34,11 +34,13 @@ Description ...@@ -34,11 +34,13 @@ Description
#include "Time.H" #include "Time.H"
#include "volFields.H" #include "volFields.H"
#include "surfaceFields.H" #include "surfaceFields.H"
#include "pointFields.H"
#include "hexRef8.H" #include "hexRef8.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "polyTopoChange.H" #include "polyTopoChange.H"
#include "Random.H" #include "Random.H"
#include "zeroGradientFvPatchFields.H" #include "zeroGradientFvPatchFields.H"
#include "calculatedPointPatchFields.H"
#include "fvcDiv.H" #include "fvcDiv.H"
using namespace Foam; using namespace Foam;
...@@ -144,6 +146,29 @@ int main(int argc, char *argv[]) ...@@ -144,6 +146,29 @@ int main(int argc, char *argv[])
surfaceOne.write(); 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 // Force allocation of V. Important for any mesh changes since otherwise
// old time volumes are not stored // old time volumes are not stored
const scalar totalVol = gSum(mesh.V()); const scalar totalVol = gSum(mesh.V());
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment