Beispiel #1
0
def test_fast_stiffness_geo_3d():
    kv = bspline.make_knots(2, 0.0, 1.0, 10)
    geo = geometry.twisted_box()
    A = stiffness_fast((kv,kv,kv), geo, verbose=0)
    A_ref = read_sparse_matrix(os.path.join(os.path.dirname(__file__),
        "poisson_neu_d3_p2_n10_stiff.mtx.gz"))
    assert abs(A - A_ref).max() < 1e-9
Beispiel #2
0
def test_mass_geo_3d():
    kv = bspline.make_knots(2, 0.0, 1.0, 10)
    geo = geometry.twisted_box()
    M = mass((kv,kv,kv), geo)
    M_ref = read_sparse_matrix(os.path.join(os.path.dirname(__file__),
        "poisson_neu_d3_p2_n10_mass.mtx.gz"))
    assert abs(M - M_ref).max() < 1e-14
Beispiel #3
0
def test_fast_stiffness_geo_2d():
    kv = bspline.make_knots(3, 0.0, 1.0, 15)
    geo = geometry.bspline_quarter_annulus()
    A = stiffness_fast((kv,kv), geo, verbose=0)
    A_ref = read_sparse_matrix(os.path.join(os.path.dirname(__file__),
        "poisson_neu_d2_p3_n15_stiff.mtx.gz"))
    assert abs(A - A_ref).max() < 1e-9
Beispiel #4
0
def test_mass_geo_2d():
    kv = bspline.make_knots(3, 0.0, 1.0, 15)
    geo = geometry.bspline_quarter_annulus()
    M = mass((kv,kv), geo)
    M_ref = read_sparse_matrix(os.path.join(os.path.dirname(__file__),
        "poisson_neu_d2_p3_n15_mass.mtx.gz"))
    assert abs(M - M_ref).max() < 1e-14