#include "site-stuff.h" #include #include #if NEWCC #include #else #include #endif #include "param.h" #include "MHD.h" #include "mhd_params.h" #ifdef LC_UNSC #define TEST_PPP test_ppp_ #define FCOURANT fcourant_ #elif LC_NOUNSC #define TEST_PPP test_ppp #define FCOURANT fcourant #endif #include "help.h" /// "help" common block defined in help.inc; help struct defined in help.h extern HELPER HELP; /* FIXME: We never use "TEST_PPP", so why is it defined here?? */ /// Defined in test-arrays.F extern "C" void TEST_PPP(FLoaT *); /// Defined in fcourant.F extern "C" void FCOURANT(FLoaT *); /// courant /** * Compute the courant number * * @returns ctime, the Courant number. */ float MHD::courant() { #ifdef DEBUG_MODE_ON printf("DEBUG: process(%d) in Courant.C::MHD::courant()\n", RTIME.local_proc); #endif #ifdef DEBUG printf("in Courant &&&&&&&&&&&&& \n"); fflush(stdout); #endif Range MHD_range(0,NUMBER_OF_MHD-1); Partitioning_Type MHD_part(MHD_range); FloatARRAY LocalCtime(NUMBER_OF_MHD,MHD_part); FCOURANT(LocalCtime.getDataPointer()); float Ctime = min( LocalCtime ); Ctime *= CRNT; return Ctime; }