Closed martijnwilpshaar closed 2 years ago
Yes, there seems to be an issue with the mesh loader. I'm not familiar with the HST format, so it won't be easy to fix without an example of a failing file.
@frongere Do you remember the logic behind this section of the code?
I am also having trouble opening a Hydrostar mesh although I get a different error message:
AssertionError: Faces of a mesh should be provided as positive integers (ids of vertices)
Replacing the following line of code in def load_HST
return Mesh(vertices, faces-1, name)
by
return Mesh(vertices, faces, name)
fixed this issue when loading the hydrostar mesh (as by taking faces-1 results in a face being represented by a negative integer -1)
However, when trying to solve the diffraction/radiation problem, the GRMS solver did not converge, and the direct linear solver resulted in an empty dataset.
I attached the hydrostar mesh (replacing the .hst extension by .txt to be able to attach it)
Indeed, the mesh reader does not seem to be able to read all possible variants of HST files. There are several issues here:
panel_index vertex_1 vertex_2 vertex_3
but are wrongly interpreted as a list of quadrangles:
vertex_1 vertex_2 vertex_3 vertex_4
The mesh reader is at fault here.
SymmetricMesh
types, unlike meshmagick for which this code was written in the first place.)Since I'm looking at the HST file reader: I believe @martijnwilpshaar's issue was with the support of multi-body files. It seems that the mesh reader was thought to support several blocks of vertices coordinates, but the Python code is clearly wrong. If anybody has an example of a multibody Hydrostar mesh, it would help to debug this.
@mancellin thanks for your very rapid response! I managed to load in the mesh by replacing panel_index by one of the vertices in the load_HST code.
I now mirrored the body to construct a mesh of the full body (ignoring symmetries). Is there any way to tell the solver that this mesh is symmetric to exploit that and speed up the computation?
I now mirrored the body to construct a mesh of the full body (ignoring symmetries). Is there any way to tell the solver that this mesh is symmetric to exploit that and speed up the computation?
See this example from the cookbook:
I now mirrored the body to construct a mesh of the full body (ignoring symmetries). Is there any way to tell the solver that this mesh is symmetric to exploit that and speed up the computation?
See this example from the cookbook:
Thanks!
The new HST mesh reader should provide better error messages and handle symmetries. There are still features of HST mesh files that are not implemented, so feel free to reopen the issue if you have requests or suggestions.
Hi,
When opening a hydrostar (.hst) mesh, it gives the following error:
File "C:\Anaconda3\lib\site-packages\capytaine\io\mesh_loaders.py", line 151, in load_HST vertices_tmp.append(list(map(float, node.split()[1:])))
AttributeError: 'numpy.ndarray' object has no attribute 'append'
I'm interested in opening this .hst mesh and see the underwater volume (which is necessary for my further calculations). This mesh has been generated by an external company so I cannot share the details unfortunately.
Could you have a look?
Many thanks!