41 scalar maxRatio = 1 + coeff;
51 const label own = owner[facei];
52 const label nbr = neighbour[facei];
55 if (field[own] > maxRatio*field[nbr])
57 changedFaces.append(facei);
58 changedFacesInfo.append(
smoothData(field[own]));
60 else if (field[nbr] > maxRatio*field[own])
62 changedFaces.append(facei);
63 changedFacesInfo.append(
smoothData(field[nbr]));
79 changedFaces.
append(facei);
80 changedFacesInfo.append(
smoothData(field[own]));
85 changedFaces.shrink();
86 changedFacesInfo.shrink();
93 cellData[celli] = field[celli];
100 td.maxRatio = maxRatio;
116 field[celli] = cellData[celli].value();
128 const scalar alphaDiff,
129 const scalar alphaMax,
130 const scalar alphaMin
143 cellData[celli] = field[celli];
154 const label own = owner[facei];
155 const label nbr = neighbour[facei];
157 if (
mag(alpha[own] - alpha[nbr]) > alphaDiff)
159 changedFaces.append(facei);
160 changedFacesInfo.append
184 if (
mag(alpha[own] - alphapn[patchFacei]) > alphaDiff)
186 changedFaces.
append(facei);
187 changedFacesInfo.append(
smoothData(field[own]));
193 changedFaces.shrink();
194 changedFacesInfo.shrink();
208 smoothData.
setFaceInfo(changedFaces, changedFacesInfo);
214 field[celli] = cellData[celli].value();
226 const scalar alphaDiff
246 const label own = owner[facei];
247 const label nbr = neighbour[facei];
249 if (
mag(alpha[own] - alpha[nbr]) > alphaDiff)
251 changedFaces.append(facei);
252 changedFacesInfo.append
276 if (
mag(alpha[own] - alphapn[patchFacei]) > alphaDiff)
278 changedFaces.
append(facei);
279 changedFacesInfo.append
288 changedFaces.shrink();
289 changedFacesInfo.shrink();
299 sweepData.
setFaceInfo(changedFaces, changedFacesInfo);
305 if (cellData[celli].valid(sweepData.
data()))
307 field[celli] =
max(field[celli], cellData[celli].value());
Mesh data needed to do the Finite Volume discretisation.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
void setFaceInfo(const labelList &changedFaces, const List< Type > &changedFacesInfo)
Set initial changed faces.
dimensioned< scalar > mag(const dimensioned< Type > &)
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
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 labelUList & owner() const
Internal face owner.
void spread(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2, const scalar alphaMax=0.99, const scalar alphaMin=0.01)
Helper class used by fvc::sweep function.
const Mesh & mesh() const
Return mesh.
void sweep(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2)
A patch is a list of labels that address the faces in the global face list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Wave propagation of information through grid. Every iteration information goes through one layer of c...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
scalar maxRatio
Cut off distance.
label nTotalCells() const
Return total number of cells in decomposed mesh.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
label start() const
Return start label of this patch in the polyMesh face list.
Class used to pass additional data in.
void correctBoundaryConditions()
Correct boundary field.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const TrackingData & data() const
Additional data to be passed into container.
void append(const T &)
Append an element at the end of the list.
Helper class used by the fvc::smooth and fvc::spread functions.
label iterate(const label maxIter)
Iterate until no changes or maxIter reached. Returns actual.
const labelUList & neighbour() const
Internal face neighbour.
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...
void smooth(volScalarField &field, const scalar coeff)
const globalMeshData & globalData() const
Return parallel info.
const vectorField & faceCentres() const