Go to the documentation of this file.
64 typedef std::map<label, vector> ltvMap;
65 typedef std::map<label, ltvMap> lltvMap;
66 lltvMap pointPatchNormal;
70 const label bpI = it.key();
75 ltvMap& patchNormal = pointPatchNormal[bpI];
79 const label bfI = pointFaces(bpI, pfI);
80 const label patchI = facePatch[bfI];
82 if( patchNormal.find(patchI) == patchNormal.end() )
84 patchNormal[patchI] = fNormals[bfI];
88 patchNormal[patchI] += fNormals[bfI];
95 const label bpI = it.key();
100 ltvMap& patchNormal = pointPatchNormal[bpI];
104 const label bfI = pointFaces(bpI, pfI);
105 const label patchI = facePatch[bfI];
107 if( patchNormal.find(patchI) == patchNormal.end() )
109 patchNormal[patchI] = fNormals[bfI];
113 patchNormal[patchI] += fNormals[bfI];
124 std::map<label, LongList<refLabelledPoint> > exchangeData;
126 exchangeData[neiProcs[i]].clear();
130 const label bpI = it();
132 if( pointPatchNormal.find(bpI) != pointPatchNormal.end() )
134 const ltvMap& patchNormal = pointPatchNormal[bpI];
138 const label neiProc = bpAtProcs(bpI, i);
144 exchangeData[neiProc].append
164 ltvMap& patchNormal = pointPatchNormal[bpI];
173 ltvMap& patchNormal = pointPatchNormal[it->first];
177 const scalar magv =
mag(pIt->second) + VSMALL;
186 # pragma omp parallel for if( pointFaces.size() > 100 ) \
187 schedule(dynamic, 20)
196 const label pI = pointInFaces(bpI, pfI);
197 const label bfI = pointFaces(bpI, pfI);
199 vector pNormal = pNormals[bpI];
201 if( pointPatchNormal.find(bpI) != pointPatchNormal.end() )
202 pNormal = pointPatchNormal[bpI][facePatch[bfI]];
204 const face& bf = bFaces[bfI];
215 scalar mNext =
mag(nNext);
221 # pragma omp critical
233 if(
magSqr(triNext.
a() - triNext.
b()) < VSMALL )
236 # pragma omp critical
242 if(
magSqr(triNext.
c() - triNext.
a()) < VSMALL )
245 # pragma omp critical
253 if( (nNext & pNormal) < 0.0 )
256 # pragma omp critical
272 scalar mPrev =
mag(nPrev);
278 # pragma omp critical
290 if(
magSqr(triPrev.
a() - triPrev.
b()) < VSMALL )
293 # pragma omp critical
299 if(
magSqr(triPrev.
c() - triPrev.
a()) < VSMALL )
302 # pragma omp critical
310 if( (nPrev & pNormal) < 0.0 )
313 # pragma omp critical
322 if( (nNext & nPrev) < 0.0 )
325 # pragma omp critical
336 # pragma omp parallel for schedule(dynamic, 50)
340 const face& bf = bFaces[bfI];
353 # pragma omp critical
372 std::map<label, labelLongList> shareData;
374 shareData.insert(std::make_pair(neiProcs[i],
labelLongList()));
378 const label bpI = iter();
385 const label neiProc = bpAtProcs(bpI, procI);
390 shareData[neiProc].append(iter.key());
400 const label bpI = globalToLocal[receivedData[i]];
413 surfacePartitioner_(mpart),
414 activePointsPtr_(NULL),
426 surfacePartitioner_(mpart),
427 activePointsPtr_(&activePoints),
const vectorField & faceCentres() const
const VRWGraph & bpAtProcs() const
processors which contain the vertex
const VRWGraph & pointInFaces() const
const labelList & bp() const
const point & coordinates() const
return point coordinates
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
meshSurfaceCheckInvertedVertices(const meshSurfaceCheckInvertedVertices &)
Disallow default bitwise copy construct.
#define forAll(list, i)
Loop across all elements in list.
Template functions to aid in the implementation of demand driven data.
A List obtained as a section of another List.
static bool & parRun()
Is this a parallel run?
const DynList< label > & bpNeiProcs() const
communication matrix for sending point data
const VRWGraph & pointFaces() const
labelHashSet invertedVertices_
set of inverted vertices
dimensioned< scalar > mag(const dimensioned< Type > &)
const meshSurfaceEngine & surfaceEngine() const
return const reference to meshSurfaceEngine
const meshSurfacePartitioner & surfacePartitioner_
mesh surface partitioner
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
A triangle primitive used to calculate face normals and swept volumes.
const faceList::subList & boundaryFaces() const
void checkVertices()
check vertices by calculating dot products
const Point & c() const
Return third vertex.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
vector normal() const
Return vector normal.
~meshSurfaceCheckInvertedVertices()
const boolList * activePointsPtr_
active surface points
const Point & a() const
Return first vertex.
const vectorField & pointNormals() const
#define forAllRow(graph, rowI, index)
const pointFieldPMG & points() const
const Point & b() const
Return second vertex.
bool isFaceConvexAndOk(const face &f, const pointField &fp, DynList< bool > &OkPoints)
check if the face is convex. Concave points are flagged false
bool found(const Key &) const
Return true if hashedEntry is found in table.
label objectLabel() const
return label of the object it is associated to
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
const labelList & boundaryFacePatches() const
label prevLabel(const label i) const
Previous vertex on face.
const labelHashSet & edgePoints() const
return labels of edge points (from the list of boundary points)
label nextLabel(const label i) const
Next vertex on face.
void clear()
Clear all entries from table.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void exchangeMap(const std::map< label, ListType > &m, LongList< T > &data, const Pstream::commsTypes commsType)
bool insert(const Key &key)
Insert a new entry.
const labelList & boundaryPoints() const
A face is a list of labels corresponding to mesh vertices.
const Map< label > & globalToLocalBndPointAddressing() const
global point label to local label. Only for processors points
const labelHashSet & corners() const
return labels of corner points (from the list of boundary points)
LongList< label > labelLongList
const vectorField & faceNormals() const
dimensioned< scalar > magSqr(const dimensioned< Type > &)
const labelledPoint & lPoint() const
return labelledPoint
label pointLabel() const
return point label