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());
const TrackingData & data() const
Additional data to be passed into container.
#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.
label iterate(const label maxIter)
Iterate until no changes or maxIter reached. Returns actual.
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)
Class used to pass additional data in.
void setFaceInfo(const labelList &changedFaces, const List< Type > &changedFacesInfo)
Set initial changed faces.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
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...
const vectorField & faceCentres() const
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
void smooth(volScalarField &field, const scalar coeff)
Helper class used by fvc::sweep function.
Helper class used by the fvc::smooth and fvc::spread functions.
void sweep(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2)
label start() const
Return start label of this patch in the polyMesh face list.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const labelUList & neighbour() const
Internal face neighbour.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
void append(const T &)
Append an element at the end of the list.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const globalMeshData & globalData() const
Return parallel info.
const Mesh & mesh() const
Return mesh.
scalar maxRatio
Cut off distance.
Mesh data needed to do the Finite Volume discretisation.
void correctBoundaryConditions()
Correct boundary field.
dimensioned< scalar > mag(const dimensioned< Type > &)
const labelUList & owner() const
Internal face owner.
virtual const labelList & faceOwner() const
Return face owner.
A patch is a list of labels that address the faces in the global face list.
label nTotalCells() const
Return total number of cells in decomposed mesh.
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...