eX-Mech / pymech

A Python software suite for Nek5000 and SIMSON
https://pymech.readthedocs.io/en/stable
GNU General Public License v3.0
24 stars 24 forks source link

Ma2 file reader for nek5000 #47

Closed Simkern closed 2 years ago

Simkern commented 2 years ago

Here's the function to read the ma2 file. The ordering is the same as in the elmap list from the re2 file iirc.

ashwinvis commented 2 years ago

Thanks a lot @Simkern. I will take a look soon.

ashwinvis commented 2 years ago

I am taking a look at your function now @Simkern . Let me know if you are available to fix it.

ashwinvis commented 2 years ago

Does the user really have to specify the number of dimensions ldim. I wonder if it specified in the header part of the ma2 files?

Simkern commented 2 years ago

Does the user really have to specify the number of dimensions ldim. I wonder if it specified in the header part of the ma2 files?

I went through the function again and indeed it is not necessary to specify the mesh dimension although it is not saved in the header. It can be inferred from the auxiliary data and I have added this step.

ashwinvis commented 2 years ago

I have added this step.

I am not sure I understand. Have you made the changes? Let me know when you pushed the new commits.