mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: foamyHexMesh: Split location of infinite cells and processor boundary cells
This commit is contained in:
@ -254,31 +254,47 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
|
|||||||
/Pstream::nProcs()
|
/Pstream::nProcs()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
std::list<Cell_handle> infinite_cells;
|
||||||
|
Triangulation::incident_cells
|
||||||
|
(
|
||||||
|
Triangulation::infinite_vertex(),
|
||||||
|
std::back_inserter(infinite_cells)
|
||||||
|
);
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
All_cells_iterator cit = Triangulation::all_cells_begin();
|
typename std::list<Cell_handle>::iterator vcit = infinite_cells.begin();
|
||||||
cit != Triangulation::all_cells_end();
|
vcit != infinite_cells.end();
|
||||||
|
++vcit
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Cell_handle cit = *vcit;
|
||||||
|
|
||||||
|
// Index of infinite vertex in this cell.
|
||||||
|
int i = cit->index(Triangulation::infinite_vertex());
|
||||||
|
|
||||||
|
Cell_handle c = cit->neighbor(i);
|
||||||
|
|
||||||
|
if (c->unassigned())
|
||||||
|
{
|
||||||
|
c->cellIndex() = this->getNewCellIndex();
|
||||||
|
|
||||||
|
if (checkProcBoundaryCell(c, circumsphereOverlaps))
|
||||||
|
{
|
||||||
|
cellToCheck.insert(c->cellIndex());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for
|
||||||
|
(
|
||||||
|
Finite_cells_iterator cit = Triangulation::finite_cells_begin();
|
||||||
|
cit != Triangulation::finite_cells_end();
|
||||||
++cit
|
++cit
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (Triangulation::is_infinite(cit))
|
if (cit->parallelDualVertex())
|
||||||
{
|
|
||||||
// Index of infinite vertex in this cell.
|
|
||||||
int i = cit->index(Triangulation::infinite_vertex());
|
|
||||||
|
|
||||||
Cell_handle c = cit->neighbor(i);
|
|
||||||
|
|
||||||
if (c->unassigned())
|
|
||||||
{
|
|
||||||
c->cellIndex() = this->getNewCellIndex();
|
|
||||||
|
|
||||||
if (checkProcBoundaryCell(c, circumsphereOverlaps))
|
|
||||||
{
|
|
||||||
cellToCheck.insert(c->cellIndex());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (cit->parallelDualVertex())
|
|
||||||
{
|
{
|
||||||
if (cit->unassigned())
|
if (cit->unassigned())
|
||||||
{
|
{
|
||||||
@ -315,12 +331,20 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkProcBoundaryCell
|
if
|
||||||
(
|
(
|
||||||
citNeighbor,
|
checkProcBoundaryCell
|
||||||
circumsphereOverlaps
|
(
|
||||||
);
|
citNeighbor,
|
||||||
|
circumsphereOverlaps
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
cellToCheck.insert(citNeighbor->cellIndex());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cellToCheck.unset(cit->cellIndex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -521,7 +545,6 @@ Foam::label Foam::DistributedDelaunayMesh<Triangulation>::referVertices
|
|||||||
<< originalParallelVertices[vI].procIndex()
|
<< originalParallelVertices[vI].procIndex()
|
||||||
<< " " << originalParallelVertices[vI].index() << endl;
|
<< " " << originalParallelVertices[vI].index() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user