New issue 46 by ajo...@strw.leidenuniv.nl: Add kinetic flow to own module
http://code.google.com/p/pencil-code/issues/detail?id=46
We may possibly need to move most of nohydro.f90 to something like
hydro_kinflow.f90 as a new alternate module.
(reported by e-mail by Wlad and Dhruba)
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
The email discussion
---------------------------------x-----------------------------------------
Ok, I see. But that's unorthodox... usually it is nomodule.f90 that
contains dummy routines of module.f90, not the contrary. The modularity is
broken here. If you are using nohydro for something hydro needs to
know about, then that thing should be elsewhere, perhaps even in
its own (new) module.
In any case, we should have a more standard way of dealing with
this subroutine. "I should not be called" is too inocuous. Perhaps
a header explaining the need for the subroutine. Maybe a call to
fatal_error if that routine is called? Or even just call hydro_clean_up
anyway, but have a keep_compiler_quiet there, as done for many dummy
routines.
Back to nohydro, it seems that it is used for time-independent flows, right?
Perhaps then we should have hydro.f90, hydro_simple.f90, and
nohydro.f90, in accordance with the Gravity module, that has
gravity_r.f90, gravity_simple.f90 and nogravity.f90. Then all this
time-independent flow (that is *NOT* actually nohydro) should go into
hydro_simple.f90
Cheers,
//Wlad
On Wed, 9 Sep 2009, Dhrubaditya MITRA wrote:
> Actually it should not be called :-)
> I am using some allocatable arrays in nohydro.
> These then needs to be deallocated.
> So in nohydro I have a deallocation routine called hydro_clean_up.
> And in run.f90 I use
> if(.not.hydro) call hydro_clean_up
> but when we compile with hydro the compiler may complain if I do not
> include
> a dummy hydro_clean_up in hydro.
> Hence the funny routine.
> with my best regards
> dhrubaditya
> -----------------------------------------------------------
> Dhrubaditya MITRA
> School of Mathematical Sciences
> Queen Mary College, University of London
> Mile End Road, London, E1 4NS
> -----------------------------------------------------------
> On Wed, Sep 9, 2009 at 5:58 PM, Wladimir Lyra<wl...@fysast.uu.se> wrote:
> >
> >
> > Hi Dhruba,
> >
> > I find the following subroutine amusing. :-) Why is it needed?
> >
> > Cheers,
> > //Wlad
> >
> >
> > subroutine hydro_clean_up
> > !
> > ! dummy routine
> > !
> > ! 8-sep-2009/dhruba: coded
> > !
> > print*, 'I should not be called. '
> > !
> > endsubroutine hydro_clean_up
Yes, it should not be considered a no-module, but a time-independent Hydro
module,
maybe even with its own namelist.