ENH: extrudeMesh: update to new PatchTools api

This commit is contained in:
mattijs
2013-01-28 14:21:23 +00:00
parent 7f0061aef9
commit 26f9bc471b

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -383,12 +383,7 @@ int main(int argc, char *argv[])
// Determine extrudePatch normal
pointField extrudePatchPointNormals
(
PatchTools::pointNormals //calcNormals
(
mesh,
extrudePatch,
meshFaces
)
PatchTools::pointNormals(mesh, extrudePatch)
);
@ -629,12 +624,13 @@ int main(int argc, char *argv[])
const labelListList& layerFaces = layerExtrude.layerFaces();
backPatchFaces.setSize(layerFaces.size());
frontPatchFaces.setSize(layerFaces.size());
forAll(backPatchFaces, i)
forAll(backPatchFaces, patchFaceI)
{
backPatchFaces[i] = layerFaces[i].first();
frontPatchFaces[i] = layerFaces[i].last();
backPatchFaces[patchFaceI] = layerFaces[patchFaceI].first();
frontPatchFaces[patchFaceI] = layerFaces[patchFaceI].last();
}
// Create dummy fvSchemes, fvSolution
createDummyFvMeshFiles(mesh, regionDir);
@ -654,6 +650,13 @@ int main(int argc, char *argv[])
mesh
);
layerExtrude.updateMesh
(
map(),
identity(extrudePatch.size()),
identity(extrudePatch.nPoints())
);
// Calculate face labels for front and back.
frontPatchFaces = renumber
(