Conversation
…hodology used in the OceanMesh2D MATLAB repository
oceanmesh/read_fort14.py
Outdated
| idx = np.loadtxt(fid, max_rows=N[0], dtype=int) | ||
|
|
||
| # Ordenar los datos leídos | ||
| EToV = idx[:, 2:5] |
There was a problem hiding this comment.
Could be good to check that EToV is converted to zero-based indexing as that's how it's used in Python.
oceanmesh/read_fort14.py
Outdated
| VX = np.full((num_nodes, 2), np.nan) | ||
| B = np.full(num_nodes, np.nan) | ||
|
|
||
| VX[Val[:, 0].astype(int) - 1, :] = Val[:, 1:3] |
There was a problem hiding this comment.
Could be good to check that all vertices are present in the element table.
|
Should this be part of a reader/writer class instead of a standalone function? |
|
Maybe we need a reader/writer, a mesh_generator and a plot classes. Or we can put it in a separate class cause this is not related to the main objective of ocean mesh (create mesh)? |
Good suggestion while it's not the purpose of this library it's an essential utility. I'm in favor of creating two additional classes: one dedicating to plotting meshes (similar to msh.plot() in MATLAB) and a reader/writer for fort14 and 2dm format. |
|
Please rebase with the latest master. I think these functions should be integrated into a class called |
to parse fort.14 mesh files, inspired by the methodology used in the OceanMesh2D MATLAB repository