FreeFOAM The Cross-Platform CFD Toolkit
syncTools Class Reference

Various tools to aid synchronizing lists across coupled patches. More...

#include <OpenFOAM/syncTools.H>


Detailed Description

Various tools to aid synchronizing lists across coupled patches.

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

Can apply coordinate rotation/separation on cyclics but only for faces or if there is a single rotation/separation tensor.

Source files

Definition at line 68 of file syncTools.H.

List of all members.

Public Member Functions

template<>
void separateList (const vectorField &separation, UList< vector > &field)
template<>
void separateList (const vectorField &separation, Map< vector > &field)
template<>
void separateList (const vectorField &separation, EdgeMap< vector > &field)

Static Public Member Functions

template<class T , class CombineOp >
static void syncPointList (const polyMesh &, UList< T > &, const CombineOp &cop, const T &nullValue, const bool applySeparation)
 Synchronize values on all mesh points.
template<class T , class CombineOp >
static void syncPointList (const polyMesh &, const labelList &meshPoints, UList< T > &, const CombineOp &bop, const T &nullValue, const bool applySeparation)
 Synchronize values on selected mesh points.
template<class T , class CombineOp >
static void syncEdgeList (const polyMesh &, UList< T > &, const CombineOp &cop, const T &nullValue, const bool applySeparation)
 Synchronize values on all mesh edges.
template<class T , class CombineOp >
static void syncBoundaryFaceList (const polyMesh &, UList< T > &, const CombineOp &cop, const bool applySeparation)
 Synchronize values on boundary faces only.
template<class T , class CombineOp >
static void syncFaceList (const polyMesh &, UList< T > &, const CombineOp &cop, const bool applySeparation)
 Synchronize values on all mesh faces.
template<class T >
static void swapBoundaryFaceList (const polyMesh &, UList< T > &, const bool applySeparation)
 Swap coupled face values.
template<class T >
static void swapFaceList (const polyMesh &, UList< T > &, const bool applySeparation)
 Swap coupled face values.
template<class T , class CombineOp >
static void syncPointMap (const polyMesh &, Map< T > &pointValues, const CombineOp &cop, const bool applySeparation)
 Synchronize values on selected points.
template<class T , class CombineOp >
static void syncEdgeMap (const polyMesh &, EdgeMap< T > &edgeValues, const CombineOp &cop, const bool applySeparation)
 Synchronize values on selected edges. Edges are represented.
template<unsigned nBits, class CombineOp >
static void syncFaceList (const polyMesh &mesh, PackedList< nBits > &faceValues, const CombineOp &cop)
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 is it master (of a coupled set of points)
static PackedBoolList getMasterEdges (const polyMesh &)
 Get per edge whether is it master (of a coupled set of edges)
static PackedBoolList getMasterFaces (const polyMesh &)
 Get per face whether is it master (of a coupled set of faces)

Member Function Documentation

void syncPointList ( const polyMesh mesh,
UList< T > &  pointValues,
const CombineOp &  cop,
const T nullValue,
const bool  applySeparation 
)
static

Synchronize values on all mesh points.

Applies rotation and optionally separation for parallel cyclics

Note: hasTransformation is only used for warning messages so

reduction not strictly nessecary. reduce(hasTransformation, orOp<bool>());

Definition at line 850 of file syncToolsTemplates.C.

References Foam::abort(), PstreamBase::blocking, polyMesh::boundaryMesh(), cyclicPolyPatch::coupledPoints(), e, Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, coupledPolyPatch::forwardT(), polyMesh::globalData(), Pstream::listCombineGather(), Pstream::listCombineScatter(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), processorPolyPatch::neighbPoints(), processorPolyPatch::neighbProcNo(), globalMeshData::nGlobalPoints(), nPoints, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), primitiveMesh::nPoints(), coupledPolyPatch::parallel(), Pstream::parRun(), patches, coupledPolyPatch::reverseT(), coupledPolyPatch::separated(), coupledPolyPatch::separation(), globalMeshData::sharedPointAddr(), globalMeshData::sharedPointLabels(), List< T >::size(), UList< T >::size(), Foam::transformList(), and WarningIn.

Referenced by autoSnapDriver::calcNearestSurface(), autoSnapDriver::calcSnapDistance(), hexRef8::checkRefinementLevels(), hexRef8::consistentSlowRefinement(), motionSmoother::correctBoundaryConditions(), removePoints::countPointUsage(), motionSmoother::scaleMesh(), motionSmoother::setDisplacement(), combineFaces::setRefinement(), removeFaces::setRefinement(), addPatchCellLayer::setRefinement(), meshRefinement::splitMesh(), pointSet::sync(), and syncTools::syncPointList().

void syncPointList ( const polyMesh mesh,
const labelList meshPoints,
UList< T > &  pointValues,
const CombineOp &  bop,
const T nullValue,
const bool  applySeparation 
)
static

Synchronize values on selected mesh points.

Applies rotation and optionally separation for parallel cyclics

Definition at line 1070 of file syncToolsTemplates.C.

References Foam::abort(), polyMesh::boundaryMesh(), Foam::FatalError, FatalErrorIn, forAll, primitiveMesh::nPoints(), List< T >::size(), UList< T >::size(), and syncTools::syncPointList().

void syncBoundaryFaceList ( const polyMesh mesh,
UList< T > &  faceValues,
const CombineOp &  cop,
const bool  applySeparation 
)
static
void syncFaceList ( const polyMesh mesh,
UList< T > &  faceValues,
const CombineOp &  cop,
const bool  applySeparation 
)
static
void swapFaceList ( const polyMesh mesh,
UList< T > &  faceValues,
const bool  applySeparation 
)
static

Swap coupled face values.

Applies rotation and optionally separation for parallel cyclics

Definition at line 1562 of file syncToolsTemplates.C.

Referenced by dynamicRefineFvMesh::dynamicRefineFvMesh(), and removeFaces::setRefinement().

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

Definition at line 1695 of file syncToolsTemplates.C.

Foam::PackedBoolList getMasterFaces ( const polyMesh mesh)
static

Get per face whether is it master (of a coupled set of faces)

Definition at line 313 of file syncTools.C.

References Foam::abort(), polyMesh::boundaryMesh(), Foam::FatalError, FatalErrorIn, forAll, primitiveMesh::nFaces(), processorPolyPatch::owner(), Pstream::parRun(), and polyPatch::start().

Referenced by meshRefinement::countHits(), and meshRefinement::zonify().

void separateList ( const vectorField separation,
UList< vector > &  field 
)
void separateList ( const vectorField separation,
Map< vector > &  field 
)
void separateList ( const vectorField separation,
EdgeMap< vector > &  field 
)

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