diff options
author | swhite <swhite@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-05-11 13:55:51 +0000 |
---|---|---|
committer | swhite <swhite@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-05-11 13:55:51 +0000 |
commit | 28bf70daab10b8a1926aad64c9cc08e4f17ee028 (patch) | |
tree | fb526c9f3c9c4063dfa34511b42dd49f170ad668 /src/main/flesh.cc | |
parent | cbdbf5e58ea01a80e3d355099aad1f2117d47863 (diff) |
Applying Erik's patch from 6.10.05
New command line option to stop after printing the schedule
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4293 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/flesh.cc')
-rw-r--r-- | src/main/flesh.cc | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/src/main/flesh.cc b/src/main/flesh.cc index 27c6cc09..6e839e3a 100644 --- a/src/main/flesh.cc +++ b/src/main/flesh.cc @@ -16,6 +16,7 @@ static const char *rcsid = "$Header$"; CCTK_FILEVERSION(main_flesh_cc); +extern "C" int cctki_onlyprintschedule; /*@@ @routine main @date Fri Sep 18 14:17:37 1998 @@ -56,25 +57,41 @@ int main(int argc, char **argv) { tFleshConfig ConfigData; + + /* Initialise any cactus specific stuff. */ CCTKi_InitialiseCactus(&argc, &argv, &ConfigData); - /* This is a (c-linkage) routine which has been registered by a thorn. + /* Abort if only the schedule tree should be printed. */ - CCTK_Initialise(&ConfigData); + if (cctki_onlyprintschedule) + { + printf ("--------------------------------------------------------------------------------\n"); + printf ("Stopping now because the option '-S' was given.\n"); + printf ("--------------------------------------------------------------------------------\n"); + printf ("Done.\n"); + } + else + { - /* This is a (c-linkage) routine which has been registered by a thorn. - */ - CCTK_Evolve(&ConfigData); + /* This is a (c-linkage) routine which has been registered by a thorn. + */ + CCTK_Initialise(&ConfigData); - /* This is a (c-linkage) routine which has been registered by a thorn. - */ - CCTK_Shutdown(&ConfigData); + /* This is a (c-linkage) routine which has been registered by a thorn. + */ + CCTK_Evolve(&ConfigData); - /* Shut down any cactus specific stuff. - */ - CCTKi_ShutdownCactus(&ConfigData); + /* This is a (c-linkage) routine which has been registered by a thorn. + */ + CCTK_Shutdown(&ConfigData); + + /* Shut down any cactus specific stuff. + */ + CCTKi_ShutdownCactus(&ConfigData); + + } return 0; } |