示例#1
0
    # This imports the rectangle domain function 
    from esys.finley import MakeDomain
    HAVE_FINLEY = True
except ImportError:
    print("Finley module not available")
    HAVE_FINLEY = False
########################################################MPI WORLD CHECK
if getMPISizeWorld() > 1:
        import sys
        print("This example will not run in an MPI world.")
        sys.exit(0)

if HAVE_FINLEY:
    # make sure path exists 
    save_path= os.path.join("data","example09c") 
    mkDir(save_path)

    ################################################ESTABLISHING PARAMETERS
    #Model Parameters
    origin=[0,0]                  #orign of model
    xwidth=300.0                      #width of model
    depth=-100.0                      #depth of model
    nintf=3                         #number of the interfaces
    lintf_depths=[-20,-40,-60]       #depth of interfaces
    rintf_depths=[-30,-50,-70]      #vertical displacement across fault
    fault_dip=40.0                  #dip of fault plane
    fault_atsurface=50.0             #location of fault at surface
    fault_width=10                 #apparent width of fault plane 

    element_size=1.
try:
    from esys.finley import MakeDomain
    HAVE_FINLEY = True
except ImportError:
    print("Finley module not available")
    HAVE_FINLEY = False

########################################################MPI WORLD CHECK
if getMPISizeWorld() > 1 or (hasFeature('mpi') and hasFeature('gmsh_mpi')):
    print("This example will not run in an MPI world!")
elif HAVE_FINLEY:
    import os
    import subprocess as sp
    # make sure path exists
    save_path = os.path.join("data", "example10m")
    mkDir(save_path)

    ################################################BIG DOMAIN
    #ESTABLISHING PARAMETERS
    width = 10000.  #width of model
    depth = 10000.  #depth of model
    bele_size = 500.  #big element size
    #DOMAIN CONSTRUCTION
    p0 = Point(0.0, 0.0)
    p1 = Point(width, 0.0)
    p2 = Point(width, depth)
    p3 = Point(0.0, depth)
    # Join corners in anti-clockwise manner.
    l01 = Line(p0, p1)
    l12 = Line(p1, p2)
    l23 = Line(p2, p3)