pyclaw icon indicating copy to clipboard operation
pyclaw copied to clipboard

Shouldn't need to manually set solver.kernel_language

Open ketch opened this issue 10 years ago • 1 comments

The solver kernel language could be automatically determined by inspecting the Riemann solver. Then the user wouldn't need to set it manually.

ketch avatar Nov 03 '13 02:11 ketch

One way to do this is

    if hasattr(self.rp,'__file__'):
        if os.path.splitext(self.rp.__file__)[1] == '.so':
            self.kernel_language = 'Fortran'
    else:
        self.kernel_language = 'Python'

However, to avoid duplicating code this needs to live in the base solver's setup() function, and the calls to super in the child class setup functions need to appear at the beginning. I'm not sure it's worth so much trouble.

ketch avatar Feb 03 '14 17:02 ketch