Skip to content

Update easi python script#1544

Merged
NicoSchlw merged 5 commits intomasterfrom
thomas/update_easi_script
Mar 23, 2026
Merged

Update easi python script#1544
NicoSchlw merged 5 commits intomasterfrom
thomas/update_easi_script

Conversation

@Thomas-Ulrich
Copy link
Copy Markdown
Contributor

@Thomas-Ulrich Thomas-Ulrich commented Mar 23, 2026

  • Allows script to be used on volume data too (e.g. to compute rho Vs Vp).
  • Add subdivide option for higher resolution model parameter evaluation.
  • Some IA guided code improvement.

(tested on fault, volume output with and without refinement)

@Thomas-Ulrich Thomas-Ulrich changed the title update easi script update easi python script Mar 23, 2026
@Thomas-Ulrich Thomas-Ulrich changed the title update easi python script Update easi python script Mar 23, 2026
@NicoSchlw
Copy link
Copy Markdown
Contributor

Thanks for the PR, it's a very valuable extension of the script!

The current script fails when using a seissol output xdmf without fault-tag or group. I would suggest to extend ReadFaultTagOrRegion to generate dummy tags (e.g., tags = np.ones(centers.shape[0])) when the respective fields are not present.

@NicoSchlw
Copy link
Copy Markdown
Contributor

Thanks for addressing the review. I just tested that --subdivide_level 1 fails for volume data with AttributeError: 'UnstructuredGrid' object has no attribute 'GetFaces'

This fixes the issue for me:

            if self.is_volume:
                self.connect = mesh.cells.reshape(-1, n)[:, 1:n].astype(np.int64)
            else:
                self.connect = mesh.faces.reshape(-1, n)[:, 1:n].astype(np.int64)

Also, could you add a comment, what --subdivide_level 1,2 does?

@Thomas-Ulrich
Copy link
Copy Markdown
Contributor Author

Thank you again for your tests. It should work now.

@NicoSchlw NicoSchlw enabled auto-merge March 23, 2026 15:46
Copy link
Copy Markdown
Contributor

@NicoSchlw NicoSchlw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM now.

@NicoSchlw NicoSchlw added this pull request to the merge queue Mar 23, 2026
@davschneller
Copy link
Copy Markdown
Contributor

(just forgot; in case it's relevant: SeisSol/Meshing#58 would move everything preprocessing script-related to the meshing/preprocessing repository)

Merged via the queue into master with commit c015c03 Mar 23, 2026
103 checks passed
@davschneller davschneller deleted the thomas/update_easi_script branch March 23, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants