35void Foam::patchWave::setChangedFaces
37 const labelHashSet& patchIDs,
38 labelList& changedFaces,
39 List<wallPoint>& faceDist
44 label nChangedFaces = 0;
48 if (patchIDs.found(patchi))
54 label meshFacei =
patch.start() + patchFacei;
56 changedFaces[nChangedFaces] = meshFacei;
58 faceDist[nChangedFaces] =
61 patch.faceCentres()[patchFacei],
72Foam::label Foam::patchWave::getValues(
const MeshWave<wallPoint>& waveInfo)
74 const List<wallPoint>& cellInfo = waveInfo.allCellInfo();
75 const List<wallPoint>& faceInfo = waveInfo.allFaceInfo();
80 distance_.setSize(cellInfo.size());
84 scalar dist = cellInfo[celli].distSqr();
86 if (cellInfo[celli].valid(waveInfo.data()))
92 distance_[celli] = dist;
99 forAll(patchDistance_, patchi)
106 patchDistance_.set(patchi, patchDistPtr);
110 forAll(patchField, patchFacei)
112 label meshFacei =
patch.start() + patchFacei;
114 scalar dist = faceInfo[meshFacei].distSqr();
116 if (faceInfo[meshFacei].valid(waveInfo.data()))
120 patchField[patchFacei] =
Foam::sqrt(dist) + SMALL;
124 patchField[patchFacei] = dist;
140 const bool correctWalls
145 correctWalls_(correctWalls),
147 distance_(
mesh.nCells()),
166 label nPatch = sumPatchSize(patchIDs_);
172 setChangedFaces(patchIDs_, changedFaces, faceDist);
180 mesh().globalData().nTotalCells()+1
184 nUnset_ = getValues(waveInfo);
191 correctBoundaryFaceCells
198 correctBoundaryPointCells
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A HashTable to objects of type <T> with a label key.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Collection of functions used in wall distance calculation.
const polyMesh & mesh() const
Access mesh.
Takes a set of patches to start MeshWave from. After construction holds distance at cells and distanc...
virtual void correct()
Correct for mesh geom/topo changes.
virtual ~patchWave()
Destructor.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const std::string patch
OpenFOAM patch number as a std::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar sqrt(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.