Skip to content

Commit

Permalink
Added getNLocalCells function.
Browse files Browse the repository at this point in the history
  • Loading branch information
friedenhe committed May 23, 2020
1 parent 0821725 commit fb0dc29
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ default:
(mv src/*.so python)

clean:
(cd python && rm -rf *.so)
(cd src && rm -rf *.cpp *.so build)
(rm -rf */__pycache__ */*/__pycache__)
2 changes: 2 additions & 0 deletions src/OFMesh.C
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ void OFMesh::readMesh()

nLocalPoints_=mesh.nPoints();

nLocalCells_=mesh.nCells();

nLocalFaces_=mesh.nFaces();

nLocalInternalFaces_=mesh.nInternalFaces();
Expand Down
7 changes: 7 additions & 0 deletions src/OFMesh.H
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ private:

label nLocalPoints_;

label nLocalCells_;

label nLocalFaces_;

label nLocalInternalFaces_;
Expand Down Expand Up @@ -99,6 +101,11 @@ public:
return nLocalPoints_;
}

label getNLocalCells() const
{
return nLocalCells_;
}

label getNLocalFaces() const
{
return nLocalFaces_;
Expand Down
4 changes: 4 additions & 0 deletions src/pyOFMesh.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ cdef extern from "OFMesh.H" namespace "Foam":
double getMeshPointCoord(int,int)
void setMeshPointCoord(int,int,double)
int getNLocalPoints()
int getNLocalCells()
int getNLocalFaces()
int getNLocalInternalFaces()
int getNFacePoints(int)
Expand Down Expand Up @@ -88,6 +89,9 @@ cdef class pyOFMesh:
def getNLocalPoints(self):
return self._thisptr.getNLocalPoints()

def getNLocalCells(self):
return self._thisptr.getNLocalCells()

def getNLocalFaces(self):
return self._thisptr.getNLocalFaces()

Expand Down

0 comments on commit fb0dc29

Please sign in to comment.