Skip to content

cartesian_to_depth_coordinates utilities in the geometry model - #7292

Open
lhy11009 wants to merge 1 commit into
geodynamics:mainfrom
lhy11009:cartesion_to_depth
Open

cartesian_to_depth_coordinates utilities in the geometry model#7292
lhy11009 wants to merge 1 commit into
geodynamics:mainfrom
lhy11009:cartesion_to_depth

Conversation

@lhy11009

Copy link
Copy Markdown
Contributor

Pull Request Checklist. Please read and check each box with an X. Delete any part not applicable. Ask on the forum if you need help with any step.

A new geometry model interface function to convert Cartesian positions
to depth coordinates while preserving geometry-specific lateral coordinates.
The box geometry now returns depth together with the horizontal Cartesian
coordinates.

Before your first pull request:

For all pull requests:

If yes, please describe your usage of AI models in the creation of this pull request

For new features/models or changes of existing features:

  • I have tested my new feature locally to ensure it is correct.
  • I have created a testcase for the new feature/benchmark in the tests/ directory.
  • I have added a changelog entry in the doc/modules/changes directory that will inform other users of my change.

@lhy11009

lhy11009 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

There is currently an option for the "Coordinate system" as depth, which allows only one entry into the function as depth lateral coordinates (e.g. x in box). This is largely restricted by this function in source/geometry_model/interface.cc:

Interface<dim>::cartesian_to_other_coordinates

and the fact that it uses:

           case Utilities::Coordinates::depth:
             other_coord[0] = depth(position);

My proposal of change is to largely keep the current interface, while making a virtual function of Interface<dim>::cartesian_to_depth_coordinates
This would do the exact thing of providing only the depth for the base of the Interface class, while taking different implementations for the daughter classes like Box.

For instance, I implement the version for box geometry.

Given the current change, I am not sure what a good strategy is for a test case. I have only tested in the models I run.

@lhy11009 lhy11009 mentioned this pull request Aug 13, 2026
5 tasks
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.

1 participant