Added support for patch manipulation of pointFields

e.g. during createBaffles

Added a test application and test case for meshTools: test/fvMeshTools

Patch contributed by Mattijs Janssens
This commit is contained in:
Henry Weller
2019-04-12 18:44:32 +01:00
parent 181f110a2f
commit 3cbb932be8
49 changed files with 2296 additions and 779 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -254,7 +254,7 @@ template<class GeoField>
void readFields
(
const boolList& haveMesh,
const fvMesh& mesh,
const typename GeoField::Mesh& mesh,
const autoPtr<fvMeshSubset>& subsetterPtr,
IOobjectList& allObjects,
PtrList<GeoField>& fields
@ -335,8 +335,8 @@ void readFields
IOobject
(
name,
mesh.time().timeName(),
mesh,
mesh.thisDb().time().timeName(),
mesh.thisDb(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
@ -723,6 +723,60 @@ int main(int argc, char *argv[])
);
// pointFields
pointMesh& pMesh =
const_cast<pointMesh&>(pointMesh::New(mesh));
PtrList<pointScalarField> pointScalarFields;
readFields
(
haveMesh,
pMesh,
subsetterPtr,
objects,
pointScalarFields
);
PtrList<pointVectorField> pointVectorFields;
readFields
(
haveMesh,
pMesh,
subsetterPtr,
objects,
pointVectorFields
);
PtrList<pointSphericalTensorField> pointSphereTensorFields;
readFields
(
haveMesh,
pMesh,
subsetterPtr,
objects,
pointSphereTensorFields
);
PtrList<pointSymmTensorField> pointSymmTensorFields;
readFields
(
haveMesh,
pMesh,
subsetterPtr,
objects,
pointSymmTensorFields
);
PtrList<pointTensorField> pointTensorFields;
readFields
(
haveMesh,
pMesh,
subsetterPtr,
objects,
pointTensorFields
);
// Debugging: Create additional volField that will be mapped.
// Used to test correctness of mapping
// volVectorField mapCc("mapCc", 1*mesh.C());