27 #include "surfaceInterpolate.H" 47 const PackedBoolList& l,
48 const unsigned int val
71 void Foam::dynamicRefineFvMesh::calculateProtectedCells
73 PackedBoolList& unrefineableCells
76 if (protectedCells_.empty())
78 unrefineableCells.clear();
82 const labelList& cellLevel = meshCutter_.cellLevel();
84 unrefineableCells = protectedCells_;
87 labelList neiLevel(nFaces()-nInternalFaces());
89 for (
label facei = nInternalFaces(); facei < nFaces(); facei++)
91 neiLevel[facei-nInternalFaces()] = cellLevel[faceOwner()[facei]];
101 forAll(faceNeighbour(), facei)
103 label own = faceOwner()[facei];
104 bool ownProtected = unrefineableCells.get(own);
105 label nei = faceNeighbour()[facei];
106 bool neiProtected = unrefineableCells.get(nei);
108 if (ownProtected && (cellLevel[nei] > cellLevel[own]))
110 seedFace[facei] =
true;
112 else if (neiProtected && (cellLevel[own] > cellLevel[nei]))
114 seedFace[facei] =
true;
117 for (
label facei = nInternalFaces(); facei < nFaces(); facei++)
119 label own = faceOwner()[facei];
120 bool ownProtected = unrefineableCells.get(own);
124 && (neiLevel[facei-nInternalFaces()] > cellLevel[own])
127 seedFace[facei] =
true;
135 bool hasExtended =
false;
137 for (
label facei = 0; facei < nInternalFaces(); facei++)
141 label own = faceOwner()[facei];
142 if (unrefineableCells.get(own) == 0)
144 unrefineableCells.set(own, 1);
148 label nei = faceNeighbour()[facei];
149 if (unrefineableCells.get(nei) == 0)
151 unrefineableCells.set(nei, 1);
156 for (
label facei = nInternalFaces(); facei < nFaces(); facei++)
160 label own = faceOwner()[facei];
161 if (unrefineableCells.get(own) == 0)
163 unrefineableCells.set(own, 1);
177 void Foam::dynamicRefineFvMesh::readDict()
179 const dictionary refineDict
181 dynamicMeshDict().optionalSubDict(typeName +
"Coeffs")
184 List<Pair<word>> fluxVelocities = List<Pair<word>>
186 refineDict.lookup(
"correctFluxes")
189 correctFluxes_.resize(fluxVelocities.size());
192 correctFluxes_.insert(fluxVelocities[i][0], fluxVelocities[i][1]);
195 dumpLevel_ = Switch(refineDict.lookup(
"dumpLevel"));
201 Foam::dynamicRefineFvMesh::refine
207 polyTopoChange meshMod(*
this);
210 meshCutter_.setRefinement(cellsToRefine, meshMod);
214 autoPtr<mapPolyMesh> map = meshMod.changeMesh(*
this,
false);
216 Info<<
"Refined from " 218 <<
" to " << globalData().nTotalCells() <<
" cells." <<
endl;
223 for (
label facei = 0; facei < nInternalFaces(); facei++)
225 label oldFacei = map().faceMap()[facei];
227 if (oldFacei >= nInternalFaces())
230 <<
"New internal face:" << facei
231 <<
" fc:" << faceCentres()[facei]
232 <<
" originates from boundary oldFace:" << oldFacei
244 const labelList& faceMap = map().faceMap();
245 const labelList& reverseFaceMap = map().reverseFaceMap();
254 label oldFacei = faceMap[facei];
258 label masterFacei = reverseFaceMap[oldFacei];
263 <<
"Problem: should not have removed faces" 267 else if (masterFacei != facei)
269 masterFaces.insert(masterFacei);
275 Pout<<
"Found " << masterFaces.size() <<
" split faces " <<
endl;
278 HashTable<surfaceScalarField*> fluxes
280 lookupClass<surfaceScalarField>()
282 forAllIter(HashTable<surfaceScalarField*>, fluxes, iter)
284 if (!correctFluxes_.found(iter.key()))
287 <<
"Cannot find surfaceScalarField " << iter.key()
288 <<
" in user-provided flux mapping table " 289 << correctFluxes_ <<
endl 290 <<
" The flux mapping table is used to recreate the" 291 <<
" flux on newly created faces." <<
endl 292 <<
" Either add the entry if it is a flux or use (" 293 << iter.key() <<
" none) to suppress this warning." 298 const word& UName = correctFluxes_[iter.key()];
307 Pout<<
"Setting surfaceScalarField " << iter.key()
308 <<
" to NaN" <<
endl;
319 Pout<<
"Mapping flux " << iter.key()
320 <<
" using interpolated flux " << UName
329 lookupObject<volVectorField>(UName)
335 for (
label facei = 0; facei < nInternalFaces(); facei++)
337 label oldFacei = faceMap[facei];
342 phi[facei] = phiU[facei];
344 else if (reverseFaceMap[oldFacei] != facei)
347 phi[facei] = phiU[facei];
352 surfaceScalarField::Boundary& phiBf =
353 phi.boundaryFieldRef();
358 phiU.boundaryField()[
patchi];
360 label facei = patchPhi.patch().start();
364 label oldFacei = faceMap[facei];
369 patchPhi[i] = patchPhiU[i];
371 else if (reverseFaceMap[oldFacei] != facei)
374 patchPhi[i] = patchPhiU[i];
384 label facei = iter.key();
386 if (isInternalFace(facei))
388 phi[facei] = phiU[facei];
396 phiU.boundaryField()[
patchi];
400 patchPhi[i] = patchPhiU[i];
408 meshCutter_.updateMesh(map);
411 if (protectedCells_.size())
413 PackedBoolList newProtectedCell(nCells());
415 forAll(newProtectedCell, celli)
417 label oldCelli = map().cellMap()[celli];
418 newProtectedCell.set(celli, protectedCells_.get(oldCelli));
420 protectedCells_.transfer(newProtectedCell);
424 meshCutter_.checkRefinementLevels(-1,
labelList(0));
431 Foam::dynamicRefineFvMesh::unrefine
436 polyTopoChange meshMod(*
this);
439 meshCutter_.setUnrefinement(splitPoints, meshMod);
448 Map<label> faceToSplitPoint(3*splitPoints.size());
453 label pointi = splitPoints[i];
455 const labelList& pEdges = pointEdges()[pointi];
459 label otherPointi = edges()[pEdges[j]].otherVertex(pointi);
465 faceToSplitPoint.insert(pFaces[pFacei], otherPointi);
474 autoPtr<mapPolyMesh> map = meshMod.changeMesh(*
this,
false);
476 Info<<
"Unrefined from " 478 <<
" to " << globalData().nTotalCells() <<
" cells." 486 const labelList& reversePointMap = map().reversePointMap();
487 const labelList& reverseFaceMap = map().reverseFaceMap();
489 HashTable<surfaceScalarField*> fluxes
491 lookupClass<surfaceScalarField>()
493 forAllIter(HashTable<surfaceScalarField*>, fluxes, iter)
495 if (!correctFluxes_.found(iter.key()))
498 <<
"Cannot find surfaceScalarField " << iter.key()
499 <<
" in user-provided flux mapping table " 500 << correctFluxes_ <<
endl 501 <<
" The flux mapping table is used to recreate the" 502 <<
" flux on newly created faces." <<
endl 503 <<
" Either add the entry if it is a flux or use (" 504 << iter.key() <<
" none) to suppress this warning." 509 const word& UName = correctFluxes_[iter.key()];
518 Info<<
"Mapping flux " << iter.key()
519 <<
" using interpolated flux " << UName
524 surfaceScalarField::Boundary& phiBf =
525 phi.boundaryFieldRef();
531 lookupObject<volVectorField>(UName)
539 label oldFacei = iter.key();
540 label oldPointi = iter();
542 if (reversePointMap[oldPointi] < 0)
545 label facei = reverseFaceMap[oldFacei];
549 if (isInternalFace(facei))
551 phi[facei] = phiU[facei];
559 phiU.boundaryField()[
patchi];
561 patchPhi[i] = patchPhiU[i];
571 meshCutter_.updateMesh(map);
574 if (protectedCells_.size())
576 PackedBoolList newProtectedCell(nCells());
578 forAll(newProtectedCell, celli)
580 label oldCelli = map().cellMap()[celli];
583 newProtectedCell.set(celli, protectedCells_.get(oldCelli));
586 protectedCells_.transfer(newProtectedCell);
590 meshCutter_.checkRefinementLevels(-1,
labelList(0));
598 const word& cellZoneName
601 const label cellZoneID = cellZones().findZoneID(cellZoneName);
602 bool cellZoneFound = (cellZoneID != -1);
603 reduce(cellZoneFound, orOp<bool>());
607 <<
"cannot find cellZone " << cellZoneName
616 Foam::dynamicRefineFvMesh::cellToPoint(
const scalarField& vFld)
const 620 forAll(pointCells(), pointi)
622 const labelList& pCells = pointCells()[pointi];
627 sum += vFld[pCells[i]];
629 pFld[pointi] = sum/pCells.size();
638 const scalar minLevel,
639 const scalar maxLevel
646 scalar err =
min(fld[celli] - minLevel, maxLevel - fld[celli]);
662 const scalar minLevel,
663 const scalar maxLevel
670 const label celli = cells[i];
672 scalar err =
min(fld[celli] - minLevel, maxLevel - fld[celli]);
684 void Foam::dynamicRefineFvMesh::selectRefineCandidates
686 PackedBoolList& candidateCells,
687 const scalar lowerRefineLevel,
688 const scalar upperRefineLevel,
689 const scalar maxRefinement,
697 error(vFld, lowerRefineLevel, upperRefineLevel)
700 const labelList& cellLevel = meshCutter_.cellLevel();
707 cellLevel[celli] < maxRefinement
708 && cellError[celli] > 0
711 candidateCells.set(celli, 1);
717 void Foam::dynamicRefineFvMesh::selectRefineCandidates
719 PackedBoolList& candidateCells,
720 const scalar lowerRefineLevel,
721 const scalar upperRefineLevel,
722 const scalar maxRefinement,
731 error(vFld, cells, lowerRefineLevel, upperRefineLevel)
734 const labelList& cellLevel = meshCutter_.cellLevel();
741 cellLevel[celli] < maxRefinement
742 && cellError[celli] > 0
745 candidateCells.set(celli, 1);
751 Foam::scalar Foam::dynamicRefineFvMesh::selectRefineCandidates
753 PackedBoolList& candidateCells,
754 const dictionary& refineDict
757 const word fieldName(refineDict.lookup(
"field"));
759 const volScalarField& vFld = lookupObject<volScalarField>(fieldName);
761 const scalar lowerRefineLevel =
762 refineDict.lookup<scalar>(
"lowerRefineLevel");
763 const scalar upperRefineLevel =
764 refineDict.lookup<scalar>(
"upperRefineLevel");
766 const label maxRefinement = refineDict.lookup<
label>(
"maxRefinement");
768 if (maxRefinement <= 0)
771 <<
"Illegal maximum refinement level " << maxRefinement <<
nl 772 <<
"The maxCells setting in the dynamicMeshDict should" 777 if (refineDict.found(
"cellZone"))
780 selectRefineCandidates
787 findCellZone(refineDict.lookup(
"cellZone"))
793 selectRefineCandidates
803 return maxRefinement;
809 const label maxCells,
810 const label maxRefinement,
811 const PackedBoolList& candidateCells
815 label nTotToRefine = (maxCells - globalData().nTotalCells()) / 7;
817 const labelList& cellLevel = meshCutter_.cellLevel();
821 PackedBoolList unrefineableCells;
822 calculateProtectedCells(unrefineableCells);
825 label nLocalCandidates =
count(candidateCells, 1);
829 DynamicList<label> candidates(nLocalCandidates);
831 if (nCandidates < nTotToRefine)
833 forAll(candidateCells, celli)
837 candidateCells.get(celli)
839 unrefineableCells.empty()
840 || !unrefineableCells.get(celli)
844 candidates.append(celli);
851 for (
label level = 0; level < maxRefinement; level++)
853 forAll(candidateCells, celli)
857 cellLevel[celli] == level
858 && candidateCells.get(celli)
860 unrefineableCells.empty()
861 || !unrefineableCells.get(celli)
865 candidates.append(celli);
869 if (
returnReduce(candidates.size(), sumOp<label>()) > nTotToRefine)
879 meshCutter_.consistentRefinement
887 <<
" cells for refinement out of " << globalData().nTotalCells()
890 return consistentSet;
894 void Foam::dynamicRefineFvMesh::selectUnrefineCandidates
898 const scalar unrefineLevel
901 forAll(pointCells(), pointi)
903 const labelList& pCells = pointCells()[pointi];
905 scalar maxVal = -great;
908 maxVal =
max(maxVal, vFld[pCells[i]]);
911 unrefineCandidates[pointi] =
912 unrefineCandidates[pointi] && maxVal < unrefineLevel;
917 void Foam::dynamicRefineFvMesh::selectUnrefineCandidates
921 const cellZone& cZone,
922 const scalar unrefineLevel
925 const Map<label>& zoneMap(cZone.lookupMap());
927 forAll(pointCells(), pointi)
929 const labelList& pCells = pointCells()[pointi];
931 scalar maxVal = -great;
934 if (zoneMap.found(pCells[i]))
936 maxVal =
max(maxVal, vFld[pCells[i]]);
940 unrefineCandidates[pointi] =
941 unrefineCandidates[pointi] && maxVal < unrefineLevel;
946 void Foam::dynamicRefineFvMesh::selectUnrefineCandidates
949 const dictionary& refineDict
952 if (refineDict.found(
"unrefineLevel"))
954 const word fieldName(refineDict.lookup(
"field"));
957 lookupObject<volScalarField>(fieldName)
960 const scalar unrefineLevel =
961 refineDict.lookup<scalar>(
"unrefineLevel");
963 if (refineDict.found(
"cellZone"))
965 selectUnrefineCandidates
969 findCellZone(refineDict.lookup(
"cellZone")),
975 selectUnrefineCandidates
988 const PackedBoolList& markedCell,
993 const labelList splitPoints(meshCutter_.getSplitPoints());
995 DynamicList<label> newSplitPoints(splitPoints.size());
999 label pointi = splitPoints[i];
1001 if (unrefineCandidates[pointi])
1004 const labelList& pCells = pointCells()[pointi];
1006 bool hasMarked =
false;
1010 if (markedCell.get(pCells[pCelli]))
1019 newSplitPoints.append(pointi);
1025 newSplitPoints.shrink();
1030 meshCutter_.consistentUnrefinement
1037 <<
" split points out of a possible " 1041 return consistentSet;
1045 void Foam::dynamicRefineFvMesh::extendMarkedCells
1047 PackedBoolList& markedCell
1051 boolList markedFace(nFaces(),
false);
1053 forAll(markedCell, celli)
1055 if (markedCell.get(celli))
1057 const cell& cFaces =
cells()[celli];
1061 markedFace[cFaces[i]] =
true;
1069 for (
label facei = 0; facei < nInternalFaces(); facei++)
1071 if (markedFace[facei])
1073 markedCell.set(faceOwner()[facei], 1);
1074 markedCell.set(faceNeighbour()[facei], 1);
1077 for (
label facei = nInternalFaces(); facei < nFaces(); facei++)
1079 if (markedFace[facei])
1081 markedCell.set(faceOwner()[facei], 1);
1087 void Foam::dynamicRefineFvMesh::checkEightAnchorPoints
1089 PackedBoolList& protectedCell,
1093 const labelList& cellLevel = meshCutter_.cellLevel();
1094 const labelList& pointLevel = meshCutter_.pointLevel();
1098 forAll(pointLevel, pointi)
1100 const labelList& pCells = pointCells(pointi);
1104 label celli = pCells[pCelli];
1106 if (pointLevel[pointi] <= cellLevel[celli])
1109 if (nAnchorPoints[celli] == 8)
1111 if (protectedCell.set(celli,
true))
1117 if (!protectedCell[celli])
1119 nAnchorPoints[celli]++;
1126 forAll(protectedCell, celli)
1128 if (!protectedCell[celli] && nAnchorPoints[celli] != 8)
1130 protectedCell.set(celli,
true);
1144 nRefinementIterations_(0),
1145 protectedCells_(nCells(), 0)
1163 label nProtected = 0;
1171 label celli = pCells[i];
1173 if (!protectedCells_.
get(celli))
1175 if (pointLevel[pointi] <= cellLevel[celli])
1179 if (nAnchors[celli] > 8)
1181 protectedCells_.
set(celli, 1);
1204 neiLevel[facei] = cellLevel[
faceOwner()[facei]];
1225 if (pointLevel[f[fp]] <= faceLevel)
1231 protectedFace[facei] =
true;
1242 if (protectedFace[facei])
1252 if (protectedFace[facei])
1264 if (cFaces.
size() < 6)
1266 if (protectedCells_.
set(celli, 1))
1277 if (protectedCells_.
set(celli, 1))
1288 checkEightAnchorPoints(protectedCells_, nProtected);
1293 protectedCells_.
clear();
1298 cellSet protectedCells(*
this,
"protectedCells", nProtected);
1299 forAll(protectedCells_, celli)
1301 if (protectedCells_[celli])
1303 protectedCells.
insert(celli);
1308 <<
" cells that are protected from refinement." 1309 <<
" Writing these to cellSet " 1310 << protectedCells.
name()
1313 protectedCells.
write();
1338 bool hasChanged =
false;
1340 if (refineInterval == 0)
1346 else if (refineInterval < 0)
1349 <<
"Illegal refineInterval " << refineInterval <<
nl 1350 <<
"The refineInterval setting in the dynamicMeshDict should" 1351 <<
" be >= 1." <<
nl 1365 <<
"Illegal maximum number of cells " << maxCells <<
nl 1366 <<
"The maxCells setting in the dynamicMeshDict should" 1371 const label nBufferLayers =
1377 label maxRefinement = 0;
1379 if (refineDict.
isDict(
"refinementRegions"))
1383 refineDict.
subDict(
"refinementRegions")
1390 selectRefineCandidates
1401 maxRefinement = selectRefineCandidates(refineCells, refineDict);
1423 if (nCellsToRefine > 0)
1431 const labelList& cellMap = map().cellMap();
1432 const labelList& reverseCellMap = map().reverseCellMap();
1438 label oldCelli = cellMap[celli];
1442 newRefineCell.set(celli, 1);
1444 else if (reverseCellMap[oldCelli] != celli)
1446 newRefineCell.set(celli, 1);
1450 newRefineCell.set(celli, refineCells.get(oldCelli));
1453 refineCells.
transfer(newRefineCell);
1458 for (
label i = 0; i < nBufferLayers; i++)
1460 extendMarkedCells(refineCells);
1469 if (refineDict.
isDict(
"refinementRegions"))
1473 refineDict.
subDict(
"refinementRegions")
1478 selectUnrefineCandidates
1487 selectUnrefineCandidates
1498 selectUnrefinePoints
1507 pointsToUnrefine.
size(),
1511 if (nSplitPoints > 0)
1514 unrefine(pointsToUnrefine);
1521 if ((nRefinementIterations_ % 10) == 0)
1527 nRefinementIterations_++;
1556 && meshCutter_.
write(write)
1580 scalarCellLevel[celli] = cellLevel[celli];
1583 writeOk = writeOk && scalarCellLevel.
write();
fvsPatchField< scalar > fvsPatchScalarField
const refinementHistory & history() const
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
bool moving() const
Is mesh moving.
const hexRef8 & meshCutter() const
Direct access to the refinement engine.
errorManipArg< error, int > exit(error &err, const int errNo=1)
unsigned int get(const label) const
Get value at index I.
A face is a list of labels corresponding to mesh vertices.
const labelIOList & pointLevel() const
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label nInternalFaces() const
virtual const labelList & faceNeighbour() const
Return face neighbour.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write using given format, version and compression.
Encapsulates queries for volume refinement ('refine all cells within shell').
const cellList & cells() const
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const dimensionSet dimless
const Time & time() const
Return the top-level database.
bool insert(const Key &key)
Insert a new entry.
const dimensionedScalar c
Speed of light in a vacuum.
label size() const
Return number of elements in table.
Macros for easy insertion into run-time selection tables.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write the underlying polyMesh and other data.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
DynamicID< meshCellZones > cellZoneID
Foam::cellZoneID.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
List< bool > boolList
Bool container classes.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
virtual bool update()
Update the mesh for both mesh motion and topology change.
void set(const PackedList< 1 > &)
Set specified bits.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
Pre-declare SubField and related Field type.
Refinement of (split) hexes using polyTopoChange.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
bool write(const bool write=true) const
Force writing refinement+history to polyMesh directory.
virtual const labelList & faceOwner() const
Return face owner.
streamFormat
Enumeration for the format of data in the stream.
const globalMeshData & globalData() const
Return parallel info.
List< label > labelList
A List of labels.
virtual const faceList & faces() const
Return raw faces.
static void fillNan(UList< scalar > &)
Fill block of data with NaN.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
errorManip< error > abort(error &err)
void clear()
Clear the list, i.e. set addressable size to zero.
const labelListList & pointCells() const
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=*(cellModeller::lookup("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]=cellShape(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, &mergedCyclicPolyPatch::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]
compressionType
Enumeration for the format of data in the stream.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
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.
void setInstance(const fileName &)
Set the instance for mesh files.
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dynamicRefineFvMesh(const IOobject &io)
Construct from IOobject.
A cell is defined as a list of faces with extra functionality.
Abstract base class for geometry and/or topology changing fvMesh.
A collection of cell labels.
prefixOSstream Pout(cout, "Pout")
bool topoChanging() const
Is mesh topology changing.
virtual ~dynamicRefineFvMesh()
Destructor.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
virtual bool write(const bool write=true) const
Write using setting from DB.
All refinement history. Used in unrefinement.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
const labelIOList & cellLevel() const
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & dynamicMeshDict() const
Return the dynamicMeshDict.