Giter Club home page Giter Club logo

Comments (9)

TeroFrondelius avatar TeroFrondelius commented on August 21, 2024

Hi @Sukhe1993,
You will need to give a file name as a string:

meshfile = joinpath(datadir, "JuliaFEMSMP18.med")
mesh = aster_read_mesh(meshfile)

This equals:

mesh = aster_read_mesh( "datadir/JuliaFEMSMP18.med")

Here is the full example: https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/examples/linear_static.jl and here is the mesh file: https://github.com/JuliaFEM/JuliaFEM.jl/tree/master/examples/linear_static

I just noticed that instead of datadir it should be linear_static in the above example.

from abaqusreader.jl.

Sukhe1993 avatar Sukhe1993 commented on August 21, 2024

Hi @Sukhe1993,
You will need to give a file name as a string:

meshfile = joinpath(datadir, "JuliaFEMSMP18.med")
mesh = aster_read_mesh(meshfile)

This equals:

mesh = aster_read_mesh( "datadir/JuliaFEMSMP18.med")

Here is the full example: https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/examples/linear_static.jl and here is the mesh file: https://github.com/JuliaFEM/JuliaFEM.jl/tree/master/examples/linear_static

I just noticed that instead of datadir it should be linear_static in the above example.

Thanks, TeroFrondelius,

I gave the name same as the example below and follow the example below.
http://www.juliafem.org/JuliaFEM.jl/latest/examples/2d_hertz_contact.html
However, it still doesn't work.

from abaqusreader.jl.

TeroFrondelius avatar TeroFrondelius commented on August 21, 2024

Can you post your code and the error message.

from abaqusreader.jl.

Sukhe1993 avatar Sukhe1993 commented on August 21, 2024

Can you post your code and the error message.

Thanks for your help

using JuliaFEM, LinearAlgebra, Pkg
using JuliaFEM, LinearAlgebra, Pkg
datadir = Pkg.dir("JuliaFEM","examples")
┌ Warning: Pkg.dir(pkgname, paths...) is deprecated; instead, do import JuliaFEM; joinpath(dirname(pathof(JuliaFEM)), "..", paths...).
└ @ Pkg.API C:\cygwin\home\Administrator\buildbot\worker\package_win32\build\usr\share\julia\stdlib\v1.2\Pkg\src\API.jl:415
"C:\Users\21631933\.julia\packages\JuliaFEM\or1RT\examples"
meshfile = joinpath(datadir,"hertz_2d_full.med")
"C:\Users\21631933\.julia\packages\JuliaFEM\or1RT\examples\hertz_2d_full.med"
mesh = aster_read_mesh(meshfile)
HDF5-DIAG: Error detected in HDF5 (1.10.5) thread 0:
#000: E:/mingwbuild/mingw-w64-hdf5/src/hdf5-1.10.5/src/H5F.c line 370 in H5Fis_hdf5(): unable open file
major: File accessibilty
minor: Not an HDF5 file
#1: E:/mingwbuild/mingw-w64-hdf5/src/hdf5-1.10.5/src/H5Fint.c line 826 in H5F__is_hdf5(): unable to open file
major: Low-level I/O
minor: Unable to initialize object
#2: E:/mingwbuild/mingw-w64-hdf5/src/hdf5-1.10.5/src/H5FD.c line 734 in H5FD_open(): open failed
major: Virtual File Layer
minor: Unable to initialize object
#3: E:/mingwbuild/mingw-w64-hdf5/src/hdf5-1.10.5/src/H5FDsec2.c line 346 in H5FD_sec2_open(): unable to open file: name = 'C:\Users\21631933.julia\packages\JuliaFEM\or1RT\examples\hertz_2d_full.med', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0
major: File accessibilty
minor: Unable to open file
Cannot access file C:\Users\21631933.julia\packages\JuliaFEM\or1RT\examples\hertz_2d_full.med

Stacktrace:
[1] error(::String, ::String) at .\error.jl:42
[2] h5f_is_hdf5(::String) at C:\Users\21631933.julia\packages\HDF5\DktP4\src\HDF5.jl:2329
[3] #h5open#3(::Bool, ::typeof(HDF5.h5open), ::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::HDF5.HDF5Properties, ::HDF5.HDF5Properties) at C:\Users\21631933.julia\packages\HDF5\DktP4\src\HDF5.jl:627
[4] #h5open at C:\Users\21631933.julia\packages\HDF5\DktP4\src\HDF5.jl:0 [inlined]
[5] #h5open#4(::Bool, ::typeof(HDF5.h5open), ::String, ::String) at C:\Users\21631933.julia\packages\HDF5\DktP4\src\HDF5.jl:675
[6] h5open at C:\Users\21631933.julia\packages\HDF5\DktP4\src\HDF5.jl:658 [inlined]
[7] h5read(::String, ::String) at C:\Users\21631933.julia\packages\HDF5\DktP4\src\HDF5.jl:724
[8] AsterReader.MEDFile(::String) at C:\Users\21631933.julia\packages\AsterReader\LfzMD\src\read_aster_mesh.jl:40
[9] aster_read_mesh(::String, ::Nothing) at C:\Users\21631933.julia\packages\AsterReader\LfzMD\src\read_aster_mesh.jl:177
[10] #aster_read_mesh#121(::Bool, ::typeof(aster_read_mesh), ::String, ::Nothing) at C:\Users\21631933.julia\packages\JuliaFEM\or1RT\src\preprocess_aster_reader.jl:59
[11] aster_read_mesh(::String, ::Nothing) at C:\Users\21631933.julia\packages\JuliaFEM\or1RT\src\preprocess_aster_reader.jl:59 (repeats 2 times)
[12] top-level scope at In[6]:1

from abaqusreader.jl.

Sukhe1993 avatar Sukhe1993 commented on August 21, 2024

Can you post your code and the error message.

_ipynb.pdf
This is the pdf file, cheers

from abaqusreader.jl.

TeroFrondelius avatar TeroFrondelius commented on August 21, 2024

No such file or directory

Please download the med file to the same directory you are running the example and change the command to have just the file name.

from abaqusreader.jl.

Sukhe1993 avatar Sukhe1993 commented on August 21, 2024

from abaqusreader.jl.

ahojukka5 avatar ahojukka5 commented on August 21, 2024

Most of the output is because the documentation generation is failing. Did you already resolve this problem? Anyway, the problem seems to be quite trivial. You just need to have your script and mesh file in the same directory. This is working for me:

using AsterReader
meshfile = download("https://github.com/JuliaFEM/AsterReader.jl/raw/master/test/test_read_aster_mesh/quad4.med")
mesh = aster_read_mesh(meshfile)
println(mesh)

from abaqusreader.jl.

ahojukka5 avatar ahojukka5 commented on August 21, 2024

Now AsterReader.jl is giving more clear error message when user tries to load file not existing.

from abaqusreader.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.