46 const Foam::debug::tolerancesSwitch
49 "immersedBoundaryRadiusFactor",
55 const Foam::debug::tolerancesSwitch
58 "immersedBoundaryAngleFactor",
67 "immersedBoundaryMaxCellCellRows",
73 const Foam::debug::tolerancesSwitch
76 "immersedBoundaryDistFactor",
87 InfoIn(
"void immersedBoundaryFvPatch::makeGamma() const")
88 <<
"creating fluid cells indicator "
89 <<
"for immersed boundary" <<
name()
97 FatalErrorIn(
"immersedBoundaryFvPatch::makeGamma() const")
98 <<
"fluid cells indicator already exist"
99 <<
"for immersed boundary" <<
name()
127 gammaI[ibc[cellI]] = 0.0;
149 InfoIn(
"void immersedBoundaryFvPatch::makeGammaExt() const")
150 <<
"creating extended fluid cells indicator "
151 <<
"for immersed boundary " <<
name()
159 FatalErrorIn(
"immersedBoundaryFvPatch::makeGammaExt() const")
160 <<
"extended fluid cells indicator already exist "
161 <<
"for immersed boundary " <<
name()
170 "ibGammaExt" +
name(),
171 mesh_.time().timeName(),
180 scalarField& gammaExtI = gammaExtPtr_->internalField();
185 boolList inside = ibPolyPatch_.triSurfSearch().calcInside(
C);
195 gammaExtI[cellI] = 0;
206 gammaExtI[cellI] = 0;
213 gammaExtPtr_->boundaryField().evaluateCoupled();
221 InfoIn(
"void immersedBoundaryFvPatch::makeSGamma() const")
222 <<
"creating fluid faces indicator "
223 <<
"for immersed boundary " <<
name()
231 FatalErrorIn(
"immersedBoundaryFvPatch::makeSGamma() const")
232 <<
"fluid faces indicator already exist "
233 <<
"for immersed boundary " <<
name()
246 mesh_.time().timeName(),
253 calculatedFvsPatchScalarField::typeName
257 scalarField& sGammaI = sGammaPtr_->internalField();
260 sGammaPtr_->boundaryField();
287 gExtIn[owner[faceI]] > SMALL
288 && gExtIn[neighbour[faceI]] > SMALL
301 gIbIn[owner[faceI]] > SMALL
302 && gIbIn[neighbour[faceI]] > SMALL
309 forAll (gExtPatches, patchI)
311 if (gExtPatches[patchI].coupled())
316 scalarField gammaOwn = gExtPatches[patchI].patchInternalField();
318 scalarField gammaNei = gExtPatches[patchI].patchNeighbourField();
324 gammaOwn[faceI] > SMALL
325 && gammaNei[faceI] > SMALL
333 scalarField gammaIbOwn = gIbPatches[patchI].patchInternalField();
335 scalarField gammaIbNei = gIbPatches[patchI].patchNeighbourField();
341 gammaIbOwn[faceI] > SMALL
342 && gammaIbNei[faceI] > SMALL
355 g.boundaryField()[patchI].patchInternalField();
361 if (gammaFc[faceI] > SMALL)
375 InfoIn(
"void immersedBoundaryFvPatch::makeIbCells() const")
376 <<
"create list of cells next to immersed boundary "
377 <<
"for immersed boundary " <<
name()
385 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbCells() const")
386 <<
"list of cells next to immersed boundary already exist "
387 <<
"for immersed boundary " <<
name()
401 if (
mag(gammaExtI[neighbour[faceI]] - gammaExtI[owner[faceI]]) > SMALL)
403 if (gammaExtI[owner[faceI]] > SMALL)
405 if (!ibCellSet.
found(owner[faceI]))
407 ibCellSet.
insert(owner[faceI]);
412 if (!ibCellSet.
found(neighbour[faceI]))
414 ibCellSet.
insert(neighbour[faceI]);
431 mesh_.boundary()[patchI].faceCells();
433 forAll (gammaExtOwn, faceI)
437 mag(gammaExtNei[faceI] - gammaExtOwn[faceI])
441 if (gammaExtOwn[faceI] > SMALL)
443 if (!ibCellSet.
found(fCells[faceI]))
445 ibCellSet.
insert(fCells[faceI]);
448 else if (2*gammaExtOwn.size() == fCells.
size())
454 fCells[gammaExtOwn.size() + faceI]
460 fCells[gammaExtOwn.size() + faceI]
472 Pout <<
"Number of IB cells: " << ibCellsPtr_->size() <<
endl;
480 InfoIn(
"void immersedBoundaryFvPatch::addIbCornerCells() const")
481 <<
"add cells next to sharp corner "
482 <<
"for immersed boundary " <<
name()
490 const cellList& meshCells = mesh_.cells();
494 label nCornerCells = 0;
510 const scalarField& gammaI = gamma().internalField();
518 const label& ownCell = own[ibf[faceI]];
519 const label& neiCell = nei[ibf[faceI]];
524 if (gammaI[ownCell] > SMALL)
535 scalar
delta = cellSize(liveCell);
545 ibPolyPatch_.ibMesh(),
550 scalar totalArea = 0;
552 const labelList& cellFaces = meshCells[liveCell];
556 label curFace = cellFaces[faceI];
558 vector curSf = Sf[curFace];
560 if ((curSf & (Cf[curFace] -
C[liveCell])) < 0)
567 totalArea += (curSf &
n);
574 const labelList& cellFaces = meshCells[liveCell];
578 label curFace = cellFaces[faceI];
580 vector curSf = Sf[curFace];
585 if (mesh_.isInternalFace(curFace))
587 if (own[curFace] == liveCell)
589 neiCell = nei[curFace];
593 neiCell = own[curFace];
602 if ((-ibn[ibCell] &
n) > 0)
604 area +=
mag(curSf &
n);
610 if (area/totalArea < 0.5)
612 if (!cornerIbCellSet.
found(liveCell))
614 cornerIbCellSet.
insert(liveCell);
620 cornerCells = cornerIbCellSet.
toc();
621 ibCellsPtr_->append(cornerCells);
622 nCornerCells += cornerCells.
size();
638 while (cornerCells.
size() > 0);
646 InfoIn(
"void immersedBoundaryFvPatch::makeIbFaces() const")
647 <<
"create list of faces next to immersed boundary "
648 <<
"for immersed boundary " <<
name()
654 if (ibFacesPtr_ || ibFaceCellsPtr_ || ibFaceFlipsPtr_)
656 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbFaces() const")
657 <<
"list of faces next to immersed boundary already exist "
658 <<
"for immersed boundary " <<
name()
665 labelList ibCellIndicator(mesh_.nCells(), -1);
669 ibCellIndicator[ibc[ibcI]] = ibcI;
672 dynamicLabelList ibF(2*ibc.
size());
673 dynamicLabelList ibFC(2*ibc.
size());
686 ibCellIndicator[owner[faceI]] == -1
687 && ibCellIndicator[neighbour[faceI]] > -1
693 ibFC.append(ibCellIndicator[neighbour[faceI]]);
698 ibCellIndicator[owner[faceI]] > -1
699 && ibCellIndicator[neighbour[faceI]] == -1
705 ibFC.append(ibCellIndicator[owner[faceI]]);
711 gamma().boundaryField();
713 forAll (gammaPatches, patchI)
716 const labelList& fc = mesh_.boundary()[patchI].faceCells();
717 const label start = mesh_.boundaryMesh()[patchI].start();
719 if (gammaPatches[patchI].coupled())
722 gammaPatches[patchI].patchInternalField();
725 gammaPatches[patchI].patchNeighbourField();
727 forAll (gammaOwn, patchFaceI)
731 mag(gammaNei[patchFaceI] - gammaOwn[patchFaceI]) > SMALL
734 if (ibCellIndicator[fc[patchFaceI]] > -1)
737 ibF.append(start + patchFaceI);
738 ibFC.append(ibCellIndicator[fc[patchFaceI]]);
744 ibF.append(start + patchFaceI);
760 ibFaceCellsPtr_ =
new labelList(ibFC.xfer());
769 InfoIn(
"void immersedBoundaryFvPatch::makeIbInsideFaces() const")
770 <<
"create list of faces next to immersed boundary "
771 <<
"for immersed boundary " <<
name()
777 if (ibInsideFacesPtr_)
779 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbInsideFaces() const")
780 <<
"list of faces next to immersed boundary already exist "
781 <<
"for immersed boundary " <<
name()
787 const labelList& owner = mesh_.faceOwner();
788 const labelList& neighbour = mesh_.faceNeighbour();
795 if (
mag(gammaExtI[neighbour[faceI]] - gammaExtI[owner[faceI]]) > SMALL)
797 ibInsideFSet.
insert(faceI);
811 label size = mesh_.boundaryMesh()[patchI].size();
812 label start = mesh_.boundaryMesh()[patchI].start();
818 mag(gammaNei[faceI] - gammaOwn[faceI]) > SMALL
821 if (!ibInsideFSet.
found(start + faceI))
823 ibInsideFSet.
insert(start + faceI);
826 if (2*gammaOwn.size() == size)
832 start + size/2 + faceI
838 start + size/2 + faceI
848 sort(*ibInsideFacesPtr_);
856 InfoIn(
"void immersedBoundaryFvPatch::makeIbInternalFaces() const")
857 <<
"create list of faces next to immersed boundary"
863 if (ibInternalFacesPtr_)
865 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbInternalFaces() const")
866 <<
"list of faces next to immersed boundary already exist"
872 const labelList& owner = mesh_.faceOwner();
873 const labelList& neighbour = mesh_.faceNeighbour();
886 (gammaTmpI[neighbour[faceI]] > SMALL)
887 && (gammaTmpI[owner[faceI]] > SMALL)
890 ibInternalFacesSet.
insert(faceI);
904 label size = mesh_.boundaryMesh()[patchI].size();
905 label start = mesh_.boundaryMesh()[patchI].start();
911 (gammaNei[faceI] > SMALL)
912 && (gammaOwn[faceI] > SMALL)
915 if (!ibInternalFacesSet.
found(start + faceI))
917 ibInternalFacesSet.
insert(start + faceI);
920 if (2*gammaOwn.size() == size)
924 !ibInternalFacesSet.
found
926 start + size/2 + faceI
932 start + size/2 + faceI
941 ibInternalFacesPtr_ =
new labelList(ibInternalFacesSet.
toc());
942 sort(*ibInternalFacesPtr_);
952 "void immersedBoundaryFvPatch::makeIbPointsAndNormals() const"
953 ) <<
"create immersed boundary points and normals "
954 <<
"for immersed boundary " <<
name()
960 if (ibPointsPtr_ || ibNormalsPtr_ || hitFacesPtr_ || ibSamplingPointsPtr_)
964 "immersedBoundaryFvPatch::makeIbPointsAndNormals() const"
966 <<
"immersed boundary points and normals already exist"
967 <<
"for immersed boundary " <<
name()
978 delta[cellI] = cellSize(ibc[cellI]);
990 vectorField& ibSamplingPoints = *ibSamplingPointsPtr_;
1004 2*radiusFactor_()*
delta[cellI],
1005 2*radiusFactor_()*
delta[cellI],
1006 2*radiusFactor_()*
delta[cellI]
1017 ibPolyPatch_.ibMesh(),
1023 if (!internalFlow())
1025 ibNormals[cellI] *= -1;
1028 ibHitFaces[cellI] = pih.
index();
1034 "immersedBoundaryFvPatch::makeIbPointsAndNormals() const"
1035 ) <<
"Can't find nearest triSurface point for cell "
1036 << ibc[cellI] <<
", "
1037 << mesh_.cellCentres()[ibc[cellI]]
1038 <<
"Hit data = " << pih <<
nl
1044 mesh_.nGeometricD() < 3
1045 &&
mag(ibCellCentres[cellI].z() - ibPoints[cellI].z()) > SMALL
1050 "immersedBoundaryFvPatch::makeIbPointsAndNormals() const"
1051 ) <<
"Intersection point is not on symmetry plane " <<
nl
1052 <<
"C = " << ibCellCentres[cellI]
1053 <<
" D = " << ibPoints[cellI] <<
nl
1054 <<
"for 2-D geometry. Adjusting" <<
endl;
1056 ibPoints[cellI].z() = ibCellCentres[cellI].z();
1061 ibSamplingPoints = ibPoints + distFactor_()*(ibCellCentres - ibPoints);
1069 InfoIn(
"void immersedBoundaryFvPatch::makeIbCellCells() const")
1070 <<
"create neighbour cells for ib cells"
1079 || ibProcCentresPtr_
1081 || ibCellProcCellsPtr_
1086 "immersedBoundaryFvPatch::makeIbCellCells() const"
1087 ) <<
"cell-cell addressing already exists"
1099 forAll (procCentres, procI)
1107 forAll (procGamma, procI)
1116 const cellList& meshCells = mesh_.cells();
1123 rM *= radiusFactor_();
1132 forAll (cellCells, cellI)
1147 for (
label i = 0; i < curCells.
size(); i++)
1149 label curCell = curCells[i];
1150 scalar r =
mag(
C[curCell] -
C[ibc[cellI]]);
1158 vector dir = (
C[curCell] - ibp[cellI]);
1159 dir /=
mag(dir) + SMALL;
1164 cellCells[cellI][cI++] = curCell;
1179 const labelList& curCellCells = cellCells[cellI];
1181 if (curCellCells.
size())
1183 forAll (curCellCells, cI)
1185 const labelList& faces = meshCells[curCellCells[cI]];
1187 bool foundProcessorFace =
false;
1192 mesh_.boundaryMesh().whichPatch(faces[faceI]);
1198 isA<processorPolyPatch>
1200 mesh_.boundaryMesh()[patchID]
1204 foundProcessorFace =
true;
1209 if (foundProcessorFace)
1211 procIbCellsSet.
insert(cellI);
1218 const labelList& faces = meshCells[ibc[cellI]];
1220 bool foundProcessorFace =
false;
1225 mesh_.boundaryMesh().whichPatch(faces[faceI]);
1231 isA<processorPolyPatch>
1233 mesh_.boundaryMesh()[patchID]
1237 foundProcessorFace =
true;
1242 if (foundProcessorFace)
1244 procIbCellsSet.
insert(cellI);
1269 toProc << procIbCells.
size();
1288 fromProc >> sizes[procI];
1297 centres[cellI] =
C[ibc[procIbCells[cellI]]];
1311 centres.size()*
sizeof(
vector)
1312 + procRMax.size()*
sizeof(scalar)
1315 toProc << centres << procRMax;
1345 sizes[procI]*
sizeof(
vector)
1346 + sizes[procI]*
sizeof(scalar)
1349 fromProc >> ctrs[procI] >> rMax[procI];
1360 if (ibProcCellsPtr_)
1362 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbCellCells() const")
1363 <<
"procCells addressing already exists"
1376 forAll (ctrs[procI], cellI)
1378 label nearestCellID =
1379 findNearestCell(ctrs[procI][cellI]);
1381 if (nearestCellID == -1)
1385 "immersedBoundaryFvPatch::makeIbCellCells() const"
1386 ) <<
"Can't find nearest cell."
1390 scalar
R =
mag(
C[nearestCellID] - ctrs[procI][cellI]);
1392 if (
R < rMax[procI][cellI])
1394 if (!procCellSet.
found(nearestCellID))
1396 procCellSet.
insert(nearestCellID);
1414 - ctrs[procI][cellI]
1417 if (r <= rMax[procI][cellI])
1419 if (!procCellSet.
found(tmpCellList[cI]))
1421 procCellSet.
insert(tmpCellList[cI]);
1429 procCells[procI] = procCellSet.
toc();
1447 toProc << procCells[procI].
size();
1466 fromProc >> procSizes[procI];
1484 centres.size()*
sizeof(
vector)
1497 procCentres[procI].setSize(procSizes[procI]);
1505 procSizes[procI]*
sizeof(
vector)
1508 fromProc >> procCentres[procI];
1515 const scalarField& gammaI = gamma().internalField();
1528 gamma.size()*
sizeof(scalar)
1541 procGamma[procI].setSize(procSizes[procI]);
1549 procSizes[procI]*
sizeof(scalar)
1552 fromProc >> procGamma[procI];
1559 forAll (cellProcCells, cellI)
1561 scalar rMax = rM[cellI];
1563 cellProcCells[cellI].
setSize(100);
1566 forAll (procCentres, procI)
1568 forAll (procCentres[procI], pointI)
1573 procCentres[procI][pointI]
1579 cellProcCells[cellI][index].first() = procI;
1580 cellProcCells[cellI][index].second() = pointI;
1586 cellProcCells[cellI].
setSize(index);
1596 InfoIn(
"void immersedBoundaryFvPatch::makeDeadCells() const")
1597 <<
"create list of dead cells"
1605 FatalErrorIn(
"immersedBoundaryFvPatch::makeDeadCells() const")
1606 <<
"list of dead cells already exist"
1610 const scalarField& gammaExtI = gammaExt().internalField();
1617 forAll (gammaExtI, cellI)
1619 if (gammaExtI[cellI] < SMALL)
1621 deadCells[counter++] = cellI;
1631 InfoIn(
"void immersedBoundaryFvPatch::makeDeadCellsExt() const")
1632 <<
"create extended list of dead cells"
1638 if (deadCellsExtPtr_)
1640 FatalErrorIn(
"immersedBoundaryFvPatch::makeDeadCellsExt() const")
1641 <<
"extended list of dead cells already exist"
1645 const scalarField& gammaI = gamma().internalField();
1648 labelList& deadCellsExt = *deadCellsExtPtr_;
1653 if (gammaI[cellI] < SMALL)
1655 deadCellsExt[counter++] = cellI;
1665 InfoIn(
"void immersedBoundaryFvPatch::makeDeadFaces() const")
1666 <<
"create list of dead cells"
1674 FatalErrorIn(
"immersedBoundaryFvPatch::makeDeadFaces() const")
1675 <<
"list of dead cells already exist"
1679 deadFacesPtr_ =
new labelList(mesh_.nFaces());
1689 const labelList& owner = mesh_.faceOwner();
1690 const labelList& neighbour = mesh_.faceNeighbour();
1692 forAll (neighbour, faceI)
1694 if (gammaExtI[neighbour[faceI]] + gammaExtI[owner[faceI]] < SMALL)
1701 forAll (gEPatches, patchI)
1703 const label start = mesh_.boundaryMesh()[patchI].start();
1705 if (gEPatches[patchI].coupled())
1708 gEPatches[patchI].patchInternalField();
1711 gEPatches[patchI].patchNeighbourField();
1713 forAll (gammaExtOwn, patchFaceI)
1717 gammaExtNei[patchFaceI] + gammaExtOwn[patchFaceI] < SMALL
1720 df[nDf] = start + patchFaceI;
1728 gEPatches[patchI].patchInternalField();
1730 forAll (gammaExtOwn, patchFaceI)
1732 if (gammaExtOwn[patchFaceI] < SMALL)
1734 df[nDf] = start + patchFaceI;
1749 InfoIn(
"void immersedBoundaryFvPatch::makeLiveCells() const")
1750 <<
"create list of live cells"
1758 FatalErrorIn(
"immersedBoundaryFvPatch::makeLiveCells() const")
1759 <<
"list of live cells already exist"
1763 const scalarField& gammaI = gamma().internalField();
1771 if (gammaI[cellI] > (1.0 - SMALL))
1773 liveCells[counter++] = cellI;
1783 InfoIn(
"void immersedBoundaryFvPatch::makeIbCellsSize() const")
1784 <<
"create average sizes of immersed boundary cells"
1790 if (ibCellSizesPtr_)
1792 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbCellsSize() const")
1793 <<
"average sizes of immersed boundary cells already exist"
1797 ibCellSizesPtr_ =
new scalarField(ibPoints().size(), 0.0);
1800 if (mesh_.nGeometricD() == 3)
1817 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbCellsSize() const")
1818 <<
"For 2-D simulations with the immersed boundary method "
1819 <<
"the geometry needs to be aligned with the z-direction. "
1820 <<
"Having the x- or y-direction as empty is not allowed "
1821 <<
"because of the way the polynomials are expanded."
1825 scalar thickness = 0.0;
1831 thickness = mesh_.bounds().span()[dir];
1846 InfoIn(
"void immersedBoundaryFvPatch::makeIbSf() const")
1847 <<
"creating ibSf and ibMagSf field"
1853 if (ibSfPtr_ || ibMagSfPtr_)
1855 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbSf() const")
1856 <<
"ibSf and ibMagSf field already exist"
1872 InfoIn(
"void immersedBoundaryFvPatch::makeIbDelta() const")
1873 <<
"creating delta field"
1881 FatalErrorIn(
"immersedBoundaryFvPatch::makeIbDelta() const")
1882 <<
"delta field already exist"
1900 "void immersedBoundaryFvPatch::makeIbSamplingPointDelta() const"
1901 ) <<
"creating sampling point delta field"
1907 if (ibSamplingPointDeltaPtr_)
1911 "immersedBoundaryFvPatch::makeIbSamplingPointDelta() const"
1912 ) <<
"sampling point delta field already exist"
1917 ibSamplingPointDeltaPtr_ =
1926 InfoIn(
"void immersedBoundaryFvPatch::makeTriSf() const")
1927 <<
"creating delta field"
1935 FatalErrorIn(
"immersedBoundaryFvPatch::makeTriSf() const")
1936 <<
"triSf field already exist"
1941 const triSurface& triMesh = ibPolyPatch_.ibMesh();
1949 Sf[faceI] = triMesh[faceI].normal(triMeshPoints);
1952 if (!ibPolyPatch_.internalFlow())
1963 const point& location
1968 const scalarField& gammaExtI = gammaExt().internalField();
1970 label nearestCellI = -1;
1971 scalar minProximity = GREAT;
1973 for (
label cellI = 0; cellI <
C.size(); cellI++)
1975 if (gammaExtI[cellI] > SMALL)
1977 scalar proximity =
magSqr(
C[cellI] - location);
1979 if (proximity < minProximity)
1981 nearestCellI = cellI;
1982 minProximity = proximity;
1987 return nearestCellI;
2001 const scalarField& gammaExtI = gammaExt().internalField();
2007 const labelList& curCellPoints = cellPoints[cellID];
2009 forAll (curCellPoints, pointI)
2011 label curPoint = curCellPoints[pointI];
2012 const labelList& curPointCells = pointCells[curPoint];
2014 forAll (curPointCells, cI)
2016 if (gammaExtI[curPointCells[cI]] > SMALL)
2029 for (
label nRows = 1; nRows < maxCellCellRows_(); nRows++)
2035 label curCell = curCells[cellI];
2036 const labelList& curCellPoints = cellPoints[curCell];
2038 forAll (curCellPoints, pointI)
2040 label curPoint = curCellPoints[pointI];
2041 const labelList& curPointCells = pointCells[curPoint];
2043 forAll (curPointCells, cI)
2045 if (gammaExtI[curPointCells[cI]] > SMALL)
2069 mag(
C[curCells[cI]] - pt);
2076 for (
label i = 0; i < sortedCells.
size(); i++)
2079 curCells[sortedDistances.
indices()[i]];
2082 cellCells = sortedCells;
2090 if (mesh_.nGeometricD() == 3)
2096 scalar thickness = 0.0;
2102 thickness = mesh_.bounds().span()[dir];
2107 delta =
sqrt(mesh_.V().field()[cellID]/thickness);
2124 const labelList& cellFaces = mesh_.cells()[cellID];
2128 forAll (cellFaces, faceI)
2130 label curFace = cellFaces[faceI];
2132 vector curSf = Sf[curFace];
2134 if ((curSf & (Cf[curFace] -
C[cellID])) < 0)
2139 if ((curSf&dir) > 1)
2141 area += (curSf & dir);
2215 ibPolyPatch_(refCast<const immersedBoundaryPolyPatch>(patch)),
2222 ibFaceCellsPtr_(NULL),
2223 ibFaceFlipsPtr_(NULL),
2224 ibInsideFacesPtr_(NULL),
2225 ibInternalFacesPtr_(NULL),
2227 ibNormalsPtr_(NULL),
2229 ibSamplingPointsPtr_(NULL),
2230 ibSamplingWeightsPtr_(NULL),
2231 ibSamplingProcWeightsPtr_(NULL),
2232 cellsToTriAddrPtr_(NULL),
2233 cellsToTriWeightsPtr_(NULL),
2234 ibCellCellsPtr_(NULL),
2235 ibProcCellsPtr_(NULL),
2236 ibProcCentresPtr_(NULL),
2237 ibProcGammaPtr_(NULL),
2238 ibCellProcCellsPtr_(NULL),
2239 deadCellsPtr_(NULL),
2240 deadCellsExtPtr_(NULL),
2241 deadFacesPtr_(NULL),
2242 liveCellsPtr_(NULL),
2243 ibCellSizesPtr_(NULL),
2244 invDirichletMatricesPtr_(NULL),
2245 invNeumannMatricesPtr_(NULL),
2249 ibSamplingPointDeltaPtr_(NULL),
2274 return *gammaExtPtr_;
2296 return *ibCellsPtr_;
2307 return *ibFacesPtr_;
2313 if (!ibFaceCellsPtr_)
2318 return *ibFaceCellsPtr_;
2324 if (!ibFaceFlipsPtr_)
2329 return *ibFaceFlipsPtr_;
2335 if (!ibInsideFacesPtr_)
2337 makeIbInsideFaces();
2340 return *ibInsideFacesPtr_;
2346 if (!ibInternalFacesPtr_)
2348 makeIbInternalFaces();
2351 return *ibInternalFacesPtr_;
2359 makeIbPointsAndNormals();
2362 return *ibPointsPtr_;
2370 makeIbPointsAndNormals();
2373 return *ibNormalsPtr_;
2381 makeIbPointsAndNormals();
2384 return *hitFacesPtr_;
2391 if (!ibSamplingPointsPtr_)
2393 makeIbPointsAndNormals();
2396 return *ibSamplingPointsPtr_;
2402 if (!ibCellCellsPtr_)
2407 return *ibCellCellsPtr_;
2414 if (!ibProcCentresPtr_)
2419 return *ibProcCentresPtr_;
2426 if (!ibProcGammaPtr_)
2431 return *ibProcGammaPtr_;
2438 if (!ibCellProcCellsPtr_)
2443 return *ibCellProcCellsPtr_;
2449 if (!ibProcCellsPtr_)
2454 return *ibProcCellsPtr_;
2465 return *deadCellsPtr_;
2471 if (!deadCellsExtPtr_)
2476 return *deadCellsExtPtr_;
2487 return *deadFacesPtr_;
2498 return *liveCellsPtr_;
2504 if (!ibCellSizesPtr_)
2509 return *ibCellSizesPtr_;
2531 return *ibMagSfPtr_;
2542 return *ibDeltaPtr_;
2549 if (!ibSamplingPointDeltaPtr_)
2551 makeIbSamplingPointDelta();
2554 return *ibSamplingPointDeltaPtr_;
2571 return ibMesh().faceCentres();
2575 const Foam::dynamicLabelList&
2579 if(ibUpdateTimeIndex_ != mesh_.time().timeIndex())
2583 triFacesInMesh_.clear();
2584 triFacesInMesh_.setCapacity(triCf.size()/2);
2589 const vector curTriCf = triCf[fI];
2591 if(!mesh_.bounds().containsInside(curTriCf))
2598 if(mesh_.findCell(curTriCf) != -1)
2600 triFacesInMesh_.append(fI);
2605 ibUpdateTimeIndex_ = mesh_.time().timeIndex();
2608 return triFacesInMesh_;