Fixed abaqus_read_mesh() 1.0E+00 problem

This commit is contained in:
Tero Frondelius
2016-11-17 19:43:20 +02:00
parent 2ef93e54a6
commit 88a72f7bde
3 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ function parse_section(model, lines, key::Symbol, idx_start,
definition = lines[idx_start]
for line in lines[idx_start + 1: idx_end]
if !(empty_or_comment_line(line))
m = matchall(r"[-0-9.eE]+", line)
m = matchall(r"[-0-9.eE+]+", line)
node_id = parse(Int, m[1])
coords = float(m[2:end])
model["nodes"][node_id] = coords
+6
View File
@@ -55,3 +55,9 @@ end
elements = create_surface_elements(mesh,:LOAD)
@test get_connectivity(elements[1]) == [8,10,9]
end
@testset "parse nodes from abaqus .inp file to Mesh (NX export)" begin
fn = joinpath(Pkg.dir("JuliaFEM"), "test", "testdata","nx_export_problem.inp")
mesh = abaqus_read_mesh(fn)
@test length(mesh.nodes) == 3
end
+3 -3
View File
@@ -1,14 +1,14 @@
*NODE, NSET=NALL
1, 4.07417, 3.51532, 4.43035
2, 6.24583, 4.69753, 6.40067
3, 1.0e1, 10.00000, 0.00000
3,1.0e1,10.00000,0.00000
4, 1.0E1, 0.00000, 0.00000
5, 0.00000, 0.00000, 0.00000
6, 0.00000, 10.00000, 0.00000
7, 0.00000, 10.00000, 10.00000
8, 0.00000, 0.00000, 10.00000
9, 100.0e-1, 10.00000, 10.00000
10, 100.0E-1, 0.00000, 10.00000
9, 100.0e-1,10.00000,10.00000
10,100.0E-1,0.00000,10.00000
*ELEMENT, TYPE=C3D4, ELSET=CUBE
1, 8, 10, 1, 2
2, 4, 1, 10, 2