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

Document solver constants and indices, making values available in Python scripts #77

Merged
merged 2 commits into from
Aug 26, 2014

Conversation

ketch
Copy link
Member

@ketch ketch commented Jul 27, 2014

The comments in each normal Riemann solver now include:

  • The number of waves
  • The number of conserved quantities
  • The number of auxiliary variables
  • The names and indices of the conserved quantities and variables

A short script extracts these values and writes them to Python modules
so they can be imported and used in Python scripts.

Ideally, this would be implemented without the extra Python modules
by putting the Riemann solvers in modules and using module data.
This is a simple solution that doesn't require any drastic changes.

@ketch
Copy link
Member Author

ketch commented Jul 27, 2014

One example of how this can be used is here: clawpack/pyclaw#454.

@ketch
Copy link
Member Author

ketch commented Jul 27, 2014

One thing that we should discuss before/if this gets merged is what names to use for the conserved quantity (and auxiliary variable) indices. I have mainly used long names rather than mathematical symbols (e.g., "density" instead of "rho").

@mandli
Copy link
Member

mandli commented Jul 28, 2014

I think keeping the full names rather than the commonly used mathematical symbol names is a good idea for readability and new users. There's nothing more frustrating than taking a look at a new area and finding mathematical symbols everywhere that mean something to the experts but not to a newbie.

@mandli
Copy link
Member

mandli commented Jul 28, 2014

You have segfaulted nosetests, I think there should be an award for such things.

@ketch
Copy link
Member Author

ketch commented Aug 26, 2014

The strange thing is that it segfaulted after nosetests completed with all tests passing. I can't see why it could be failing since

  1. The changes to fortran files are only to comments,
  2. The Python files are merely constants.

I'm getting inconsistent results (different errors) when I rerun on Travis.

Any ideas?

The comments in each normal Riemann solver now include:
- The number of waves
- The number of conserved quantities
- The number of auxiliary variables
- The names and indices of the conserved quantities and variables

A short script extracts these values and writes them to Python modules
so they can be imported and used in Python scripts.

Ideally, this would be implemented without the extra Python modules
by putting the Riemann solvers in modules and using module data.
This is a simple solution that doesn't require any drastic changes.
@ketch ketch force-pushed the constants_and_indices branch 2 times, most recently from e2ecf93 to 5d7836a Compare August 26, 2014 14:01
@ketch
Copy link
Member Author

ketch commented Aug 26, 2014

Now it is passing (after I made the tests run from pyclaw/examples). I'd like to merge this (and use it in most of the PyClaw examples) if there are no objections.

@mandli
Copy link
Member

mandli commented Aug 26, 2014

Sounds good to me. I can merge.

mandli added a commit that referenced this pull request Aug 26, 2014
Document solver constants and indices, making values available in Python scripts
@mandli mandli merged commit 3517dea into clawpack:master Aug 26, 2014
@ketch ketch deleted the constants_and_indices branch November 5, 2014 12:24
mandli pushed a commit to mandli/riemann that referenced this pull request Mar 19, 2015
Add surge related data objects to default GeoClaw object
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.

None yet

2 participants