150 struct option longopts[] = {
151 {
"in", required_argument, 0, 1},
152 {
"out", required_argument, 0, 2},
153 {
"mpi_size", required_argument, 0, 3},
154 {
"mpi_rank", required_argument, 0, 4},
155 {
"d", required_argument, 0, 5},
156 {
"bfield", required_argument, 0, 6},
157 {
"wall", required_argument, 0, 7},
158 {
"plasma", required_argument, 0, 8},
159 {
"nbi", required_argument, 0, 9},
160 {
"n", required_argument, 0, 10},
161 {
"t1", required_argument, 0, 11},
162 {
"t2", required_argument, 0, 12},
190 while((c = getopt_long(argc, argv,
"", longopts, NULL)) != -1) {
195 slen = strlen(optarg);
196 if ( slen > 3 && !strcmp(optarg+slen-3,
".h5") ) {
207 slen = strlen(optarg);
208 if ( slen > 3 && !strcmp(optarg+slen-3,
".h5") ) {
238 *nprt = atoi(optarg);
249 "\nUnrecognized argument. The valid arguments are:\n");
251 "--in input file (default: ascot.h5)\n");
253 "--out output file (default: same as input)\n");
255 "--mpi_size number of independent processes\n");
257 "--mpi_rank rank of independent process\n");
259 "--d run description maximum of 250 characters\n");
261 "--n number of markers to generate (default: 10000)\n");
263 "--t1 time when injectors are turned on (default: 0.0 s)\n");
265 "--t2 time when injectors are turned off (default: 0.0 s)\n");
275 strcpy(sim->
hdf5_in,
"ascot.h5");
280 strcpy(sim->
hdf5_in,
"ascot.h5");
int bbnbi_read_arguments(int argc, char **argv, sim_data *sim, int *nprt, real *t1, real *t2)
Read command line arguments.
int main(int argc, char **argv)
Main function for BBNBI5.
int hdf5_interface_read_input(sim_data *sim, int input_active, input_particle **p, int *n_markers)
Read and initialize input data.
Header file for particle.c.
#define print_out0(v, rank, root,...)
Print to standard output only for root process.
General representation of a marker.