Closed certik closed 11 years ago
I agree on explicit interfaces, just had not gotten a chance to stick them somewhere it makes sense. One issue is that a user needs to override some of these functions (before_step
for instance) and sticking this into a module is janky. Really need to just have an interface defined for all possibly user overridden code and have function pointers available. This is perhaps not ideal though as f2py does not do interface blocks.
The CMake build system is not needed as the Makefile.common
referenced is in the CLAWUtil
repository.
Ok. I am closing this PR, as all the fixes are in and I'll open a new PRs with any other improvements.
The provided Makefile does not work for me:
so this PR implements a CMake build system. Now it builds, thought here are lots of warnings and errors. This PR fixes all errors, so that sources compile. The warnings are:
Some of them seem to reveal real problems in the code, for example the
self%limiters = clawdata%limiters
one. The fact that the code uses implicit interface is very bad, because the compiler can't check the types. This should not be used in modern Fortran. The solution is to at least provide an interface block and import this block, or (better) move all global subroutines into modules and import the modules.When I try to run the test:
It fails due to missing input file.
Another problem is that the
main.f90
file is referencingcontroller_module.f90
which is not in the repository, so i had to comment it out, together withrun_simulation()
which I assume is declared in it.@mandli, could you please review this?