mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Test-hexref8: added pointFields
This commit is contained in:
@ -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[])
|
|||||||
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());
|
||||||
|
|||||||
Reference in New Issue
Block a user