kinnala / scikit-fem

Simple finite element assemblers
https://scikit-fem.readthedocs.io
BSD 3-Clause "New" or "Revised" License
470 stars 76 forks source link

Add save_npy/load_npy #1109

Open kinnala opened 3 months ago

kinnala commented 3 months ago

Our recent work using meshes with more than 10 M nodes and large subdomains revealed that Mesh.save is not suitable for such large meshes for various reasons, including the conversion to meshio taking too long and the resulting files being too large.

We ended up saving m.t and m.p (etc.) to npy files through np.save. This should be implemented as Mesh.save_npy and Mesh.load_npy.

kinnala commented 3 months ago

Here are the relevant bits:

np.save(dire + 'mt', m.t, allow_pickle=False)
t = np.load(dire + 'mt.npy', allow_pickle=False)