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")
184 auto fluxVelocities = refineDict.get<List<Pair<word>>>(
"correctFluxes");
187 correctFluxes_.reserve(fluxVelocities.size());
188 for (
const auto& pr : fluxVelocities)
190 correctFluxes_.insert(pr.first(), pr.second());
193 refineDict.readEntry(
"dumpLevel", dumpLevel_);
208 const labelList& cellMap = mpm.cellMap();
209 const labelList& reverseCellMap = mpm.reverseCellMap();
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];
240 const auto& cellsFromCells = mpm.cellsFromCellsMap();
241 for (
const auto&
s : cellsFromCells)
244 const label celli =
s.index();
245 correctedV0[celli] = V[celli];
253 setV0().field() = correctedV0;
261 const labelList& reverseFaceMap = mpm.reverseFaceMap();
268 bitSet masterFaces(nFaces());
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;
298 UPtrList<surfaceScalarField> fluxes
300 this->objectRegistry::sorted<surfaceScalarField>()
315 <<
"Cannot find surfaceScalarField " <<
phi.name()
316 <<
" in user-provided flux mapping table " 317 << correctFluxes_ <<
endl 318 <<
" The flux mapping table is used to recreate the" 319 <<
" flux on newly created faces." <<
endl 320 <<
" Either add the entry if it is a flux or use (" 321 <<
phi.name() <<
" none) to suppress this warning." 331 Pout<<
"Setting surfaceScalarField " <<
phi.name()
332 <<
" to NaN" <<
endl;
340 Pout<<
"Mapping flux " <<
phi.name()
341 <<
" using interpolated flux " <<
UName 349 lookupObject<volVectorField>(
UName)
355 for (label facei = 0; facei < nInternalFaces(); ++facei)
357 const label oldFacei =
faceMap[facei];
362 phi[facei] = phiU[facei];
364 else if (reverseFaceMap[oldFacei] != facei)
367 phi[facei] = phiU[facei];
372 auto& phiBf =
phi.boundaryFieldRef();
378 phiU.boundaryField()[patchi];
380 label facei = patchPhi.patch().start();
384 const label oldFacei =
faceMap[facei];
389 patchPhi[i] = patchPhiU[i];
391 else if (reverseFaceMap[oldFacei] != facei)
394 patchPhi[i] = patchPhiU[i];
402 for (
const label facei : masterFaces)
404 if (isInternalFace(facei))
406 phi[facei] = phiU[facei];
410 const label patchi = boundaryMesh().whichPatch(facei);
411 const label i = facei - boundaryMesh()[patchi].start();
414 phiU.boundaryField()[patchi];
418 patchPhi[i] = patchPhiU[i];
430 mapNewInternalFaces<scalar>(this->Sf(), this->magSf(),
faceMap);
431 mapNewInternalFaces<vector>(this->Sf(), this->magSf(),
faceMap);
434 mapNewInternalFaces<sphericalTensor>(
faceMap);
435 mapNewInternalFaces<symmTensor>(
faceMap);
436 mapNewInternalFaces<tensor>(
faceMap);
449 polyTopoChange meshMod(*
this);
452 meshCutter_.setRefinement(cellsToRefine, meshMod);
462 autoPtr<mapPolyMesh> map = meshMod.changeMesh(*
this,
false);
464 Info<<
"Refined from " 466 <<
" to " << globalData().nTotalCells() <<
" cells." <<
endl;
471 for (label facei = 0; facei < nInternalFaces(); ++facei)
473 const label oldFacei = map().faceMap()[facei];
475 if (oldFacei >= nInternalFaces())
478 <<
"New internal face:" << facei
479 <<
" fc:" << faceCentres()[facei]
480 <<
" originates from boundary oldFace:" << oldFacei
512 meshCutter_.updateMesh(*map);
515 if (protectedCell_.size())
517 bitSet newProtectedCell(nCells());
519 forAll(newProtectedCell, celli)
521 const label oldCelli = map().cellMap()[celli];
522 if (protectedCell_.test(oldCelli))
524 newProtectedCell.set(celli);
527 protectedCell_.transfer(newProtectedCell);
531 meshCutter_.checkRefinementLevels(-1,
labelList());
546 meshCutter_.setUnrefinement(splitPoints, meshMod);
558 for (
const label pointi : splitPoints)
560 const labelList& pEdges = pointEdges()[pointi];
562 for (
const label edgei : pEdges)
564 const label otherPointi = edges()[edgei].otherVertex(pointi);
568 for (
const label facei :
pFaces)
570 faceToSplitPoint.insert(facei, otherPointi);
585 autoPtr<mapPolyMesh> map = meshMod.
changeMesh(*
this,
false);
587 Info<<
"Unrefined from " 589 <<
" to " << globalData().nTotalCells() <<
" cells." 612 const labelList& reversePointMap = map().reversePointMap();
613 const labelList& reverseFaceMap = map().reverseFaceMap();
615 UPtrList<surfaceScalarField> fluxes
617 this->objectRegistry::sorted<surfaceScalarField>()
627 <<
"Cannot find surfaceScalarField " <<
phi.name()
628 <<
" in user-provided flux mapping table " 629 << correctFluxes_ <<
endl 630 <<
" The flux mapping table is used to recreate the" 631 <<
" flux on newly created faces." <<
endl 632 <<
" Either add the entry if it is a flux or use (" 633 <<
phi.name() <<
" none) to suppress this warning." 643 <<
"Mapping flux " <<
phi.name()
644 <<
" using interpolated flux " <<
UName 647 auto& phiBf =
phi.boundaryFieldRef();
653 lookupObject<volVectorField>(
UName)
661 const label oldFacei = iter.key();
662 const label oldPointi = iter.val();
664 if (reversePointMap[oldPointi] < 0)
667 const label facei = reverseFaceMap[oldFacei];
671 if (isInternalFace(facei))
673 phi[facei] = phiU[facei];
677 label patchi = boundaryMesh().whichPatch(facei);
678 label i = facei - boundaryMesh()[patchi].start();
681 phiU.boundaryField()[patchi];
683 patchPhi[i] = patchPhiU[i];
693 meshCutter_.updateMesh(*map);
696 if (protectedCell_.size())
698 bitSet newProtectedCell(nCells());
700 forAll(newProtectedCell, celli)
702 const label oldCelli = map().cellMap()[celli];
703 if (protectedCell_.test(oldCelli))
705 newProtectedCell.set(celli);
708 protectedCell_.transfer(newProtectedCell);
727 for (
const label celli : pCells)
729 vFld[celli] =
max(vFld[celli], pFld[pointi]);
741 forAll(pointCells(), pointi)
743 const labelList& pCells = pointCells()[pointi];
745 for (
const label celli : pCells)
747 pFld[pointi] =
max(pFld[pointi], vFld[celli]);
759 forAll(pointCells(), pointi)
761 const labelList& pCells = pointCells()[pointi];
764 for (
const label celli : pCells)
768 pFld[pointi] =
sum/pCells.size();
777 const scalar minLevel,
778 const scalar maxLevel
785 scalar err =
min(
fld[i]-minLevel, maxLevel-
fld[i]);
798 const scalar lowerRefineLevel,
799 const scalar upperRefineLevel,
801 bitSet& candidateCell
822 if (cellError[celli] > 0)
824 candidateCell.set(celli);
832 const label maxCells,
833 const label maxRefinement,
834 const bitSet& candidateCell
838 label nTotToRefine = (maxCells - globalData().nTotalCells()) / 7;
840 const labelList& cellLevel = meshCutter_.cellLevel();
844 bitSet unrefineableCell;
845 calculateProtectedCells(unrefineableCell);
848 label nLocalCandidates = candidateCell.count();
849 label nCandidates =
returnReduce(nLocalCandidates, sumOp<label>());
852 DynamicList<label> candidates(nLocalCandidates);
854 if (nCandidates < nTotToRefine)
856 for (
const label celli : candidateCell)
860 (!unrefineableCell.test(celli))
861 && cellLevel[celli] < maxRefinement
864 candidates.append(celli);
871 for (label level = 0; level < maxRefinement; ++level)
873 for (
const label celli : candidateCell)
877 (!unrefineableCell.test(celli))
878 && cellLevel[celli] == level
881 candidates.append(celli);
885 if (
returnReduce(candidates.size(), sumOp<label>()) > nTotToRefine)
895 meshCutter_.consistentRefinement
903 <<
" cells for refinement out of " << globalData().nTotalCells()
906 return consistentSet;
912 const scalar unrefineLevel,
918 const labelList splitPoints(meshCutter_.getSplitPoints());
928 if (protectedCell_.size())
935 if (protectedCell_.test(celli))
937 protectedPoint.
set(pointi);
953 <<
" protected cells found " 955 <<
" protected points." <<
endl;
959 DynamicList<label> newSplitPoints(splitPoints.
size());
961 for (
const label pointi : splitPoints)
963 if (!protectedPoint[pointi] && pFld[pointi] < unrefineLevel)
966 bool hasMarked =
false;
968 for (
const label celli : pointCells[pointi])
970 if (markedCell.
test(celli))
979 newSplitPoints.append(pointi);
985 newSplitPoints.shrink();
990 meshCutter_.consistentUnrefinement
997 <<
" split points out of a possible " 1001 return consistentSet;
1011 bitSet markedFace(nFaces());
1013 for (
const label celli : markedCell)
1021 for (label facei = 0; facei < nInternalFaces(); ++facei)
1023 if (markedFace.
test(facei))
1025 markedCell.set(faceOwner()[facei]);
1026 markedCell.set(faceNeighbour()[facei]);
1029 for (label facei = nInternalFaces(); facei < nFaces(); ++facei)
1031 if (markedFace.
test(facei))
1033 markedCell.set(faceOwner()[facei]);
1041 bitSet& protectedCell
1044 const labelList& cellLevel = meshCutter_.cellLevel();
1045 const labelList& pointLevel = meshCutter_.pointLevel();
1049 forAll(pointLevel, pointi)
1051 const labelList& pCells = pointCells(pointi);
1053 for (
const label celli : pCells)
1055 if (pointLevel[pointi] <= cellLevel[celli])
1058 if (nAnchorPoints[celli] == 8)
1060 protectedCell.set(celli);
1063 if (!protectedCell.test(celli))
1065 ++nAnchorPoints[celli];
1072 forAll(protectedCell, celli)
1074 if (nAnchorPoints[celli] != 8)
1076 protectedCell.set(celli);
1084 Foam::dynamicRefineFvMesh::dynamicRefineFvMesh
1091 dynamicMotionSolverListFvMesh(
io, doInit),
1110 protectedCell_.setSize(nCells());
1111 nRefinementIterations_ = 0;
1118 const labelList& cellLevel = meshCutter_.cellLevel();
1119 const labelList& pointLevel = meshCutter_.pointLevel();
1131 forAll(pointCells(), pointi)
1133 const labelList& pCells = pointCells()[pointi];
1135 for (
const label celli : pCells)
1137 if (!protectedCell_.test(celli))
1139 if (pointLevel[pointi] <= cellLevel[celli])
1143 if (nAnchors[celli] > 8)
1145 protectedCell_.
set(celli);
1161 for (label facei = 0; facei < nInternalFaces(); ++facei)
1163 neiLevel[facei] = cellLevel[faceNeighbour()[facei]];
1165 for (label facei = nInternalFaces(); facei < nFaces(); ++facei)
1167 neiLevel[facei] = cellLevel[faceOwner()[facei]];
1172 bitSet protectedFace(nFaces());
1174 forAll(faceOwner(), facei)
1176 const label faceLevel =
max 1178 cellLevel[faceOwner()[facei]],
1182 const face&
f = faces()[facei];
1186 for (
const label pointi :
f)
1188 if (pointLevel[pointi] <= faceLevel)
1194 protectedFace.
set(facei);
1203 for (label facei = 0; facei < nInternalFaces(); ++facei)
1205 if (protectedFace.test(facei))
1207 protectedCell_.set(faceOwner()[facei]);
1208 protectedCell_.set(faceNeighbour()[facei]);
1211 for (label facei = nInternalFaces(); facei < nFaces(); ++facei)
1213 if (protectedFace.test(facei))
1215 protectedCell_.set(faceOwner()[facei]);
1222 const cell& cFaces =
cells()[celli];
1224 if (cFaces.size() < 6)
1226 protectedCell_.
set(celli);
1230 for (
const label cfacei : cFaces)
1232 if (faces()[cfacei].size() < 4)
1234 protectedCell_.set(celli);
1242 checkEightAnchorPoints(protectedCell_);
1247 protectedCell_.clear();
1251 cellSet protectedCells
1260 <<
" cells that are protected from refinement." 1261 <<
" Writing these to cellSet " 1262 << protectedCells.name()
1265 protectedCells.
write();
1292 ).optionalSubDict(typeName +
"Coeffs")
1295 const label refineInterval = refineDict.
get<label>(
"refineInterval");
1297 bool hasChanged =
false;
1299 if (refineInterval == 0)
1301 topoChanging(hasChanged);
1305 else if (refineInterval < 0)
1308 <<
"Illegal refineInterval " << refineInterval <<
nl 1309 <<
"The refineInterval setting in the dynamicMeshDict should" 1310 <<
" be >= 1." <<
nl 1320 const label maxCells = refineDict.
get<label>(
"maxCells");
1325 <<
"Illegal maximum number of cells " << maxCells <<
nl 1326 <<
"The maxCells setting in the dynamicMeshDict should" 1331 const label maxRefinement = refineDict.
get<label>(
"maxRefinement");
1333 if (maxRefinement <= 0)
1336 <<
"Illegal maximum refinement level " << maxRefinement <<
nl 1337 <<
"The maxCells setting in the dynamicMeshDict should" 1342 const word fieldName(refineDict.
get<word>(
"field"));
1344 const volScalarField& vFld = lookupObject<volScalarField>(fieldName);
1346 const scalar lowerRefineLevel =
1347 refineDict.
get<scalar>(
"lowerRefineLevel");
1348 const scalar upperRefineLevel =
1349 refineDict.
get<scalar>(
"upperRefineLevel");
1350 const scalar unrefineLevel = refineDict.
getOrDefault<scalar>
1355 const label nBufferLayers = refineDict.
get<label>(
"nBufferLayers");
1358 bitSet refineCell(nCells());
1361 selectRefineCandidates
1369 if (globalData().nTotalCells() < maxCells)
1386 autoPtr<mapPolyMesh> map = refine(cellsToRefine);
1391 const labelList& cellMap = map().cellMap();
1392 const labelList& reverseCellMap = map().reverseCellMap();
1394 bitSet newRefineCell(cellMap.size());
1398 const label oldCelli = cellMap[celli];
1403 || (reverseCellMap[oldCelli] != celli)
1404 || (refineCell.test(oldCelli))
1407 newRefineCell.set(celli);
1410 refineCell.transfer(newRefineCell);
1415 for (label i = 0; i < nBufferLayers; ++i)
1417 extendMarkedCells(refineCell);
1429 selectUnrefinePoints
1440 unrefine(pointsToUnrefine);
1447 if ((nRefinementIterations_ % 10) == 0)
1451 const_cast<refinementHistory&
>(meshCutter().history()).compact();
1453 nRefinementIterations_++;
1456 topoChanging(hasChanged);
1470 bool hasChanged = updateTopology();
1481 const bool writeOnProc
1485 const_cast<hexRef8&
>(meshCutter_).setInstance(time().timeName());
1491 && meshCutter_.write(writeOnProc)
1511 const labelList& cellLevel = meshCutter_.cellLevel();
1515 scalarCellLevel[celli] = cellLevel[celli];
1518 writeOk = writeOk && scalarCellLevel.
write();
void calculateProtectedCells(bitSet &unrefineableCell) const
Calculate cells that cannot be refined since would trigger.
fvsPatchField< scalar > fvsPatchScalarField
void size(const label n)
Older name for setAddressableSize.
unsigned int count(const bool on=true) const
Count number of bits set.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
void set(const bitSet &bitset)
Set specified bits from another bitset.
bool updateTopology()
Update topology (refinement, unrefinement)
scalarField maxPointField(const scalarField &) const
Get per cell max of connected point.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write the underlying polyMesh and other data.
labelHashSet used(const bitSet &select)
Convert a bitset to a labelHashSet of the indices used.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word UName(propsDict.getOrDefault< word >("U", "U"))
void checkEightAnchorPoints(bitSet &protectedCell) const
Check all cells have 8 anchor points.
virtual const labelList & faceNeighbour() const
Return face neighbour.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
scalarField cellToPoint(const scalarField &vFld) const
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.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool update()
Update the mesh for both mesh motion and topology change.
bitSet protectedCell_
Protected cells (usually since not hexes)
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
Smooth ATC in cells having a point to a set of patches supplied by type.
A simple container for options an IOstream can normally have.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
label nFaces() const noexcept
Number of mesh faces.
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.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
A fvMesh with built-in refinement.
Macros for easy insertion into run-time selection tables.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual labelList selectUnrefinePoints(const scalar unrefineLevel, const bitSet &markedCell, const scalarField &pFld) const
Select points that can be unrefined.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual bool update()
Update the mesh for both mesh motion and topology change.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write using stream options.
virtual autoPtr< mapPolyMesh > unrefine(const labelList &)
Unrefine cells. Gets passed in centre points of cells to combine.
virtual void selectRefineCandidates(const scalar lowerRefineLevel, const scalar upperRefineLevel, const scalarField &vFld, bitSet &candidateCell) const
Select candidate cells for refinement.
virtual void mapFields(const mapPolyMesh &mpm)
Map all fields in time using given map. Triggered by topo change.
Refinement of (split) hexes using polyTopoChange.
hexRef8 meshCutter_
Mesh cutting engine.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual labelList selectRefineCells(const label maxCells, const label maxRefinement, const bitSet &candidateCell) const
Subset candidate cells for refinement.
virtual const labelList & faceOwner() const
Return face owner.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
static const word null
An empty word.
virtual autoPtr< mapPolyMesh > refine(const labelList &)
Refine cells. Update mesh and fields.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
label nInternalFaces() const noexcept
Number of internal faces.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
void clear()
Clear the list, i.e. set addressable size to zero.
bool test(const label pos) const
Test for True value at specified position, never auto-vivify entries.
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
#define DebugInfo
Report an information message using Foam::Info.
virtual void mapFields(const mapPolyMesh &mpm)
Map all fields in time using given map.
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
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]
void extendMarkedCells(bitSet &markedCell) const
Extend markedCell with cell-face-cell.
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.
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;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void readDict()
Read the projection parameters from dictionary.
static void fillNan(char *buf, size_t count)
Fill data block with signaling_NaN values.
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void clearOut()
Clear all geometry and addressing.
Abstract base class for geometry and/or topology changing fvMesh.
Direct mesh changes based on v1.3 polyTopoChange syntax.
const dimensionedScalar c
Speed of light in a vacuum.
messageStream Info
Information stream (stdout output on master, null elsewhere)
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
List< label > labelList
A List of labels.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
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))
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
bool returnReduceOr(const bool value, const label comm=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
Defines the attributes of an object for which implicit objectRegistry management is supported...
scalarField error(const scalarField &fld, const scalar minLevel, const scalar maxLevel) const
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Do not request registration (bool: false)
const labelIOList & cellLevel() const
forAllConstIters(mixture.phases(), phase)
scalarField maxCellField(const volScalarField &) const
Get point max of connected cell.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)