Skip to content
Snippets Groups Projects
Commit b70b0bb5 authored by Andrew Heather's avatar Andrew Heather Committed by Mark OLESEN
Browse files

ENH: Porosity model - output cellZone bounds in the local co-ordinate system. Fixes #300

parent e661d238
No related merge requests found
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -122,6 +122,37 @@ Foam::porosityModel::porosityModel
<< "cannot find porous cellZone " << zoneName_
<< exit(FatalError);
}
Info<< incrIndent << indent << coordSys_ << decrIndent << endl;
const pointField& points = mesh_.points();
const cellList& cells = mesh_.cells();
const faceList& faces = mesh_.faces();
DynamicList<point> localPoints;
forAll(cellZoneIDs_, zoneI)
{
const cellZone& cZone = mesh_.cellZones()[cellZoneIDs_[zoneI]];
localPoints.setCapacity(10*cells.size());
forAll(cZone, i)
{
const label cellI = cZone[i];
const cell& c = mesh_.cells()[cellI];
const pointField cellPoints(c.points(faces, points));
forAll(cellPoints, pointI)
{
const point& pt = cellPoints[pointI];
localPoints.append(coordSys_.localPosition(pt));
}
}
boundBox bb(localPoints, true);
Info<< " local bounds: " << bb << endl;
localPoints.clear();
}
}
......
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