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

Inconsistent common block #171

Open
cpraveen opened this issue Dec 31, 2023 · 2 comments
Open

Inconsistent common block #171

cpraveen opened this issue Dec 31, 2023 · 2 comments

Comments

@cpraveen
Copy link

While trying to setup a quad grid examples, I noticed that the common blocks here

https://github.com/clawpack/riemann/blob/master/src/rpn2_euler_mapgrid.f90#L44
https://github.com/clawpack/riemann/blob/master/src/rpt2_euler_mapgrid.f90#L69

and here

https://github.com/clawpack/riemann/blob/master/src/euler_roe_solver_mapgrid.f90#L11

differ. The last one has gamma1 which is not present in the other two. I think these files will be used together.

Is this correct fortran ? The gamma1 need not have to be put in the common block.

@ketch
Copy link
Member

ketch commented Jan 1, 2024

Yes, I think you're right. Thanks for catching that. I agree that the best solution is to remove gamma1 from the common block. If you'd like to make a pull request with this change, that would be great. Even better if you could create an example problem that uses this code and add it to a subdirectory in pyclaw/examples.

@rjleveque
Copy link
Member

You are right that gamma1 is not needed, although the code should still run fine either way since gamma1 is defined locally, and in Fortran a common block is just a pointer to the start of the memory locations that hold the listed variables. But it would be cleaner to remove it.

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

No branches or pull requests

3 participants