@@ -60,6 +60,7 @@ static long mcseed = 0; /* seed for random generator */
60
60
static long mcstartdate = 0 ; /* start simulation time */
61
61
static int mcdisable_output_files = 0 ; /* --no-output-files */
62
62
mcstatic int mcgravitation = 0 ; /* use gravitation flag, for PROP macros */
63
+ mcstatic int mcusedefaults = 0 ; /* assume default value for all parameters */
63
64
mcstatic int mcdotrace = 0 ; /* flag for --trace and messages for DISPLAY */
64
65
mcstatic int mcnexus_embed_idf = 0 ; /* flag to embed xml-formatted IDF file for Mantid */
65
66
#pragma acc declare create ( mcdotrace )
@@ -4432,6 +4433,7 @@ mchelp(char *pgmname)
4432
4433
" -h --help Show this help message.\n"
4433
4434
" -i --info Detailed instrument information.\n"
4434
4435
" --list-parameters Print the instrument parameters to standard out\n"
4436
+ " -y --yes Assume default values for all parameters with a default\n"
4435
4437
" --meta-list Print names of components which defined metadata\n"
4436
4438
" --meta-defined COMP[:NAME] Print component defined metadata names, or (0,1) if NAME provided\n"
4437
4439
" --meta-type COMP:NAME Print metadata format type specified in definition\n"
@@ -4720,6 +4722,10 @@ mcparseoptions(int argc, char *argv[])
4720
4722
mcgravitation = 1 ;
4721
4723
else if (!strcmp ("-g" , argv [i ]))
4722
4724
mcgravitation = 1 ;
4725
+ else if (!strcmp ("--yes" , argv [i ]))
4726
+ mcusedefaults = 1 ;
4727
+ else if (!strcmp ("-y" , argv [i ]))
4728
+ mcusedefaults = 1 ;
4723
4729
else if (!strncmp ("--format=" , argv [i ], 9 )) {
4724
4730
mcformat = & argv [i ][9 ];
4725
4731
}
@@ -4802,6 +4808,20 @@ mcparseoptions(int argc, char *argv[])
4802
4808
mcusage (argv [0 ]);
4803
4809
}
4804
4810
}
4811
+ if (mcusedefaults ) {
4812
+ MPI_MASTER (
4813
+ printf ("Using all default parameter values\n" );
4814
+ );
4815
+ for (j = 0 ; j < numipar ; j ++ ) {
4816
+ int status ;
4817
+ if (mcinputtable [j ].val && strlen (mcinputtable [j ].val )){
4818
+ status = (* mcinputtypes [mcinputtable [j ].type ].getparm )(mcinputtable [j ].val ,
4819
+ mcinputtable [j ].par );
4820
+ paramsetarray [j ] = 1 ;
4821
+ paramset = 1 ;
4822
+ }
4823
+ }
4824
+ }
4805
4825
if (!paramset )
4806
4826
mcreadparams (); /* Prompt for parameters if not specified. */
4807
4827
else
0 commit comments