Skip to content
David Ketcheson edited this page Mar 19, 2015 · 1 revision
Status Active
Author David Ketcheson <dketch@gmail.com>
Created Nov. 4, 2014
Updated March 19, 2015
Discussion Riemann #89
Implementation

Note: see https://github.com/clawpack/clawpack/issues/3 and long discussion at https://groups.google.com/forum/?hl=en#!topic/claw-dev/7G67NxwzxsE.

Motivation

Modules have a number of generic advantages. Additionally, organizing Riemann solvers into modules will allow module data (things like num_waves, num_eqn, indices of fields, etc.) to belong to the Riemann solver . A user would not then need to specify these values in the problem definition; only the Riemann solver itself would need to be specified.

This requires giving the user control of main in the Fortran codes, so that a module can be selected there.

Specification

An example Riemann solver module would be defined as follows:

module rp1_acoustics
    
     implicit none

    real(kind=8) :: rho, bulk
    integer, parameter :: num_eqn = 2
    integer, parameter :: num_waves = 2
    integer, parameter :: ipressure = 1, ivelocity = 2

...

end module rp1_acoustics

Questions

  • Should normal and transverse Riemann solvers be put together in a single module?

Backward compatibility