calfem-python
calfem-python copied to clipboard
Error : Unknown mesh format `msh22', using `msh' instead
Hi, I tried the following code according to the guide in the documentation
import calfem.geometry as cfg
import calfem.mesh as cfm
import calfem.vis as cfv
g = cfg.Geometry()
g.point([0.0, 0.0]) # point 0
g.point([5.0, 0.0]) # point 1
g.point([2.5, 4.0]) # point 2
g.spline([0, 1]) # line 0
g.spline([1, 2]) # line 1
g.spline([2, 0]) # line 2
g.surface([0, 1, 2])
cfv.drawGeometry(g)
cfv.showAndWait()
mesh = cfm.GmshMesh(g)
mesh.elType = 3 # Degrees of freedom per node.
mesh.dofsPerNode = 1 # Factor that changes element sizes.
mesh.elSizeFactor = 0.15 # Element size Factor
coords, edof, dofs, bdofs, elementmarkers = mesh.create()
cfv.figure()
# Draw the mesh.
cfv.drawMesh(
coords=coords,
edof=edof,
dofsPerNode=mesh.dofsPerNode,
elType=mesh.elType,
filled=True,
title="Example 01"
)
When running the line coords, edof, dofs, bdofs, elementmarkers = mesh.create() , an error is occured.
FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
return np.asarray( np.vstack( T * M * CPs[j-1:j+3,:] for j in range( 1, len(CPs)-2 ) ) )
Error : Unknown mesh format msh22', using msh' instead
My environment; Ubuntu 18.04 Python 3.6 gmsh 4.6.0 calfem-python 3.5.3
I googled but, I can't any solution. Could you help me?
I am using gmsh 4.8.3 and this error is not there.