- Timestamp:
- 11/17/2008 12:24:45 PM (7 weeks ago)
- Location:
- trunk
- Files:
-
- 6 modified
-
FiPy.egg-info/SOURCES.txt (modified) (2 diffs)
-
fipy/meshes/numMesh/gmshImport.py (modified) (1 diff)
-
fipy/meshes/numMesh/mesh.py (modified) (1 diff)
-
fipy/meshes/numMesh/periodicGrid2D.py (modified) (1 diff)
-
fipy/tools/numerix.py (modified) (3 diffs)
-
fipy/variables/binaryOperatorVariable.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/FiPy.egg-info/SOURCES.txt
r2811 r2822 22 22 documentation/TALKS.txt 23 23 documentation/TODOLIST.txt 24 documentation/VERSION.txt 24 25 documentation/VKML.txt 25 26 documentation/figures/NIST_right2line.pdf … … 30 31 documentation/manual/fipy.bst 31 32 documentation/manual/fipy.dbj 33 documentation/manual/fipy.pdf 32 34 documentation/manual/fipy.sty 33 35 documentation/manual/fipy.tex -
trunk/fipy/meshes/numMesh/gmshImport.py
r2781 r2822 122 122 [0 1 2 3 2 4 2 3 5 4 6 5 7 4 6]] 123 123 124 >>> print mesh._getCellFaceIDs()125 [[0 0 2 7 7 8 12 14]126 [1 3 5 4 8 10 13 11]127 [2 4 6 6 9 11 9 12]]128 124 >>> (mesh._getCellFaceIDs() == [[0, 0, 2, 7, 7, 8, 12, 14], 125 ... [1, 3, 5, 4, 8, 10, 13, 11], 126 ... [2, 4, 6, 6, 9, 11, 9, 12]]).flat.all() 127 True 128 129 129 The following test case is to test the handedness of the mesh to check 130 130 it does not return negative volumes. Firstly we set up a list with -
trunk/fipy/meshes/numMesh/mesh.py
r2781 r2822 104 104 >>> mesh = Grid2D(nx = 2, ny = 2, dx = 1., dy = 1.) 105 105 106 >>> print mesh._getCellFaceIDs()107 [[0 1 2 3]108 [7 8 10 11]109 [2 3 4 5]110 [6 7 9 10]]111 106 >>> (mesh._getCellFaceIDs() == [[0, 1, 2, 3], 107 ... [7, 8, 10, 11], 108 ... [2, 3, 4, 5], 109 ... [6, 7, 9, 10]]).flat.all() 110 True 111 112 112 >>> mesh._connectFaces(numerix.nonzero(mesh.getFacesLeft()), numerix.nonzero(mesh.getFacesRight())) 113 113 114 >>> print mesh._getCellFaceIDs()115 [[0 1 2 3]116 [7 6 10 9]117 [2 3 4 5]118 [6 7 9 10]]114 >>> (mesh._getCellFaceIDs() == [[0, 1, 2, 3], 115 ... [7, 6, 10, 9], 116 ... [2, 3, 4, 5], 117 ... [6, 7, 9, 10]]).flat.all() 118 True 119 119 120 120 """ -
trunk/fipy/meshes/numMesh/periodicGrid2D.py
r2781 r2822 60 60 [ 0.5 0.5 0.5 0.5 0.25 0.25 1. 1. 0.5 1. 1. 0.5 ] 61 61 62 >>> print mesh._getCellFaceIDs()63 [[0 1 2 3]64 [7 6 10 9]65 [2 3 0 1]66 [6 7 9 10]]62 >>> (mesh._getCellFaceIDs() == [[0, 1, 2, 3], 63 ... [7, 6, 10, 9], 64 ... [2, 3, 0, 1], 65 ... [6, 7, 9, 10]]).flat.all() 66 True 67 67 68 68 >>> print mesh._getCellToCellDistances() -
trunk/fipy/tools/numerix.py
r2781 r2822 323 323 generate `OverflowError: math range error` 324 324 325 >>> try: 326 ... print str(arccos(2.0)) == "nan" 325 >>> try: 326 ... import sys 327 ... if sys.platform == 'win32': 328 ... print str(arccos(2.0)) == '-1.#IND' 329 ... else: 330 ... print str(arccos(2.0)) == 'nan' 327 331 ... except (OverflowError, ValueError): 328 332 ... print 1 … … 368 372 generate `OverflowError: math range error` 369 373 370 >>> try: 371 ... print str(arccosh(0.0)) == "nan" 374 >>> try: 375 ... import sys 376 ... if sys.platform == 'win32': 377 ... print str(arccosh(0.0)) == '-1.#IND' 378 ... else: 379 ... print str(arccosh(0.0)) == 'nan' 372 380 ... except (OverflowError, ValueError): 373 381 ... print 1 … … 405 413 generate `OverflowError: math range error` 406 414 407 >>> try: 408 ... print str(arcsin(2.0)) == "nan" 415 >>> try: 416 ... import sys 417 ... if sys.platform == 'win32': 418 ... print str(arcsin(2.0)) == '-1.#IND' 419 ... else: 420 ... print str(arcsin(2.0)) == 'nan' 409 421 ... except (OverflowError, ValueError): 410 422 ... print 1 -
trunk/fipy/variables/binaryOperatorVariable.py
r2781 r2822 49 49 ... (f, n) = dump.write(v * v) 50 50 ... tmp += [dump.read(n)] 51 ... os.remove(n)51 ... ##os.remove(n) 52 52 ... if sys.platform != 'win32': 53 53 ... os.close(f) 54 ... os.remove(n) 54 55 >>> for v in tmp: 55 56 ... print v.__class__
FiPy: A Finite Volume PDE Solver Using Python