Changeset 9319
- Timestamp:
- Sep 3, 2014, 11:37:00 AM (10 years ago)
- Location:
- trunk/anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/general_mesh.py
r9041 r9319 169 169 #assert num.allclose(self.areas, areas) 170 170 171 i d = num.where(self.areas <= 0.0)172 msg = 'Degenerate Triangle(s) '+str(i d[0])171 ind = num.where(self.areas <= 0.0) 172 msg = 'Degenerate Triangle(s) '+str(ind[0]) 173 173 assert num.all(self.areas > 0.0), msg 174 174 -
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_general_mesh.py
r9043 r9319 347 347 348 348 assert domain.get_area() == 1.0 349 350 351 352 def test_one_degenerate_triangles(self): 353 354 355 a = num.array([1.0, 1.0]) 356 b = num.array([0.0, 2.0]) 357 c = num.array([2.0, 0.0]) 358 d = num.array([0.0, 4.0]) 359 e = num.array([2.0, 2.0]) 360 f = num.array([4.0, 0.0]) 361 nodes = num.array([a, b, c, d, e, f]) 362 363 364 # bac, bce, ecf, dbe 365 triangles = num.array([[1,0,2], [1,2,4], [4,2,5], [3,1,4]], num.int) 366 367 try: 368 domain = General_mesh(nodes, triangles) 369 except AssertionError: 370 #print 'excepted assertion error' 371 pass 372 373 374 375 def test_two_degenerate_triangles(self): 376 377 378 a = num.array([1.0, 1.0]) 379 b = num.array([0.0, 2.0]) 380 c = num.array([2.0, 0.0]) 381 d = num.array([1.0, 2.0]) 382 e = num.array([2.0, 2.0]) 383 f = num.array([4.0, 0.0]) 384 nodes = num.array([a, b, c, d, e, f]) 385 386 387 # bac, bce, ecf, dbe 388 triangles = num.array([[1,0,2], [1,2,4], [4,2,5], [3,1,4]], num.int) 389 390 391 try: 392 domain = General_mesh(nodes, triangles) 393 except AssertionError: 394 #print 'excepted assertion error' 395 pass 396 397 349 398 350 399 -
trunk/anuga_core/source/anuga/validation_utilities/typeset_report.py
r9223 r9319 1 1 #! /usr/bin/python 2 2 3 # To change this template, choose Tools | Templates4 # and open the template in the editor.5 3 6 4 __author__="steve" … … 10 8 11 9 12 def typeset_report(report_name='report', verbose= False):10 def typeset_report(report_name='report', verbose=True): 13 11 14 12 import os 13 import subprocess 15 14 16 15 if verbose: … … 19 18 print 50*'=' 20 19 21 os.system('pdflatex -shell-escape -interaction=batchmode %s.tex' % report_name) 22 os.system('bibtex %s' % report_name) 23 os.system('pdflatex -shell-escape -interaction=batchmode %s.tex' % report_name) 24 os.system('pdflatex -shell-escape -interaction=batchmode %s.tex' % report_name) 20 cmd = 'pdflatex -shell-escape -interaction=batchmode %s.tex' % report_name 21 22 try: 23 out = subprocess.check_output(cmd, shell=True) 24 out = subprocess.check_output('bibtex %s' % report_name) 25 out = subprocess.check_output(cmd, shell=True) 26 out = subprocess.check_output(cmd, shell=True) 27 except: 28 pass 29 30 #os.system('pdflatex -shell-escape -interaction=batchmode %s.tex' % report_name) 31 #os.system('bibtex %s' % report_name) 32 #os.system('pdflatex -shell-escape -interaction=batchmode %s.tex' % report_name) 33 #os.system('pdflatex -shell-escape -interaction=batchmode %s.tex' % report_name) 25 34 26 35
Note: See TracChangeset
for help on using the changeset viewer.