Changeset 2591 for trunk

Show
Ignore:
Timestamp:
06/16/2008 10:17:15 AM (7 months ago)
Author:
wd15
Message:

anisotropy test cases has lower tolerance on older versions of gmsh

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/diffusion/anisotropy.py

    r2541 r2591  
    132132    >>> X, Y = numerix.dot(mesh.getCellCenters(), CellVariable(mesh=mesh, rank=2, value=rotationMatrix)) 
    133133    >>> solution = mass * numerix.exp(-(X**2 / gamma_prime[0][0] + Y**2 / gamma_prime[1][1]) / (4 * time)) / (4 * numerix.pi * time * numerix.sqrt(gamma_prime[0][0] * gamma_prime[1][1])) 
    134     >>> print max(abs((var - solution) / max(var))) < 0.05 
     134    >>> if int(os.popen4('gmsh --version')[1].read().split('.')[0]) < 2: 
     135    ...     tolerance = 0.14 
     136    ... else: 
     137    ...     tolerance = 0.06 
     138    >>> print max(abs((var - solution) / max(solution))) < tolerance 
    135139    True 
    136140