lib/src/EBTools/EBIndexSpace.cpp
// Undo everything done by "setAllConnectedVoFs" - this is needed if the total
// volume fraction found by "setAllConnectedVoFs" is 0.0 because then this
// connected component will be ignored.
Undo everything done by "setAllConnectedVoFs" - this is needed if the total
volume fraction found by "setAllConnectedVoFs" is 0.0 because then this
connected component will be ignored.
Undo everything done by " setAllConnectedVoFs " - this is needed if the total volume fraction found by " setAllConnectedVoFs " is 0 . 0 because then this connected component will be ignored .
void EBIndexSpace::resetAllConnectedVoFs(EBCellFAB&          a_curEBCellFAB,
                                         const EBGraph&      a_curEBGraph,
                                         const EBISBox&      a_curEBISBox,
                                         const VolIndex&     a_curVoF,
                                         const VolIndex&     a_lastVoF)
{
  int comp = 0;
  a_curEBCellFAB(a_curVoF,comp) = -1.0;
  for (int idir = 0; idir < SpaceDim; idir++)
  {
    for (SideIterator sit; sit.ok(); ++sit)
    {
      const Side::LoHiSide& curSide = sit();
      const Vector<FaceIndex> faces = a_curEBISBox.getFaces(a_curVoF,idir,curSide);
      for (int iface = 0; iface < faces.size(); iface++)
      {
        const FaceIndex& face = faces[iface];
        const VolIndex& nextVoF = face.getVoF(curSide);
        if (nextVoF.cellIndex() >= 0 && nextVoF != a_lastVoF)
        {
          resetAllConnectedVoFs(a_curEBCellFAB,
                                a_curEBGraph,
                                a_curEBISBox,
                                nextVoF,
                                a_curVoF);
        }
      }
    }
  }
}
void EBIndexSpace :: resetAllConnectedVoFs ( EBCellFAB & a_curEBCellFAB , const EBGraph & a_curEBGraph , const EBISBox & a_curEBISBox , const VolIndex & a_curVoF , const VolIndex & a_lastVoF ) { int comp = 0 ; a_curEBCellFAB ( a_curVoF , comp ) = -1.0 ; for ( int idir = 0 ; idir < SpaceDim ; idir ++ ) { for ( SideIterator sit ; sit . ok ( ) ; ++ sit ) { const Side :: LoHiSide & curSide = sit ( ) ; const Vector < FaceIndex > faces = a_curEBISBox . getFaces ( a_curVoF , idir , curSide ) ; for ( int iface = 0 ; iface < faces . size ( ) ; iface ++ ) { const FaceIndex & face = faces [ iface ] ; const VolIndex & nextVoF = face . getVoF ( curSide ) ; if ( nextVoF . cellIndex ( ) >= 0 && nextVoF != a_lastVoF ) { resetAllConnectedVoFs ( a_curEBCellFAB , a_curEBGraph , a_curEBISBox , nextVoF , a_curVoF ) ; } } } } }
Undo everything done by "setAllConnectedVoFs" - this is needed if the total
volume fraction found by "setAllConnectedVoFs" is 0.0 because then this
connected component will be ignored.
Undo everything done by " setAllConnectedVoFs " - this is needed if the total volume fraction found by " setAllConnectedVoFs " is 0 . 0 because then this connected component will be ignored .