syncTools Class Reference

Various tools to aid synchronising lists across coupled patches. WIP. More...

Static Public Member Functions

template<class T , class CombineOp , class TransformOp >
static void syncPointMap (const polyMesh &, Map< T > &pointValues, const CombineOp &cop, const TransformOp &top)
 Synchronise values on selected points. More...
 
template<class T , class CombineOp , class TransformOp >
static void syncEdgeMap (const polyMesh &, EdgeMap< T > &edgeValues, const CombineOp &cop, const TransformOp &top)
 Synchronise values on selected edges. More...
 
template<class T , class CombineOp , class TransformOp >
static void syncPointList (const polyMesh &, List< T > &, const CombineOp &cop, const T &nullValue, const TransformOp &top)
 Synchronise values on all mesh points. More...
 
template<class T , class CombineOp , class TransformOp >
static void syncPointList (const polyMesh &, const labelList &meshPoints, List< T > &, const CombineOp &cop, const T &nullValue, const TransformOp &top)
 Synchronise values on selected mesh points. More...
 
template<class T , class CombineOp , class TransformOp >
static void syncEdgeList (const polyMesh &, List< T > &, const CombineOp &cop, const T &nullValue, const TransformOp &top)
 Synchronise values on all mesh edges. More...
 
template<class T , class CombineOp , class TransformOp >
static void syncEdgeList (const polyMesh &, const labelList &meshEdges, List< T > &, const CombineOp &cop, const T &nullValue, const TransformOp &top)
 Synchronise values on selected mesh edges. More...
 
template<class T , class CombineOp , class TransformOp >
static void syncBoundaryFaceList (const polyMesh &, UList< T > &, const CombineOp &cop, const TransformOp &top, const bool parRun=Pstream::parRun())
 Synchronise values on boundary faces only. More...
 
template<class T , class CombineOp >
static void syncPointList (const polyMesh &mesh, List< T > &l, const CombineOp &cop, const T &nullValue)
 Synchronise values on all mesh points. More...
 
template<class CombineOp >
static void syncPointPositions (const polyMesh &mesh, List< point > &l, const CombineOp &cop, const point &nullValue)
 Synchronise locations on all mesh points. More...
 
template<class T , class CombineOp >
static void syncPointList (const polyMesh &mesh, const labelList &meshPoints, List< T > &l, const CombineOp &cop, const T &nullValue)
 Synchronise values on selected mesh points. More...
 
template<class CombineOp >
static void syncPointPositions (const polyMesh &mesh, const labelList &meshPoints, List< point > &l, const CombineOp &cop, const point &nullValue)
 Synchronise locations on selected mesh points. More...
 
template<class T , class CombineOp >
static void syncEdgeList (const polyMesh &mesh, List< T > &l, const CombineOp &cop, const T &nullValue)
 Synchronise values on all mesh edges. More...
 
template<class CombineOp >
static void syncEdgePositions (const polyMesh &mesh, List< point > &l, const CombineOp &cop, const point &nullValue)
 Synchronise locations on all mesh edges. More...
 
template<class T , class CombineOp >
static void syncEdgeList (const polyMesh &mesh, const labelList &meshEdges, List< T > &l, const CombineOp &cop, const T &nullValue)
 Synchronise values on selected mesh edges. More...
 
template<class CombineOp >
static void syncEdgePositions (const polyMesh &mesh, const labelList &meshEdges, List< point > &l, const CombineOp &cop, const point &nullValue)
 Synchronise locations on selected mesh edges. More...
 
template<class T , class CombineOp >
static void syncBoundaryFaceList (const polyMesh &mesh, UList< T > &l, const CombineOp &cop)
 Synchronise values on boundary faces only. More...
 
template<class CombineOp >
static void syncBoundaryFacePositions (const polyMesh &mesh, UList< point > &l, const CombineOp &cop)
 Synchronise locations on boundary faces only. More...
 
template<class T , class CombineOp >
static void syncFaceList (const polyMesh &mesh, UList< T > &l, const CombineOp &cop)
 Synchronise values on all mesh faces. More...
 
template<class CombineOp >
static void syncFacePositions (const polyMesh &mesh, UList< point > &l, const CombineOp &cop)
 Synchronise locations on all mesh faces. More...
 
template<class T >
static void swapBoundaryFaceList (const polyMesh &mesh, UList< T > &l)
 Swap coupled boundary face values. More...
 
static void swapBoundaryFacePositions (const polyMesh &mesh, UList< point > &l)
 Swap coupled positions. More...
 
template<class T >
static void swapFaceList (const polyMesh &mesh, UList< T > &l)
 Swap coupled face values. More...
 
template<class T >
static void swapBoundaryCellList (const polyMesh &mesh, const UList< T > &cellData, List< T > &neighbourCellData)
 Swap to obtain neighbour cell values for all boundary faces. More...
 
static void swapBoundaryCellPositions (const polyMesh &mesh, const UList< point > &cellData, List< point > &neighbourCellData)
 Swap to obtain neighbour cell positions for all boundary faces. More...
 
template<class T , class CombineOp >
static void syncPointMap (const polyMesh &mesh, Map< T > &l, const CombineOp &cop)
 Synchronise values on selected points. More...
 
template<class CombineOp >
static void syncPointPositions (const polyMesh &mesh, Map< point > &l, const CombineOp &cop)
 Synchronise locations on selected points. More...
 
template<class T , class CombineOp >
static void syncEdgeMap (const polyMesh &mesh, EdgeMap< T > &l, const CombineOp &cop)
 Synchronise values on selected edges. Edges are represented. More...
 
template<class CombineOp >
static void syncEdgePositions (const polyMesh &mesh, EdgeMap< point > &l, const CombineOp &cop)
 Synchronise locations on selected edges. More...
 
template<unsigned nBits, class CombineOp >
static void syncFaceList (const polyMesh &mesh, PackedList< nBits > &faceValues, const CombineOp &cop, const bool parRun=Pstream::parRun())
 
template<unsigned nBits>
static void swapFaceList (const polyMesh &mesh, PackedList< nBits > &faceValues)
 
template<unsigned nBits, class CombineOp >
static void syncPointList (const polyMesh &mesh, PackedList< nBits > &pointValues, const CombineOp &cop, const unsigned int nullValue)
 
template<unsigned nBits, class CombineOp >
static void syncEdgeList (const polyMesh &mesh, PackedList< nBits > &edgeValues, const CombineOp &cop, const unsigned int nullValue)
 
static PackedBoolList getMasterPoints (const polyMesh &)
 Get per point whether it is uncoupled or a master of a. More...
 
static PackedBoolList getMasterEdges (const polyMesh &)
 Get per edge whether it is uncoupled or a master of a. More...
 
static PackedBoolList getMasterFaces (const polyMesh &)
 Get per face whether it is uncoupled or a master of a. More...
 
static PackedBoolList getInternalOrMasterFaces (const polyMesh &)
 Get per face whether it is internal or a master of a. More...
 
static PackedBoolList getInternalOrCoupledFaces (const polyMesh &)
 Get per face whether it is internal or coupled. More...
 

Detailed Description

Various tools to aid synchronising lists across coupled patches. WIP.

Require

  • combineOperator (e.g. sumEqOp - not sumOp!) that is defined for the type and combineReduce(UList<T>, combineOperator) should be defined.
  • null value which gets overridden by any valid value.
  • transform function
Source files

Definition at line 62 of file syncTools.H.

Member Function Documentation

◆ syncPointMap() [1/2]

◆ syncEdgeMap() [1/2]

◆ syncPointList() [1/5]

void syncPointList ( const polyMesh mesh,
List< T > &  pointValues,
const CombineOp &  cop,
const T nullValue,
const TransformOp &  top 
)
static

Synchronise values on all mesh points.

Definition at line 993 of file syncToolsTemplates.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, polyMesh::globalData(), primitiveMesh::nPoints(), List< T >::size(), and globalMeshData::syncPointData().

Referenced by singleProcessorFaceSetsConstraint::add(), singleProcessorFaceSetsConstraint::apply(), motionSmootherAlgo::avg(), snappySnapDriver::avgCellCentres(), snappySnapDriver::calcNearestSurface(), snappySnapDriver::calcSnapDistance(), edgeCollapser::checkMeshQuality(), pointZone::checkParallelSync(), hexRef8::checkRefinementLevels(), edgeCollapser::consistentCollapse(), hexRef8::consistentSlowRefinement(), polyMeshFilter::copyMesh(), motionSmootherAlgo::correctBoundaryConditions(), removePoints::countPointUsage(), snappySnapDriver::doSnap(), meshRefinement::getMasterPoints(), multiSolidBodyMotionSolver::multiSolidBodyMotionSolver(), minEqOpFace::operator()(), listPlusEqOp< T >::operator()(), motionSmootherAlgo::scaleMesh(), motionSmootherAlgo::setDisplacementPatchFields(), combineFaces::setRefinement(), addPatchCellLayer::setRefinement(), motionSmootherAlgo::smooth(), solidBodyMotionSolver::solidBodyMotionSolver(), meshRefinement::splitMesh(), syncTools::swapFaceList(), pointSet::sync(), syncTools::syncEdgeMap(), syncTools::syncEdgePositions(), syncTools::syncPointList(), syncTools::syncPointPositions(), and meshRefinement::testSyncPointList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncPointList() [2/5]

◆ syncEdgeList() [1/5]

◆ syncEdgeList() [2/5]

◆ syncBoundaryFaceList() [1/2]

◆ syncPointList() [3/5]

static void syncPointList ( const polyMesh mesh,
List< T > &  l,
const CombineOp &  cop,
const T nullValue 
)
inlinestatic

Synchronise values on all mesh points.

Definition at line 176 of file syncTools.H.

References syncTools::syncPointList(), and syncTools::syncPointPositions().

Here is the call graph for this function:

◆ syncPointPositions() [1/3]

static void syncPointPositions ( const polyMesh mesh,
List< point > &  l,
const CombineOp &  cop,
const point nullValue 
)
inlinestatic

Synchronise locations on all mesh points.

Definition at line 196 of file syncTools.H.

References syncTools::syncPointList().

Referenced by syncTools::syncPointList(), and syncTools::syncPointMap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncPointList() [4/5]

static void syncPointList ( const polyMesh mesh,
const labelList meshPoints,
List< T > &  l,
const CombineOp &  cop,
const T nullValue 
)
inlinestatic

Synchronise values on selected mesh points.

Definition at line 216 of file syncTools.H.

References syncTools::syncPointList(), and syncTools::syncPointPositions().

Here is the call graph for this function:

◆ syncPointPositions() [2/3]

static void syncPointPositions ( const polyMesh mesh,
const labelList meshPoints,
List< point > &  l,
const CombineOp &  cop,
const point nullValue 
)
inlinestatic

Synchronise locations on selected mesh points.

Definition at line 238 of file syncTools.H.

References syncTools::syncEdgeList(), and syncTools::syncPointList().

Here is the call graph for this function:

◆ syncEdgeList() [3/5]

static void syncEdgeList ( const polyMesh mesh,
List< T > &  l,
const CombineOp &  cop,
const T nullValue 
)
inlinestatic

Synchronise values on all mesh edges.

Definition at line 263 of file syncTools.H.

References syncTools::syncEdgeList(), and syncTools::syncEdgePositions().

Here is the call graph for this function:

◆ syncEdgePositions() [1/3]

static void syncEdgePositions ( const polyMesh mesh,
List< point > &  l,
const CombineOp &  cop,
const point nullValue 
)
inlinestatic

Synchronise locations on all mesh edges.

Definition at line 283 of file syncTools.H.

References syncTools::syncEdgeList().

Referenced by hexRef8::setRefinement(), syncTools::syncEdgeList(), and syncTools::syncEdgeMap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncEdgeList() [4/5]

static void syncEdgeList ( const polyMesh mesh,
const labelList meshEdges,
List< T > &  l,
const CombineOp &  cop,
const T nullValue 
)
inlinestatic

Synchronise values on selected mesh edges.

Definition at line 303 of file syncTools.H.

References syncTools::syncEdgeList(), and syncTools::syncEdgePositions().

Here is the call graph for this function:

◆ syncEdgePositions() [2/3]

static void syncEdgePositions ( const polyMesh mesh,
const labelList meshEdges,
List< point > &  l,
const CombineOp &  cop,
const point nullValue 
)
inlinestatic

Synchronise locations on selected mesh edges.

Definition at line 325 of file syncTools.H.

References syncTools::syncBoundaryFaceList(), and syncTools::syncEdgeList().

Here is the call graph for this function:

◆ syncBoundaryFaceList() [2/2]

static void syncBoundaryFaceList ( const polyMesh mesh,
UList< T > &  l,
const CombineOp &  cop 
)
inlinestatic

Synchronise values on boundary faces only.

Definition at line 351 of file syncTools.H.

References syncTools::syncBoundaryFaceList(), and syncTools::syncBoundaryFacePositions().

Here is the call graph for this function:

◆ syncBoundaryFacePositions()

static void syncBoundaryFacePositions ( const polyMesh mesh,
UList< point > &  l,
const CombineOp &  cop 
)
inlinestatic

Synchronise locations on boundary faces only.

Definition at line 363 of file syncTools.H.

References syncTools::syncBoundaryFaceList(), and syncTools::syncFaceList().

Referenced by meshRefinement::checkData(), hexRef8::setRefinement(), and syncTools::syncBoundaryFaceList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncFaceList() [1/2]

◆ syncFacePositions()

static void syncFacePositions ( const polyMesh mesh,
UList< point > &  l,
const CombineOp &  cop 
)
inlinestatic

Synchronise locations on all mesh faces.

Definition at line 406 of file syncTools.H.

References primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), syncTools::swapBoundaryFaceList(), and syncTools::syncBoundaryFaceList().

Referenced by syncTools::syncFaceList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ swapBoundaryFaceList()

◆ swapBoundaryFacePositions()

static void swapBoundaryFacePositions ( const polyMesh mesh,
UList< point > &  l 
)
inlinestatic

◆ swapFaceList() [1/2]

static void swapFaceList ( const polyMesh mesh,
UList< T > &  l 
)
inlinestatic

◆ swapBoundaryCellList()

void swapBoundaryCellList ( const polyMesh mesh,
const UList< T > &  cellData,
List< T > &  neighbourCellData 
)
static

◆ swapBoundaryCellPositions()

void swapBoundaryCellPositions ( const polyMesh mesh,
const UList< point > &  cellData,
List< point > &  neighbourCellData 
)
static

Swap to obtain neighbour cell positions for all boundary faces.

Definition at line 31 of file syncTools.C.

References Foam::abort(), polyMesh::boundaryMesh(), polyPatch::faceCells(), Foam::FatalError, FatalErrorInFunction, forAll, primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patches, patchi, List< T >::setSize(), UList< T >::size(), and polyPatch::start().

Referenced by Foam::polyMeshCheck::checkFaceSkewness(), and syncTools::swapFaceList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncPointMap() [2/2]

static void syncPointMap ( const polyMesh mesh,
Map< T > &  l,
const CombineOp &  cop 
)
inlinestatic

Synchronise values on selected points.

Definition at line 505 of file syncTools.H.

References syncTools::syncPointMap(), and syncTools::syncPointPositions().

Here is the call graph for this function:

◆ syncPointPositions() [3/3]

static void syncPointPositions ( const polyMesh mesh,
Map< point > &  l,
const CombineOp &  cop 
)
inlinestatic

Synchronise locations on selected points.

Definition at line 517 of file syncTools.H.

References syncTools::syncEdgeMap(), and syncTools::syncPointMap().

Here is the call graph for this function:

◆ syncEdgeMap() [2/2]

static void syncEdgeMap ( const polyMesh mesh,
EdgeMap< T > &  l,
const CombineOp &  cop 
)
inlinestatic

Synchronise values on selected edges. Edges are represented.

by the two vertices that make it up so global edges never get constructed.

Definition at line 531 of file syncTools.H.

References syncTools::syncEdgeMap(), and syncTools::syncEdgePositions().

Here is the call graph for this function:

◆ syncEdgePositions() [3/3]

static void syncEdgePositions ( const polyMesh mesh,
EdgeMap< point > &  l,
const CombineOp &  cop 
)
inlinestatic

◆ syncFaceList() [2/2]

◆ swapFaceList() [2/2]

void swapFaceList ( const polyMesh mesh,
PackedList< nBits > &  faceValues 
)
static

Definition at line 1568 of file syncToolsTemplates.C.

References syncTools::syncFaceList(), and syncTools::syncPointList().

Here is the call graph for this function:

◆ syncPointList() [5/5]

◆ syncEdgeList() [5/5]

◆ getMasterPoints()

Foam::PackedBoolList getMasterPoints ( const polyMesh mesh)
static

Get per point whether it is uncoupled or a master of a.

coupled set of points

Definition at line 65 of file syncTools.C.

References forAll, polyMesh::globalData(), and primitiveMesh::nPoints().

Referenced by meshRefinement::printMeshInfo(), syncTools::syncEdgePositions(), and medialAxisMeshMover::~medialAxisMeshMover().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMasterEdges()

Foam::PackedBoolList getMasterEdges ( const polyMesh mesh)
static

Get per edge whether it is uncoupled or a master of a.

coupled set of edges

Definition at line 109 of file syncTools.C.

References forAll, polyMesh::globalData(), and primitiveMesh::nEdges().

Referenced by syncTools::syncEdgePositions(), motionSmootherAlgo::updateMesh(), and medialAxisMeshMover::~medialAxisMeshMover().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMasterFaces()

Foam::PackedBoolList getMasterFaces ( const polyMesh mesh)
static

Get per face whether it is uncoupled or a master of a.

coupled set of faces

Definition at line 153 of file syncTools.C.

References polyMesh::boundaryMesh(), forAll, syncTools::getInternalOrMasterFaces(), primitiveMesh::nFaces(), coupledPolyPatch::owner(), patches, patchi, and polyPatch::start().

Referenced by meshRefinement::countHits(), NamedEnum< compressibleField, 8 >::names(), listPlusEqOp< T >::operator()(), meshRefinement::printMeshInfo(), faceZoneSet::sync(), syncTools::syncEdgePositions(), and meshRefinement::zonify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInternalOrMasterFaces()

Foam::PackedBoolList getInternalOrMasterFaces ( const polyMesh mesh)
static

Get per face whether it is internal or a master of a.

coupled set of faces

Definition at line 181 of file syncTools.C.

References polyMesh::boundaryMesh(), polyPatch::coupled(), forAll, syncTools::getInternalOrCoupledFaces(), primitiveMesh::nFaces(), patches, patchi, and polyPatch::start().

Referenced by syncTools::getMasterFaces(), and syncTools::syncEdgePositions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInternalOrCoupledFaces()

Foam::PackedBoolList getInternalOrCoupledFaces ( const polyMesh mesh)
static

Get per face whether it is internal or coupled.

Definition at line 217 of file syncTools.C.

References polyMesh::boundaryMesh(), polyPatch::coupled(), forAll, primitiveMesh::nFaces(), patches, patchi, and polyPatch::start().

Referenced by syncTools::getInternalOrMasterFaces(), and syncTools::syncEdgePositions().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: