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 polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#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.
virtual 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 > &)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
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...
label nTotalCells() const
Return total number of cells in decomposed mesh.
void smooth(volScalarField &field, const scalar coeff)
Helper class used by fvc::sweep function.
const labelUList & neighbour() const
Internal face neighbour.
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)
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.
virtual const labelList & faceOwner() const
Return face owner.
const globalMeshData & globalData() const
Return parallel info.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const Mesh & mesh() const
Return mesh.
const labelUList & owner() const
Internal face owner.
const vectorField & faceCentres() const
const TrackingData & data() const
Additional data to be passed into container.
scalar maxRatio
Cut off distance.
Mesh data needed to do the Finite Volume discretisation.
label start() const
Return start label of this patch in the polyMesh face list.
void correctBoundaryConditions()
Correct boundary field.
dimensioned< scalar > mag(const dimensioned< Type > &)
A patch is a list of labels that address the faces in the global face list.
Provides functions smooth spread and sweep which use the FaceCellWave algorithm to smooth and redistr...