Skip to content

Commit

Permalink
Provide some documentation for what _faceToCellDistanceRatio is and
Browse files Browse the repository at this point in the history
why it's scalar.

Addresses #475
  • Loading branch information
guyer committed Dec 27, 2015
1 parent b542e0c commit 3f73d02
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fipy/meshes/uniformGrid1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ def _cellVolumes(self):

@property
def _faceToCellDistanceRatio(self):
"""how far face is from first to second cell
distance from center of face to center of first cell divided by distance
between cell centers
"""
distances = numerix.ones(self.numberOfFaces, 'd')
distances *= 0.5
if len(distances) > 0:
Expand Down
5 changes: 5 additions & 0 deletions fipy/meshes/uniformGrid2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ def _cellDistances(self):

@property
def _faceToCellDistanceRatio(self):
"""how far face is from first to second cell
distance from center of face to center of first cell divided by distance
between cell centers
"""
faceToCellDistanceRatios = numerix.zeros(self.numberOfFaces, 'd')
faceToCellDistanceRatios[:] = 0.5
faceToCellDistanceRatios[:self.nx] = 1.
Expand Down
5 changes: 5 additions & 0 deletions fipy/meshes/uniformGrid3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ def _cellDistances(self):

@property
def _faceToCellDistanceRatio(self):
"""how far face is from first to second cell
distance from center of face to center of first cell divided by distance
between cell centers
"""
XYdis = numerix.zeros((self.nx, self.ny, self.nz + 1),'d')
XYdis[:] = 0.5
XYdis[..., 0] = 1
Expand Down

0 comments on commit 3f73d02

Please sign in to comment.