31#include "surfaceInterpolate.H"
59 unrefineableCell.
clear();
94 unrefineableCell.
test(own)
95 && (cellLevel[nei] > cellLevel[own])
100 unrefineableCell.
test(nei)
101 && (cellLevel[own] > cellLevel[nei])
116 unrefineableCell.
test(own)
129 bool hasExtended =
false;
133 if (seedFace.
test(facei))
147 if (seedFace.
test(facei))
151 if (unrefineableCell.
set(own))
181 ).optionalSubDict(typeName +
"Coeffs")
187 correctFluxes_.
resize(fluxVelocities.size());
188 for (
const auto& pr : fluxVelocities)
190 correctFluxes_.insert(pr.first(), pr.second());
193 refineDict.
readEntry(
"dumpLevel", dumpLevel_);
216 const label oldCelli = cellMap[celli];
217 if (oldCelli >= 0 && reverseCellMap[oldCelli] >= 0)
220 nSubCells[oldCelli]++;
228 const auto& V = this->V();
231 const label oldCelli = cellMap[celli];
232 if (oldCelli >= 0 && nSubCells[oldCelli] == 8)
236 correctedV0[celli] = V[celli];
241 for (
const auto&
s : cellsFromCells)
244 const label celli =
s.index();
245 correctedV0[celli] = V[celli];
253 setV0().field() = correctedV0;
272 const label oldFacei =
faceMap[facei];
276 const label masterFacei = reverseFaceMap[oldFacei];
281 <<
"Problem: should not have removed faces"
283 <<
nl <<
"face:" << facei <<
endl
286 else if (masterFacei != facei)
288 masterFaces.
set(masterFacei);
295 Pout<<
"Found " << masterFaces.
count() <<
" split faces " <<
endl;
300 lookupClass<surfaceScalarField>()
310 if (!correctFluxes_.found(iter.key()))
313 <<
"Cannot find surfaceScalarField " << iter.key()
314 <<
" in user-provided flux mapping table "
315 << correctFluxes_ <<
endl
316 <<
" The flux mapping table is used to recreate the"
317 <<
" flux on newly created faces." <<
endl
318 <<
" Either add the entry if it is a flux or use ("
319 << iter.key() <<
" none) to suppress this warning."
324 const word&
UName = correctFluxes_[iter.key()];
335 Pout<<
"Setting surfaceScalarField " << iter.key()
336 <<
" to NaN" <<
endl;
345 Pout<<
"Mapping flux " << iter.key()
346 <<
" using interpolated flux " <<
UName
354 lookupObject<volVectorField>(
UName)
360 for (label facei = 0; facei < nInternalFaces(); ++facei)
362 const label oldFacei =
faceMap[facei];
367 phi[facei] = phiU[facei];
369 else if (reverseFaceMap[oldFacei] != facei)
372 phi[facei] = phiU[facei];
389 const label oldFacei =
faceMap[facei];
394 patchPhi[i] = patchPhiU[i];
396 else if (reverseFaceMap[oldFacei] != facei)
399 patchPhi[i] = patchPhiU[i];
407 for (
const label facei : masterFaces)
409 if (isInternalFace(facei))
411 phi[facei] = phiU[facei];
423 patchPhi[i] = patchPhiU[i];
435 mapNewInternalFaces<scalar>(this->Sf(), this->magSf(),
faceMap);
436 mapNewInternalFaces<vector>(this->Sf(), this->magSf(),
faceMap);
439 mapNewInternalFaces<sphericalTensor>(
faceMap);
440 mapNewInternalFaces<symmTensor>(
faceMap);
441 mapNewInternalFaces<tensor>(
faceMap);
457 meshCutter_.setRefinement(cellsToRefine, meshMod);
469 Info<<
"Refined from "
471 <<
" to " << globalData().nTotalCells() <<
" cells." <<
endl;
476 for (label facei = 0; facei < nInternalFaces(); ++facei)
478 const label oldFacei = map().faceMap()[facei];
480 if (oldFacei >= nInternalFaces())
483 <<
"New internal face:" << facei
484 <<
" fc:" << faceCentres()[facei]
485 <<
" originates from boundary oldFace:" << oldFacei
517 meshCutter_.updateMesh(*map);
520 if (protectedCell_.size())
522 bitSet newProtectedCell(nCells());
524 forAll(newProtectedCell, celli)
526 const label oldCelli = map().cellMap()[celli];
527 if (protectedCell_.test(oldCelli))
529 newProtectedCell.
set(celli);
532 protectedCell_.transfer(newProtectedCell);
536 meshCutter_.checkRefinementLevels(-1,
labelList());
551 meshCutter_.setUnrefinement(splitPoints, meshMod);
563 for (
const label pointi : splitPoints)
565 const labelList& pEdges = pointEdges()[pointi];
567 for (
const label edgei : pEdges)
569 const label otherPointi = edges()[edgei].otherVertex(pointi);
573 for (
const label facei :
pFaces)
575 faceToSplitPoint.
insert(facei, otherPointi);
592 Info<<
"Unrefined from "
594 <<
" to " << globalData().nTotalCells() <<
" cells."
617 const labelList& reversePointMap = map().reversePointMap();
618 const labelList& reverseFaceMap = map().reverseFaceMap();
622 lookupClass<surfaceScalarField>()
626 if (!correctFluxes_.found(iter.key()))
629 <<
"Cannot find surfaceScalarField " << iter.key()
630 <<
" in user-provided flux mapping table "
631 << correctFluxes_ <<
endl
632 <<
" The flux mapping table is used to recreate the"
633 <<
" flux on newly created faces." <<
endl
634 <<
" Either add the entry if it is a flux or use ("
635 << iter.key() <<
" none) to suppress this warning."
640 const word&
UName = correctFluxes_[iter.key()];
648 <<
"Mapping flux " << iter.key()
649 <<
" using interpolated flux " <<
UName
661 lookupObject<volVectorField>(
UName)
669 const label oldFacei = iter.key();
670 const label oldPointi = iter.val();
672 if (reversePointMap[oldPointi] < 0)
675 const label facei = reverseFaceMap[oldFacei];
679 if (isInternalFace(facei))
681 phi[facei] = phiU[facei];
691 patchPhi[i] = patchPhiU[i];
701 meshCutter_.updateMesh(*map);
704 if (protectedCell_.size())
706 bitSet newProtectedCell(nCells());
708 forAll(newProtectedCell, celli)
710 const label oldCelli = map().cellMap()[celli];
711 if (protectedCell_.test(oldCelli))
713 newProtectedCell.
set(celli);
716 protectedCell_.transfer(newProtectedCell);
720 meshCutter_.checkRefinementLevels(-1,
labelList());
735 for (
const label celli : pCells)
737 vFld[celli] =
max(vFld[celli], pFld[pointi]);
753 for (
const label celli : pCells)
755 pFld[pointi] =
max(pFld[pointi], vFld[celli]);
772 for (
const label celli : pCells)
776 pFld[pointi] =
sum/pCells.
size();
785 const scalar minLevel,
786 const scalar maxLevel
793 scalar err =
min(
fld[i]-minLevel, maxLevel-
fld[i]);
806 const scalar lowerRefineLevel,
807 const scalar upperRefineLevel,
830 if (cellError[celli] > 0)
832 candidateCell.
set(celli);
840 const label maxCells,
841 const label maxRefinement,
842 const bitSet& candidateCell
846 label nTotToRefine = (maxCells - globalData().nTotalCells()) / 7;
848 const labelList& cellLevel = meshCutter_.cellLevel();
853 calculateProtectedCells(unrefineableCell);
856 label nLocalCandidates = candidateCell.
count();
862 if (nCandidates < nTotToRefine)
864 for (
const label celli : candidateCell)
868 (!unrefineableCell.
test(celli))
869 && cellLevel[celli] < maxRefinement
879 for (label level = 0; level < maxRefinement; ++level)
881 for (
const label celli : candidateCell)
885 (!unrefineableCell.
test(celli))
886 && cellLevel[celli] == level
903 meshCutter_.consistentRefinement
911 <<
" cells for refinement out of " << globalData().nTotalCells()
914 return consistentSet;
920 const scalar unrefineLevel,
926 const labelList splitPoints(meshCutter_.getSplitPoints());
936 if (protectedCell_.size())
943 if (protectedCell_.test(celli))
945 protectedPoint.
set(pointi);
961 <<
" protected cells found "
963 <<
" protected points." <<
endl;
969 for (
const label pointi : splitPoints)
971 if (!protectedPoint[pointi] && pFld[pointi] < unrefineLevel)
974 bool hasMarked =
false;
978 if (markedCell.
test(celli))
987 newSplitPoints.
append(pointi);
998 meshCutter_.consistentUnrefinement
1005 <<
" split points out of a possible "
1009 return consistentSet;
1021 for (
const label celli : markedCell)
1029 for (label facei = 0; facei < nInternalFaces(); ++facei)
1031 if (markedFace.
test(facei))
1033 markedCell.
set(faceOwner()[facei]);
1034 markedCell.
set(faceNeighbour()[facei]);
1037 for (label facei = nInternalFaces(); facei <
nFaces(); ++facei)
1039 if (markedFace.
test(facei))
1041 markedCell.
set(faceOwner()[facei]);
1052 const labelList& cellLevel = meshCutter_.cellLevel();
1053 const labelList& pointLevel = meshCutter_.pointLevel();
1057 forAll(pointLevel, pointi)
1061 for (
const label celli : pCells)
1063 if (pointLevel[pointi] <= cellLevel[celli])
1066 if (nAnchorPoints[celli] == 8)
1068 protectedCell.
set(celli);
1071 if (!protectedCell.
test(celli))
1073 ++nAnchorPoints[celli];
1080 forAll(protectedCell, celli)
1082 if (nAnchorPoints[celli] != 8)
1084 protectedCell.
set(celli);
1118 protectedCell_.setSize(nCells());
1119 nRefinementIterations_ = 0;
1126 const labelList& cellLevel = meshCutter_.cellLevel();
1127 const labelList& pointLevel = meshCutter_.pointLevel();
1143 for (
const label celli : pCells)
1145 if (!protectedCell_.test(celli))
1147 if (pointLevel[pointi] <= cellLevel[celli])
1151 if (nAnchors[celli] > 8)
1153 protectedCell_.
set(celli);
1169 for (label facei = 0; facei < nInternalFaces(); ++facei)
1171 neiLevel[facei] = cellLevel[faceNeighbour()[facei]];
1173 for (label facei = nInternalFaces(); facei <
nFaces(); ++facei)
1175 neiLevel[facei] = cellLevel[faceOwner()[facei]];
1182 forAll(faceOwner(), facei)
1184 const label faceLevel =
max
1186 cellLevel[faceOwner()[facei]],
1190 const face&
f = faces()[facei];
1194 for (
const label pointi :
f)
1196 if (pointLevel[pointi] <= faceLevel)
1202 protectedFace.
set(facei);
1211 for (label facei = 0; facei < nInternalFaces(); ++facei)
1213 if (protectedFace.
test(facei))
1215 protectedCell_.set(faceOwner()[facei]);
1216 protectedCell_.set(faceNeighbour()[facei]);
1219 for (label facei = nInternalFaces(); facei <
nFaces(); ++facei)
1221 if (protectedFace.
test(facei))
1223 protectedCell_.set(faceOwner()[facei]);
1232 if (cFaces.
size() < 6)
1234 protectedCell_.
set(celli);
1238 for (
const label cfacei : cFaces)
1240 if (faces()[cfacei].size() < 4)
1242 protectedCell_.set(celli);
1250 checkEightAnchorPoints(protectedCell_);
1255 protectedCell_.clear();
1268 <<
" cells that are protected from refinement."
1269 <<
" Writing these to cellSet "
1270 << protectedCells.
name()
1273 protectedCells.
write();
1300 ).optionalSubDict(typeName +
"Coeffs")
1303 const label refineInterval = refineDict.
get<label>(
"refineInterval");
1305 bool hasChanged =
false;
1307 if (refineInterval == 0)
1309 topoChanging(hasChanged);
1313 else if (refineInterval < 0)
1316 <<
"Illegal refineInterval " << refineInterval <<
nl
1317 <<
"The refineInterval setting in the dynamicMeshDict should"
1318 <<
" be >= 1." <<
nl
1328 const label maxCells = refineDict.
get<label>(
"maxCells");
1333 <<
"Illegal maximum number of cells " << maxCells <<
nl
1334 <<
"The maxCells setting in the dynamicMeshDict should"
1339 const label maxRefinement = refineDict.
get<label>(
"maxRefinement");
1341 if (maxRefinement <= 0)
1344 <<
"Illegal maximum refinement level " << maxRefinement <<
nl
1345 <<
"The maxCells setting in the dynamicMeshDict should"
1350 const word fieldName(refineDict.
get<
word>(
"field"));
1352 const volScalarField& vFld = lookupObject<volScalarField>(fieldName);
1354 const scalar lowerRefineLevel =
1355 refineDict.
get<scalar>(
"lowerRefineLevel");
1356 const scalar upperRefineLevel =
1357 refineDict.
get<scalar>(
"upperRefineLevel");
1358 const scalar unrefineLevel = refineDict.
getOrDefault<scalar>
1363 const label nBufferLayers = refineDict.
get<label>(
"nBufferLayers");
1369 selectRefineCandidates
1377 if (globalData().nTotalCells() < maxCells)
1396 if (nCellsToRefine > 0)
1404 const labelList& cellMap = map().cellMap();
1405 const labelList& reverseCellMap = map().reverseCellMap();
1411 const label oldCelli = cellMap[celli];
1416 || (reverseCellMap[oldCelli] != celli)
1420 newRefineCell.
set(celli);
1428 for (label i = 0; i < nBufferLayers; ++i)
1442 selectUnrefinePoints
1452 pointsToUnrefine.
size(),
1456 if (nSplitPoints > 0)
1459 unrefine(pointsToUnrefine);
1466 if ((nRefinementIterations_ % 10) == 0)
1472 nRefinementIterations_++;
1475 topoChanging(hasChanged);
1489 bool hasChanged = updateTopology();
1504 const_cast<hexRef8&
>(meshCutter_).setInstance(time().timeName());
1510 && meshCutter_.write(valid)
1530 const labelList& cellLevel = meshCutter_.cellLevel();
1534 scalarCellLevel[celli] = cellLevel[celli];
1537 writeOk = writeOk && scalarCellLevel.
write();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void append(const T &val)
Copy append an element to the end of this list.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A HashTable similar to std::unordered_map.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
label size() const noexcept
The number of elements in table.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
The IOstreamOption is a simple container for options an IOstream can normally have.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
void resize(const label len)
Adjust allocated size of list.
A HashTable to objects of type <T> with a label key.
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
void resize(const label numElem, const unsigned int val=0u)
Reset addressable list size, does not shrink the allocated size.
void clear()
Clear the list, i.e. set addressable size to zero.
void reset()
Clear all bits but do not adjust the addressable size.
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
unsigned int count(const bool on=true) const
Count number of bits set.
void set(const bitSet &bitset)
Set specified bits from another bitset.
bool test(const label pos) const
Test value at specified position, never auto-vivify entries.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A collection of cell labels.
A topoSetPointSource to select all the points from given cellSet(s).
A cell is defined as a list of faces with extra functionality.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
Abstract base class for geometry and/or topology changing fvMesh.
Dynamic mesh able to handle multiple motion solvers. NOTE: If the word entry "solvers" is not found i...
virtual bool update()
Update the mesh for both mesh motion and topology change.
A fvMesh with built-in refinement.
void readDict()
Read the projection parameters from dictionary.
bool updateTopology()
Update topology (refinement, unrefinement)
hexRef8 meshCutter_
Mesh cutting engine.
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
virtual autoPtr< mapPolyMesh > refine(const labelList &)
Refine cells. Update mesh and fields.
scalarField maxPointField(const scalarField &) const
Get per cell max of connected point.
void calculateProtectedCells(bitSet &unrefineableCell) const
Calculate cells that cannot be refined since would trigger.
virtual labelList selectRefineCells(const label maxCells, const label maxRefinement, const bitSet &candidateCell) const
Subset candidate cells for refinement.
bitSet protectedCell_
Protected cells (usually since not hexes)
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
virtual bool update()
Update the mesh for both mesh motion and topology change.
virtual void selectRefineCandidates(const scalar lowerRefineLevel, const scalar upperRefineLevel, const scalarField &vFld, bitSet &candidateCell) const
Select candidate cells for refinement.
scalarField maxCellField(const volScalarField &) const
Get point max of connected cell.
virtual labelList selectUnrefinePoints(const scalar unrefineLevel, const bitSet &markedCell, const scalarField &pFld) const
Select points that can be unrefined.
void extendMarkedCells(bitSet &markedCell) const
Extend markedCell with cell-face-cell.
virtual autoPtr< mapPolyMesh > unrefine(const labelList &)
Unrefine cells. Gets passed in centre points of cells to combine.
void checkEightAnchorPoints(bitSet &protectedCell) const
Check all cells have 8 anchor points.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
A face is a list of labels corresponding to mesh vertices.
Maps input fields from local mesh to secondary mesh at runtime.
virtual label start() const
Return start label of this patch in the polyMesh face list.
const fvPatch & patch() const
Return patch.
Refinement of (split) hexes using polyTopoChange.
const labelIOList & cellLevel() const
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
label nOldCells() const
Number of old cells.
const labelList & faceMap() const
Old face map.
const labelList & reverseCellMap() const
Reverse cell map.
const labelList & cellMap() const
Old cell map.
const List< objectMap > & cellsFromCellsMap() const
Cells originating from cells.
const labelList & reverseFaceMap() const
Reverse face map.
constant condensation/saturation model.
Smooth ATC in cells having a point to a set of patches supplied by type.
virtual const labelList & faceOwner() const
Return face owner.
virtual const labelList & faceNeighbour() const
Return face neighbour.
Direct mesh changes based on v1.3 polyTopoChange syntax.
autoPtr< mapPolyMesh > changeMesh(polyMesh &mesh, const labelUList &patchMap, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Inplace changes mesh without change of patches.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
label nInternalFaces() const noexcept
Number of internal faces.
label nFaces() const noexcept
Number of mesh faces.
Container with cells to refine. Refinement given as single direction.
All refinement history. Used in unrefinement.
virtual bool write(const bool valid=true) const
Write using setting from DB.
static void fillNan(UList< scalar > &list)
Fill data block with NaN values.
void clearOut()
Clear all geometry and addressing.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define DebugInfo
Report an information message using Foam::Info.
#define WarningInFunction
Report a warning using Foam::Warning.
labelHashSet used(const bitSet &select)
Convert a bitset to a labelHashSet of the indices used.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
List< label > labelList
A List of labels.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=cellModel::ref(cellModel::HEX);labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){ pointMap[i]=i;}for(label i=0;i< nPoints;i++){ if(f[i] > 0.0) { hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells].reset(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei) { if(edges[ei].mag(points)< SMALL) { label start=pointMap[edges[ei].start()];while(start !=pointMap[start]) { start=pointMap[start];} label end=pointMap[edges[ei].end()];while(end !=pointMap[end]) { end=pointMap[end];} label minLabel=min(start, end);pointMap[start]=pointMap[end]=minLabel;} } cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){ cellShape &cs=cellShapes[celli];forAll(cs, i) { cs[i]=pointMap[cs[i]];} cs.collapse();}label bcIDs[11]={-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9};const label nBCs=12;const word *kivaPatchTypes[nBCs]={ &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &symmetryPolyPatch::typeName, &wedgePolyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &symmetryPolyPatch::typeName, &oldCyclicPolyPatch::typeName};enum patchTypeNames{ PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={ "piston", "valve", "liner", "cylinderHead", "axis", "wedge", "inflow", "outflow", "presin", "presout", "symmetryPlane", "cyclic"};List< SLList< face > > pFaces[nBCs]
#define forAll(list, i)
Loop across all elements in list.
#define forAllIters(container, iter)
Iterate across all elements in the container object.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
const word UName(propsDict.getOrDefault< word >("U", "U"))