Skip to content
Snippets Groups Projects
Commit f911344c authored by sergio's avatar sergio
Browse files

Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus

parents 5325af46 c7c2808b
Branches
Tags
No related merge requests found
...@@ -128,30 +128,30 @@ Foam::porosityModel::porosityModel ...@@ -128,30 +128,30 @@ Foam::porosityModel::porosityModel
const pointField& points = mesh_.points(); const pointField& points = mesh_.points();
const cellList& cells = mesh_.cells(); const cellList& cells = mesh_.cells();
const faceList& faces = mesh_.faces(); const faceList& faces = mesh_.faces();
DynamicList<point> localPoints;
forAll(cellZoneIDs_, zoneI) forAll(cellZoneIDs_, zoneI)
{ {
const cellZone& cZone = mesh_.cellZones()[cellZoneIDs_[zoneI]]; const cellZone& cZone = mesh_.cellZones()[cellZoneIDs_[zoneI]];
localPoints.setCapacity(10*cells.size()); point bbMin = point::max;
point bbMax = point::min;
forAll(cZone, i) forAll(cZone, i)
{ {
const label cellI = cZone[i]; const label cellI = cZone[i];
const cell& c = mesh_.cells()[cellI]; const cell& c = cells[cellI];
const pointField cellPoints(c.points(faces, points)); const pointField cellPoints(c.points(faces, points));
forAll(cellPoints, pointI) forAll(cellPoints, pointI)
{ {
const point& pt = cellPoints[pointI]; const point pt = coordSys_.localPosition(cellPoints[pointI]);
localPoints.append(coordSys_.localPosition(pt)); bbMin = min(bbMin, pt);
bbMax = max(bbMax, pt);
} }
} }
boundBox bb(localPoints, true); reduce(bbMin, minOp<point>());
reduce(bbMax, maxOp<point>());
Info<< " local bounds: " << bb << endl; Info<< " local bounds: " << (bbMax - bbMin) << nl << endl;
localPoints.clear();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment