Beispiel #1
0
def test4():
    print("====== test 4  =====")
    nx = 3 ; px = 3
    geo = periodic_line(n=[nx], p=[px])

    basis_only = False
    #basis_only = True

    basename = "splines"
    #basename = None

    dirname  = "tmp"
    #dirname  = None

    import os
    os.system("mkdir -p " + dirname)

    from caid.io import BZR
    rw = BZR()
    rw.write(geo, fmt="txt", basename=basename, dirname=dirname, basis_only=basis_only)
from caid.numbering.connectivity import connectivity
from caid.utils.quadratures import *

############################################################
if __name__=="__main__":
    from caid.cad_geometry import square, circle, circle_5mp

#    px = 1; py = 1
#    px = 2; py = 2
    px = 3; py = 3
#    px = 4; py = 4
#    px = 5; py = 5

#    geo = square(n=[1,1], p=[px,py])
#    geo = square(n=[3,3], p=[px,py])
#    geo = square(n=[7,7], p=[px,py])
#    geo = square(n=[15,15], p=[px,py])
    geo = square(n=[31,31], p=[px,py])
#    geo = square(n=[63,63], p=[px,py])




#    geo = circle_5mp(n=[3,3], p=[3,3])

    basename = "splines"
    from caid.io import BZR
    rw = BZR()
    rw.write(basename, geo, fmt="txt")

Beispiel #3
0
def test5():
    print("====== test 5  =====")
#    nx = 3 ; px = 2
#    ny = 3 ; py = 2
#    nx = 7 ; px = 2
#    ny = 7 ; py = 2
#    nx = 15 ; px = 2
#    ny = 15 ; py = 2
#    nx = 31 ; px = 2
#    ny = 31 ; py = 2
#    nx = 63 ; px = 2
#    ny = 63 ; py = 2
#    nx = 3 ; px = 3
#    ny = 3 ; py = 3
#    nx = 7 ; px = 3
#    ny = 7 ; py = 3
#    nx = 15 ; px = 3
#    ny = 15 ; py = 3
#    nx = 31 ; px = 3
#    ny = 31 ; py = 3
#    nx = 63 ; px = 3
#    ny = 63 ; py = 3
#    nx = 3 ; px = 4
#    ny = 3 ; py = 4
#    nx = 7 ; px = 4
#    ny = 7 ; py = 4
#    nx = 15 ; px = 4
#    ny = 15 ; py = 4
#    nx = 31 ; px = 4
#    ny = 31 ; py = 4
#    nx = 63 ; px = 4
#    ny = 63 ; py = 4
#    nx = 3 ; px = 5
#    ny = 3 ; py = 5
#    nx = 7 ; px = 5
#    ny = 7 ; py = 5
    nx = 15 ; px = 5
    ny = 15 ; py = 5
#    nx = 31 ; px = 5
#    ny = 31 ; py = 5
#    nx = 63 ; px = 5
#    ny = 63 ; py = 5

#    geo = square(n=[nx, ny], p=[px, py])
    geo = periodic_square(n=[nx, ny], p=[px, py])

    basis_only = False
    #basis_only = True

    basename = "splines"
    #basename = None

    dirname  = "tmp"
    #dirname  = None

    import os
    os.system("mkdir -p " + dirname)

    from caid.io import BZR
    rw = BZR()
    rw.write(geo, fmt="txt", basename=basename, dirname=dirname, basis_only=basis_only)
Beispiel #4
0
# coding: utf-8
import numpy as np
from caid.numbering.connectivity import connectivity
from caid.utils.quadratures import *

############################################################
if __name__ == "__main__":
    from caid.cad_geometry import square, circle, circle_5mp

    #    px = 1; py = 1
    #    px = 2; py = 2
    px = 3
    py = 3
    #    px = 4; py = 4
    #    px = 5; py = 5

    #    geo = square(n=[1,1], p=[px,py])
    #    geo = square(n=[3,3], p=[px,py])
    #    geo = square(n=[7,7], p=[px,py])
    #    geo = square(n=[15,15], p=[px,py])
    geo = square(n=[31, 31], p=[px, py])
    #    geo = square(n=[63,63], p=[px,py])

    #    geo = circle_5mp(n=[3,3], p=[3,3])

    basename = "splines"
    from caid.io import BZR
    rw = BZR()
    rw.write(basename, geo, fmt="txt")