-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added read_fort14.py #82
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
to parse fort.14 mesh files, inspired by the methodology used in the OceanMesh2D MATLAB repository