36 template<
class>
class FaceList,
71 if (fnd != coupledPatchMP.
end())
73 label coupledPointI = fnd();
75 List<point>& pNormals = pointFaceNormals[coupledPointI];
102 forAll(slaves, coupledPointI)
104 const labelList& slaveSlots = slaves[coupledPointI];
106 transformedSlaves[coupledPointI];
108 point&
n = coupledPointNormals[coupledPointI];
111 const List<point>& local = pointFaceNormals[coupledPointI];
116 + transformedSlaveSlots.
size();
123 n +=
sum(pointFaceNormals[slaveSlots[i]]);
125 forAll(transformedSlaveSlots, i)
127 n +=
sum(pointFaceNormals[transformedSlaveSlots[i]]);
138 coupledPointNormals[slaveSlots[i]] =
n;
140 forAll(transformedSlaveSlots, i)
142 coupledPointNormals[transformedSlaveSlots[i]] =
n;
151 coupledPointNormals.size(),
169 const face&
f = localFaces[faceI];
170 const vector&
n = faceNormals[faceI];
173 extrudeN[f[fp]] +=
n;
176 extrudeN /=
mag(extrudeN)+VSMALL;
185 if (fnd != coupledPatchMP.
end())
187 label coupledPointI = fnd();
188 extrudeN[patchPointI] = coupledPointNormals[coupledPointI];
199 template<
class>
class FaceList,
223 const labelList& eFaces = edgeFaces[edgeI];
226 edgeNormals[edgeI] += faceNormals[eFaces[i]];
229 edgeNormals /=
mag(edgeNormals)+VSMALL;
246 label patchEdgeI = patchEdges[i];
247 label coupledEdgeI = coupledEdges[i];
248 cppEdgeData[coupledEdgeI] = edgeNormals[patchEdgeI];
265 cppEdgeData /=
mag(cppEdgeData)+VSMALL;
273 label patchEdgeI = patchEdges[i];
274 label coupledEdgeI = coupledEdges[i];
275 edgeNormals[patchEdgeI] = cppEdgeData[coupledEdgeI];
const labelListList & globalPointSlaves() const
const mapDistribute & globalEdgeSlavesMap() const
Determination and storage of the possible independent transforms introduced by coupledPolyPatches, as well as all of the possible permutations of these transforms generated by the presence of multiple coupledPolyPatches, i.e. more than one cyclic boundary.
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
static void distribute(const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const labelListList &constructMap, List< T > &, const int tag=UPstream::msgType())
Distribute data. Note:schedule only used for Pstream::scheduled.
dimensioned< scalar > mag(const dimensioned< Type > &)
Default transformation behaviour.
const labelListList & edgeFaces() const
Return edge-face addressing.
Class containing processor-to-processor mapping information.
const Map< label > & meshPointMap() const
Mesh point map. Given the global point index find its.
const labelListList & pointFaces() const
Return point-face addressing.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
void size(const label)
Override size to be inconsistent with allocated storage.
const labelListList & globalPointTransformedSlaves() const
label nPoints() const
Return number of points supporting patch faces.
vectorField pointField
pointField is a vectorField.
void reverseDistribute(const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A face is a list of labels corresponding to mesh vertices.
void setSize(const label)
Reset size of List.
const mapDistribute & globalPointSlavesMap() const
static tmp< pointField > edgeNormals(const polyMesh &, const PrimitivePatch< Face, FaceList, PointField, PointType > &, const labelList &patchEdges, const labelList &coupledEdges)
Return parallel consistent edge normals for patches using mesh points.
const labelListList & globalEdgeTransformedSlaves() const
dimensionSet transform(const dimensionSet &)
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
const labelListList & globalEdgeSlaves() const
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
const Field< PointType > & faceNormals() const
Return face normals for patch.
A list of faces which address into the list of points.
static tmp< pointField > pointNormals(const polyMesh &, const PrimitivePatch< Face, FaceList, PointField, PointType > &)
Return parallel consistent point normals for patches using mesh points.
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
Mesh consisting of general polyhedral cells.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
static void syncData(List< Type > &pointData, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
Helper: synchronise data with transforms.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints,-1);const cellModel &hex=*(cellModeller::lookup("hex"));labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){pointMap[i]=i;}for(label i=0;i< nPoints;i++){if(f[i] > 0.0){hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells]=cellShape(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei){if(edges[ei].mag(points)< SMALL){label start=pointMap[edges[ei].start()];while(start!=pointMap[start]){start=pointMap[start];}label end=pointMap[edges[ei].end()];while(end!=pointMap[end]){end=pointMap[end];}label minLabel=min(start, end);pointMap[start]=pointMap[end]=minLabel;}}cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){cellShape &cs=cellShapes[celli];forAll(cs, i){cs[i]=pointMap[cs[i]];}cs.collapse();}label bcIDs[11]={-1, 0, 2, 4,-1, 5,-1, 6, 7, 8, 9};const label nBCs=12;const word *kivaPatchTypes[nBCs]={&wallPolyPatch::typeName,&wallPolyPatch::typeName,&wallPolyPatch::typeName,&wallPolyPatch::typeName,&symmetryPolyPatch::typeName,&wedgePolyPatch::typeName,&polyPatch::typeName,&polyPatch::typeName,&polyPatch::typeName,&polyPatch::typeName,&symmetryPolyPatch::typeName,&oldCyclicPolyPatch::typeName};enum patchTypeNames{PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={"piston","valve","liner","cylinderHead","axis","wedge","inflow","outflow","presin","presout","symmetryPlane","cyclic"};List< SLList< face > > pFaces[nBCs]
label nEdges() const
Return number of edges in patch.
A class for managing temporary objects.
const globalMeshData & globalData() const
Return parallel info.
label constructSize() const
Constructed data size.