diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 222f8b3..0647489 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ We support Julia versions 0.4+. [See issue #26](https://github.com/JuliaFEM/Juli Only pull requests to src folder -------------------------------- -See [issue #29](https://github.com/JuliaFEM/JuliaFEM.jl/issues/29). This ensures peer review check for contributors and hopefully will decrease the number of merge conflicts. +See [issue #29](https://github.com/JuliaFEM/JuliaFEM.jl/issues/29). This ensures peer review check for contributors and hopefully will decrease the number of merge conflicts. Before making the pull request runn all test: either type `julia> Pkg.test("JuliaFEM")` at REPL or `julia test/runtests.jl` at command line. New technology should be introduced through notebooks ----------------------------------------------------- diff --git a/src/JuliaFEM.jl b/src/JuliaFEM.jl index ae541f8..96f249a 100644 --- a/src/JuliaFEM.jl +++ b/src/JuliaFEM.jl @@ -1,13 +1,12 @@ -# This file is a part of JuliaFEM. +# This file is a part of JuliaFEM. # License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md module JuliaFEM VERSION < v"0.4-" && using Docile -# import solvers include("elasticity_solver.jl") include("xdmf.jl") -#using elasticity_solver +include("abaqus_reader.jl") export Model, new_model, new_field, get_field, add_nodes, get_nodes, add_elements, get_elements diff --git a/src/abaqus_reader.jl b/src/abaqus_reader.jl index de5557d..749b6a9 100644 --- a/src/abaqus_reader.jl +++ b/src/abaqus_reader.jl @@ -1,5 +1,9 @@ +<<<<<<< HEAD # This file is a part of JuliaFEM. # License is MIT: https://github.com/ovainola/JuliaFEM/blob/master/README.md +======= +# This file is a part of JuliaFEM. License is MIT: https://github.com/ovainola/JuliaFEM/blob/master/README.md +>>>>>>> 3e48ae32abe7a17af89cd1e23d798532aed2960a module abaqus_reader using Logging @@ -10,9 +14,15 @@ VERSION < v"0.4-" && using Docile eldims = Dict("C3D10" => 10) global handlers = Dict() +<<<<<<< HEAD @doc """ Register new handler for parser """ -> +======= +""" +Register new handler for parser +""" +>>>>>>> 3e48ae32abe7a17af89cd1e23d798532aed2960a function add_handler(section, function_name) handlers[section] = function_name end @@ -130,4 +140,8 @@ add_handler("ELEMENT", parse_element_section) add_handler("NSET", parse_nodeset_section) +<<<<<<< HEAD end +======= +end +>>>>>>> 3e48ae32abe7a17af89cd1e23d798532aed2960a diff --git a/src/xdmf.jl b/src/xdmf.jl index f285c4c..a4af537 100644 --- a/src/xdmf.jl +++ b/src/xdmf.jl @@ -104,5 +104,8 @@ function xdmf_new_field(grid, name, source, data) add_text(dataitem, join(data, " ")) end +function xdmf_save_model(xdoc, filename) + save_file(xdoc, filename) +end end diff --git a/test/test_abaqus_reader.jl b/test/test_abaqus_reader.jl new file mode 100644 index 0000000..cf0f91e --- /dev/null +++ b/test/test_abaqus_reader.jl @@ -0,0 +1,17 @@ +using FactCheck +using Logging +@Logging.configure(level=INFO) + +using JuliaFEM.abaqus_reader: parse_abaqus + +facts("test import abaqus model") do + fid = open("../geometry/3d_beam/palkki.inp") + model = parse_abaqus(fid) + close(fid) + @fact length(model["nodes"]) => 298 + @fact length(model["elements"]) => 120 + @fact length(model["elsets"]["Body1"]) => 120 + @fact length(model["nsets"]["SUPPORT"]) => 9 + @fact length(model["nsets"]["LOAD"]) => 9 + @fact length(model["nsets"]["TOP"]) => 83 +end \ No newline at end of file