61 const label zonei = zoneID[own[facei]];
62 const label ownType =
cellTypes[own[facei]];
63 const label neiType =
cellTypes[nei[facei]];
66 (ownType == cellCellStencil::CALCULATED)
67 && (neiType == cellCellStencil::INTERPOLATED);
70 (ownType == cellCellStencil::INTERPOLATED)
71 && (neiType == cellCellStencil::CALCULATED);
73 const bool ownOrCalc = (ownCalc || neiCalc);
77 (ownOrCalc && (zonei == zoneId))
78 || (ownOrCalc && (zoneId == -1))
103 syncTools::swapBoundaryCellList(
mesh,
cellTypes, neiCellTypes);
115 const label facei = start + i;
116 const label celli = fc[i];
118 const label neiType = neiCellTypes[facei -
mesh.nInternalFaces()];
120 const label zonei = zoneID[celli];
123 (ownType == cellCellStencil::CALCULATED)
124 && (neiType == cellCellStencil::INTERPOLATED);
126 if (ownCalc && (zonei == zoneId))
129 scalar
flux = phip[i];
145 const scalar massCorr = massIn/(massOut + SMALL);
149 Info<<
"Zone : " << zoneId <<
nl 150 <<
"mass outflow : " << massOut <<
nl 151 <<
"mass inflow : " << massIn <<
nl 152 <<
"correction factor : " << massCorr <<
endl;
159 const label zonei = zoneID[own[facei]];
161 const label ownType =
cellTypes[own[facei]];
162 const label neiType =
cellTypes[nei[facei]];
165 (ownType == cellCellStencil::CALCULATED)
166 && (neiType == cellCellStencil::INTERPOLATED);
169 (ownType == cellCellStencil::INTERPOLATED)
170 && (neiType == cellCellStencil::CALCULATED);
172 const bool ownOrCalc = (ownCalc || neiCalc);
176 (ownOrCalc && (zonei == zoneId)) || (ownOrCalc && (zoneId == -1))
207 const label facei = start + i;
208 const label celli = fc[i];
209 const label zonei = zoneID[celli];
211 const label neiType = neiCellTypes[facei -
mesh.nInternalFaces()];
214 (ownType == cellCellStencil::CALCULATED)
215 && (neiType == cellCellStencil::INTERPOLATED);
218 (ownType == cellCellStencil::INTERPOLATED)
219 && (neiType == cellCellStencil::CALCULATED);
221 const bool ownOrCalc = (ownCalc || neiCalc);
223 if (ownOrCalc && (zonei == zoneId))
226 scalar
flux = phip[i];
250 scalar massOutCheck = 0;
251 scalar massInCheck = 0;
255 const label zonei = zoneID[own[facei]];
256 const label ownType =
cellTypes[own[facei]];
257 const label neiType =
cellTypes[nei[facei]];
260 (ownType == cellCellStencil::CALCULATED)
261 && (neiType == cellCellStencil::INTERPOLATED);
264 (ownType == cellCellStencil::INTERPOLATED)
265 && (neiType == cellCellStencil::CALCULATED);
267 const bool ownOrCalc = (ownCalc || neiCalc);
271 (ownOrCalc && (zonei == zoneId))||(ownOrCalc && (zoneId == -1))
287 massOutCheck +=
flux;
292 Info<<
"mass in:" << massInCheck <<
" out:" << massOutCheck <<
nl;
label start() const noexcept
The patch start within the polyMesh face list.
const fvPatch & patch() const noexcept
Return the patch.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
void reduce(T &value, [[maybe_unused]] BinaryOp bop, [[maybe_unused]] const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce)
#define forAll(list, i)
Loop across all elements in list.
virtual const labelUList & faceCells() const
Return faceCells.
const cellCellStencilObject & overlap
const labelUList & cellTypes
bool oversetAdjustPhi(surfaceScalarField &phi, const volVectorField &U, const label zoneId=-1)
Adjust the balance of fluxes to obey continuity.
int debug
Static debugging option.
Mesh data needed to do the Finite Volume discretisation.
messageStream Info
Information stream (stdout output on master, null elsewhere)
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Adjust the balance of fluxes on the faces between interpolated and calculated to obey continuity...