40 label triI = triFaces.
size();
47 return split(SPLITTRIANGLE,
points, triI, quadI, triFaces, quadFaces);
78 for (label pI=0; pI<
nPoints; pI++)
80 cf +=
fld[operator[](pI)];
88 for (label pI=0; pI<
nPoints; pI++)
90 const label nextPti(pI ==
nPoints-1 ? 0 : pI+1);
96 +
fld[operator[](nextPti)]
103 (meshPoints[
operator[](pI)] - centrePoint)
104 ^ (meshPoints[
operator[](nextPti)] - centrePoint)
113 return sumAf/(3*sumA);
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.
void setSize(const label n)
Alias for resize().
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
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.
label & operator[](const label i)
label triangles(const UList< point > &points, label &triI, faceList &triFaces) const
Split into triangles using existing points.
point average(const UList< point > &points) const
Average of face points: a quick estimate of the face centre.
pointField points(const UList< point > &pts) const
Return the points corresponding to this face.
label nTriangles() const noexcept
Number of triangles after splitting.
List< face > faceList
List of faces.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1, const label comm)