40#ifndef Foam_PatchEdgeFaceWave_H
41#define Foam_PatchEdgeFaceWave_H
164 class PrimitivePatchType,
166 class TrackingData = label
175 const PrimitivePatchType& patch_;
192 bitSet sameEdgeOrientation_;
202 const label neighbourFacei,
203 const Type& neighbourInfo,
212 const label neighbourEdgeI,
213 const Type& neighbourInfo,
221 PatchEdgeFaceWave(
const PatchEdgeFaceWave&) =
delete;
224 void operator=(
const PatchEdgeFaceWave&) =
delete;
240 const PrimitivePatchType& patch,
254 const PrimitivePatchType& patch,
285 const UList<Type>& changedEdgesInfo
298 label
iterate(
const label maxIter);
307 class PrimitivePatchType,
309 class TrackingData =
int
314 const polyMesh& mesh_;
315 const PrimitivePatchType& patch_;
323 const polyMesh&
mesh,
324 const PrimitivePatchType& patch,
339 x.updateEdge(mesh_, patch_,
y,
true, tol_, td_);
348 class PrimitivePatchType,
350 class TrackingData =
int
355 const polyMesh& mesh_;
356 const PrimitivePatchType& patch_;
364 const polyMesh&
mesh,
365 const PrimitivePatchType& patch,
378 const vectorTensorTransform& vt,
383 const tensor rot(forward ? vt.R() : vt.R().T());
385 for (
auto& val :
fld)
387 val.transform(mesh_, patch_, rot, tol_, td_);
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label nChangedFaces() const noexcept
Current number of changed faces.
DynamicList< label > changedFaces_
List of changed faces.
bitSet changedFace_
Track if face has changed.
DynamicList< label > changedEdges_
List of changed edges.
static scalar propagationTol_
Relative tolerance.
label nUnvisitedEdges() const noexcept
static label dummyTrackData_
Default trackData value (for default template argument).
label nChangedEdges() const noexcept
Current number of changed edges.
label nUnvisitedFaces_
Number of unvisited faces.
PatchEdgeFaceWaveBase(const polyMesh &mesh, const label nEdges, const label nFaces)
Construct with mesh reference and set initial sizes.
static scalar setPropagationTol(const scalar tol) noexcept
Change propagation tolerance, return previous value.
label nUnvisitedEdges_
Number of unvisited edges.
bitSet changedEdge_
Track if edge has changed.
label nUnvisitedFaces() const noexcept
Number of unvisited faces, i.e. faces that were not (yet) reached from walking across patch.
const polyMesh & mesh() const noexcept
Return access to the mesh.
const polyMesh & mesh_
Reference to mesh.
ClassName("PatchEdgeFaceWave")
Runtime type information.
static scalar propagationTol() noexcept
Access to propagation tolerance.
Wave propagation of information along patch. Every iteration information goes through one layer of fa...
UList< Type > & allFaceInfo() const noexcept
Access allFaceInfo.
label edgeToFace()
Propagate from edge to face.
UList< Type > & allEdgeInfo() const noexcept
Access allEdgeInfo.
const TrackingData & data() const noexcept
Additional data to be passed into container.
label iterate(const label maxIter)
Iterate until no changes or maxIter reached.
label faceToEdge()
Propagate from face to edge.
void setEdgeInfo(const labelUList &changedEdges, const UList< Type > &changedEdgesInfo)
Copy initial data into allEdgeInfo_.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Mesh consisting of general polyhedral cells.
updateOp(const polyMesh &mesh, const PrimitivePatchType &patch, const scalar tol, TrackingData &td)
void operator()(Type &x, const Type &y) const
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
List< label > labelList
A List of labels.
UList< label > labelUList
A UList of labels.