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 changedPatchAndFaces.append(
labelPair(-1, facei));
58 changedFacesInfo.append(
smoothData(field[own]));
60 else if (field[nbr] > maxRatio*field[own])
62 changedPatchAndFaces.append(
labelPair(-1, facei));
63 changedFacesInfo.append(
smoothData(field[nbr]));
79 changedFacesInfo.append(
smoothData(field[own]));
84 changedPatchAndFaces.shrink();
85 changedFacesInfo.shrink();
91 cellData[celli] = field[celli];
115 changedPatchAndFaces,
126 field[celli] = cellData[celli].value();
138 const scalar alphaDiff,
139 const scalar alphaMax,
140 const scalar alphaMin
153 const label own = owner[facei];
154 const label nbr = neighbour[facei];
157 if (
mag(alpha[own] - alpha[nbr]) > alphaDiff)
159 changedPatchAndFaces.append(
labelPair(-1, facei));
160 changedFacesInfo.append(
smoothData(
max(field[own], field[nbr])));
180 if (
mag(alpha[own] - alphapn[patchFacei]) > alphaDiff)
183 changedFacesInfo.append(
smoothData(field[own]));
189 changedPatchAndFaces.shrink();
190 changedFacesInfo.shrink();
196 cellData[celli] = field[celli];
226 smoothData.
setFaceInfo(changedPatchAndFaces, changedFacesInfo);
232 field[celli] = cellData[celli].value();
244 const scalar alphaDiff
259 const label own = owner[facei];
260 const label nbr = neighbour[facei];
263 if (
mag(alpha[own] - alpha[nbr]) > alphaDiff)
265 changedPatchAndFaces.append(
labelPair(-1, facei));
266 changedFacesInfo.append
289 if (
mag(alpha[own] - alphapn[patchFacei]) > alphaDiff)
292 changedFacesInfo.append
301 changedPatchAndFaces.shrink();
302 changedFacesInfo.shrink();
329 sweepData.
setFaceInfo(changedPatchAndFaces, changedFacesInfo);
335 if (cellData[celli].valid(sweepData.
data()))
337 field[celli] =
max(field[celli], cellData[celli].value());
#define forAll(list, i)
Loop across all elements in list.
Wave propagation of information through grid. Every iteration information goes through one layer of c...
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
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.
const surfaceVectorField & Cf() const
Return face centres.
label nInternalFaces() const
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...
const TrackingData & data() const
Additional data to be passed into container.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
virtual const labelUList & faceCells() const
Return faceCells.
void append(const T &)
Append an element at the end of the list.
Pair< label > labelPair
Label pair.
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...
void setFaceInfo(const List< labelPair > &changedPatchAndFaces, const List< Type > &changedFacesInfo)
Set initial changed faces.
const Mesh & mesh() const
Return mesh.
const labelUList & owner() const
Internal face owner.
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 > &)
virtual label iterate(const label maxIter)
Iterate until no changes or maxIter reached. Returns actual.
virtual bool coupled() const
Return true if this patch is coupled.
Provides functions smooth spread and sweep which use the FvFaceCellWave algorithm to smooth and redis...
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.