Skip to content
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

[WIP] Compile and install 3D Euler with gravity example #723

Merged
merged 7 commits into from
Aug 7, 2024

Conversation

carlosmunozmoncayo
Copy link
Contributor

@carlosmunozmoncayo carlosmunozmoncayo commented Jul 4, 2024

The pyclaw/examples/euler_gravity_3d example is compiled and installed at run-time. The Fortran source is now located in this directory.

The changes in this PR are tested here, along with #721 (although this PR does not depend on #721).

If this PR is merged, the files euler3d_mappedGrid.f90, rpn3_euler_mapgrid.f90, rpt3_euler_mapgrid.f90, and rptt3_euler_mapgrid.f90 could be removed from src directory in the riemann repository.

@ketch
Copy link
Member

ketch commented Jul 4, 2024

Is there a reason for moving the Riemann solver out of the Riemann repository and into PyClaw? That's generally the opposite of what we want to do.

@carlosmunozmoncayo
Copy link
Contributor Author

carlosmunozmoncayo commented Jul 4, 2024

@ketch I tried to do something similar to pyclaw/examples/advection_reaction_2d, avoiding using a relative path to the riemann repository in the Makefile. I guess the Makefile will not be necessary anymore if the Riemann solver and the mapGrid module are compiled at installation.

Then, I will leave the Riemann solver in the riemann repository, compile it at installation there, and update the imports in this example.

Should the mapGrid module euler3d_mappedGrid.f90 also stay in riemann/src, or should it be moved here?

@ketch
Copy link
Member

ketch commented Jul 4, 2024

I should have been more clear before. I think that all we want to do is add the code required for meson to compile what is already in this example directory.

@ketch
Copy link
Member

ketch commented Jul 4, 2024

I tried to do something similar to pyclaw/examples/advection_reaction_2d

That specific example is provided to show users how to incorporate their own Riemann solver. For all other examples, we keep the Riemann solver in Riemann.

I guess the Makefile will not be necessary anymore if the Riemann solver and the mapGrid module are compiled at installation.

That's correct.

Should the mapGrid module euler3d_mappedGrid.f90 also stay in riemann/src, or should it be moved here?

That's a good question; technically that code is not "Riemann solver" code, but it's basically required whenever one uses the 3D Euler mapped grid Riemann solver, so I think it makes sense to leave it in Riemann.

@carlosmunozmoncayo
Copy link
Contributor Author

Ok, I'll add just the necessary changes for that in this PR and create another one for the compilation in the Riemann repository.

@carlosmunozmoncayo carlosmunozmoncayo changed the title Compile and install 3D Euler with gravity example [WIP] Compile and install 3D Euler with gravity example Jul 4, 2024
@@ -340,7 +340,7 @@ def euler3d(kernel_language='Fortran',solver_type='classic',\
claw.solver = solver
claw.output_format = output_format
claw.output_file_prefix = file_prefix
claw.keep_copy = False
claw.keep_copy = True
Copy link
Member

Choose a reason for hiding this comment

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

I think it's best to leave this set to False by default. If someone tries running this with a larger grid, they could easily run out of memory.

@carlosmunozmoncayo
Copy link
Contributor Author

I made the changes. The imports in rising_hot_sphere.py and rising_hot_sphere_spherical.py rely on clawpack/riemann#178 to work.

@ketch ketch merged commit 05b28dc into clawpack:master Aug 7, 2024
1 check passed
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.

2 participants