247 RP::add(
"io.diagnostic_write_interval",
"Write diagnostic output every arg time steps", numeric_limits<uint>::max());
250 "io.system_write_t_interval",
251 "Save the simulation every arg simulated seconds. Negative values disable writes. [Define for all groups.]");
252 RP::addComposing(
"io.system_write_file_name",
253 "Save the simulation to this file name series. [Define for all groups.]");
254 RP::addComposing(
"io.system_write_path",
255 "Save this series in this location. Default is ./ [Define for all groups or none.]");
256 RP::addComposing(
"io.system_write_distribution_stride",
257 "Every this many cells write out their velocity space. 0 is none. [Define for all groups.]");
258 RP::addComposing(
"io.system_write_distribution_xline_stride",
259 "Every this many lines of cells along the x direction write out their velocity space. 0 is none. "
260 "[Define for all groups.]");
261 RP::addComposing(
"io.system_write_distribution_yline_stride",
262 "Every this many lines of cells along the y direction write out their velocity space. 0 is none. "
263 "[Define for all groups.]");
264 RP::addComposing(
"io.system_write_distribution_zline_stride",
265 "Every this many lines of cells along the z direction write out their velocity space. 0 is none. "
266 "[Define for all groups.]");
267 RP::addComposing(
"io.system_write_distribution_shell_radius",
268 "At cells intersecting spheres with those radii centred at the origin write out their velocity "
269 "space. 0 is none.");
270 RP::addComposing(
"io.system_write_distribution_shell_stride",
271 "Every this many cells for those on selected shells write out their velocity space. 0 is none.");
272 RP::addComposing(
"io.system_write_fsgrid_variables",
"If 0 don't write fsgrid DROs, if 1 do write them.");
274 "io.system_write_mpiio_hint_key",
275 "MPI-IO hint key passed to the non-restart IO. Has to be matched by io.system_write_mpiio_hint_value.");
277 "io.system_write_mpiio_hint_value",
278 "MPI-IO hint value passed to the non-restart IO. Has to be matched by io.system_write_mpiio_hint_key.");
280 "io.restart_write_mpiio_hint_key",
281 "MPI-IO hint key passed to the restart IO. Has to be matched by io.restart_write_mpiio_hint_value.");
283 "io.restart_write_mpiio_hint_value",
284 "MPI-IO hint value passed to the restart IO. Has to be matched by io.restart_write_mpiio_hint_key.");
286 "io.restart_read_mpiio_hint_key",
287 "MPI-IO hint key passed to the restart IO. Has to be matched by io.restart_read_mpiio_hint_value.");
289 "io.restart_read_mpiio_hint_value",
290 "MPI-IO hint value passed to the restart IO. Has to be matched by io.restart_read_mpiio_hint_key.");
292 RP::add(
"io.write_initial_state",
293 "Write initial state, not even the 0.5 dt propagation is done. Do not use for restarting. ",
false);
295 RP::add(
"io.write_full_bgb_data",
"Write a dedicated file containing all BGB components and first derivatives, then exit.",
false);
297 RP::add(
"io.restart_walltime_interval",
298 "Save the complete simulation in given walltime intervals. Negative values disable writes.", -1.0);
299 RP::add(
"io.number_of_restarts",
"Exit the simulation after certain number of walltime-based restarts.",
300 numeric_limits<uint>::max());
301 RP::add(
"io.recover_tstep_interval",
302 "Save the complete simulation in given tstep intervals. 0 disables writes.", 0);
303 RP::add(
"io.number_of_recovers",
"Overwrite recovers cyclically after this number of recovers written.", 2);
304 RP::add(
"io.vlsv_buffer_size",
305 "Buffer size passed to VLSV writer (bytes, up to uint64_t), default 0 as this is sensible on sisu", 0);
306 RP::add(
"io.write_restart_stripe_factor",
"Stripe factor for restart and initial grid writing. Default 0 to inherit.", 0);
307 RP::add(
"io.write_system_stripe_factor",
"Stripe factor for bulk file writing. Default 0 to inherit.", 0);
308 RP::add(
"io.write_as_float",
"If true, write in floats instead of doubles",
false);
309 RP::add(
"io.restart_write_path",
310 "Path to the location where restart files should be written. Defaults to the local directory, also if the "
311 "specified destination is not writeable.",
313 RP::add(
"io.recover_write_path",
314 "Path to the location where recover files should be written. Defaults to the local directory, also if the "
315 "specified destination is not writeable.",
318 RP::add(
"propagate_field",
"Propagate magnetic field during the simulation",
true);
319 RP::add(
"propagate_vlasov_acceleration",
320 "Propagate distribution functions during the simulation in velocity space. If false, it is propagated with "
321 "zero length timesteps.",
323 RP::add(
"propagate_vlasov_translation",
324 "Propagate distribution functions during the simulation in ordinary space. If false, it is propagated with "
325 "zero length timesteps.",
327 RP::add(
"dynamic_timestep",
"If true, timestep is set based on CFL limits (default on)",
true);
328 RP::add(
"hallMinimumRho",
329 "Minimum rho value used for the Hall and electron pressure gradient terms in the Lorentz force and in the "
330 "field solver. Default is very low and has no effect in practice.",
333 "Specify the name of the project to use. Supported to date (20150610): Alfven Diffusion Dispersion "
334 "Distributions Firehose Flowthrough Fluctuations Harris KHB Larmor Magnetosphere Multipeak Riemann1 Shock "
335 "Shocktest Template test_fp testHall test_trans verificationLarmor",
338 RP::add(
"restart.write_as_float",
"If true, write restart fields in floats instead of doubles",
false);
339 RP::add(
"restart.filename",
"Restart from this vlsv file. No restart if empty file.",
string(
""));
342 "restart.overrideReadFsGridDecompositionX",
343 "Manual FsGridDecomposition for field solver grid stored in a restart file.", 0);
345 "restart.overrideReadFsGridDecompositionY",
346 "Manual FsGridDecomposition for field solver grid stored in a restart file.", 0);
348 "restart.overrideReadFsGridDecompositionZ",
349 "Manual FsGridDecomposition for field solver grid stored in a restart file.", 0);
351 RP::add(
"gridbuilder.x_min",
"Minimum value of the x-coordinate.",
NAN);
352 RP::add(
"gridbuilder.x_max",
"Maximum value of the x-coordinate.",
NAN);
353 RP::add(
"gridbuilder.y_min",
"Minimum value of the y-coordinate.",
NAN);
354 RP::add(
"gridbuilder.y_max",
"Maximum value of the y-coordinate.",
NAN);
355 RP::add(
"gridbuilder.z_min",
"Minimum value of the z-coordinate.",
NAN);
356 RP::add(
"gridbuilder.z_max",
"Maximum value of the z-coordinate.",
NAN);
357 RP::add(
"gridbuilder.x_length",
"Number of cells in x-direction in initial grid.", 0);
358 RP::add(
"gridbuilder.y_length",
"Number of cells in y-direction in initial grid.", 0);
359 RP::add(
"gridbuilder.z_length",
"Number of cells in z-direction in initial grid.", 0);
361 RP::add(
"gridbuilder.dt",
"Initial timestep in seconds.", 0.0);
363 RP::add(
"gridbuilder.t_max",
364 "Maximum simulation time, in seconds. If timestep_max limit is hit first this time will never be reached",
366 RP::add(
"gridbuilder.timestep_max",
367 "Max. value for timesteps. If t_max limit is hit first, this step will never be reached",
368 numeric_limits<uint>::max());
369 RP::add(
"gridbuilder.dt_ceil",
370 "Maximum simulation dt in seconds.",
374 RP::add(
"fieldsolver.maxWaveVelocity",
375 "Maximum wave velocity allowed in the fastest velocity determination in m/s, default unlimited",
LARGE_REAL);
376 RP::add(
"fieldsolver.maxSubcycles",
"Maximum allowed field solver subcycles", 1);
377 RP::add(
"fieldsolver.resistivity",
"Resistivity for the eta*J term in Ohm's law.", 0.0);
378 RP::add(
"fieldsolver.diffusiveEterms",
"Enable diffusive terms in the computation of E",
true);
379 RP::add(
"fieldsolver.finiteDifferencingAtBoundaries",
"Enable finite differencing at sysboundaries",
false);
381 "fieldsolver.ohmHallTerm",
382 "Enable/choose spatial order of the Hall term in Ohm's law. 0: off, 1: 1st spatial order, 2: 2nd spatial order",
385 "fieldsolver.ohmGradPeTerm",
386 "Enable/choose spatial order of the electron pressure gradient term in Ohm's law. 0: off, 1: 1st spatial order.",
388 RP::add(
"fieldsolver.electronTemperature",
389 "Upstream (anchor point) electron temperature to be used for the electron pressure gradient term (K).", 0.0);
390 RP::add(
"fieldsolver.electronDensity",
391 "Upstream (anchor point) electron density to be used for the electron pressure gradient term (m^-3).", 0.0);
392 RP::add(
"fieldsolver.electronPTindex",
393 "Polytropic index for the equation of state to solve the electron pressure gradient term. 0 is isobaric, 1 is isothermal, 1.667 is adiabatic "
396 RP::add(
"fieldsolver.maxCFL",
397 "The maximum CFL limit for field propagation. Used to set timestep if dynamic_timestep is true.", 0.5);
398 RP::add(
"fieldsolver.minCFL",
399 "The minimum CFL limit for field propagation. Used to set timestep if dynamic_timestep is true.", 0.4);
402 "fieldsolver.manualFsGridDecompositionX",
403 "Manual FsGridDecomposition for field solver grid.", 0);
405 "fieldsolver.manualFsGridDecompositionY",
406 "Manual FsGridDecomposition for field solver grid.", 0);
408 "fieldsolver.manualFsGridDecompositionZ",
409 "Manual FsGridDecomposition for field solver grid.", 0);
413 RP::add(
"vlasovsolver.maxSlAccelerationRotation",
414 "Maximum rotation angle (degrees) allowed by the Semi-Lagrangian solver (Use >25 values with care)", 25.0);
415 RP::add(
"vlasovsolver.maxSlAccelerationSubcycles",
"Maximum number of subcycles for acceleration", 1);
416 RP::add(
"vlasovsolver.maxCFL",
417 "The maximum CFL limit for vlasov propagation in ordinary space. Used to set timestep if dynamic_timestep "
420 RP::add(
"vlasovsolver.minCFL",
421 "The minimum CFL limit for vlasov propagation in ordinary space. Used to set timestep if dynamic_timestep "
424 RP::add(
"vlasovsolver.accelerateMaxwellianBoundaries",
425 "Propagate maxwellian boundary cell contents in velocity space. Default false.",
427 RP::add(
"vlasovsolver.GhostTranslate",
"Boolean for activating all-local ghost translation",
false);
428 RP::add(
"vlasovsolver.GhostTranslateExtent",
"Stencil size in all-local ghost translation (default: VLASOV_STENCIL_WIDTH+1",0);
431 RP::add(
"loadBalance.algorithm",
"Load balancing algorithm to be used",
string(
"RCB"));
432 RP::add(
"loadBalance.tolerance",
"Load imbalance tolerance",
string(
"1.05"));
433 RP::add(
"loadBalance.rebalanceInterval",
"Load rebalance interval (steps)", 10);
435 RP::addComposing(
"loadBalance.optionKey",
"Zoltan option key. Has to be matched by loadBalance.optionValue.");
436 RP::addComposing(
"loadBalance.optionValue",
"Zoltan option value. Has to be matched by loadBalance.optionKey.");
439 RP::add(
"io.system_write_all_data_reducers",
"If 0 don't write all DROs, if 1 do write them.",
false);
440 RP::add(
"io.system_write_distribution_compressed",
string(
"Apply ASTERIX compressiont to VDFs in bulk files."),
false);
441 RP::add(
"io.system_write_restart_compressed",
string(
"Apply ASTERIX compressiont to VDFs in restart files."),
false);
442 RP::add(
"io.system_write_recovery_compressed",
string(
"Apply ASTERIX compressiont to VDFs in recovery files."),
false);
444 RP::addComposing(
"variables.output",
446 "List of data reduction operators (DROs) to add to the grid file output. Each variable to be "
447 "added has to be on a new line output = XXX. Names are case insensitive. " +
448 "Available (20250413): " +
"fg_b fg_b_background fg_b_perturbed fg_b_background_vol fg_derivs_b_background fg_e " +
449 "vg_rhom vg_rhoq populations_vg_rho " +
"fg_rhom fg_rhoq " +
"vg_v fg_v populations_vg_v " +
450 "populations_vg_moments_thermal populations_vg_moments_nonthermal " +
451 "populations_vg_effectivesparsitythreshold populations_vg_rho_loss_adjust " +
452 "populations_vg_energydensity populations_vg_precipitationdifferentialflux " +
453 "populations_vg_heatflux " +
"populations_vg_1dmuspace " +
454 "populations_vg_nonmaxwellianity " +
455 "vg_maxdt_acceleration vg_maxdt_translation populations_vg_maxdt_acceleration " +
456 "populations_vg_maxdt_translation " +
457 "fg_maxdt_fieldsolver " +
"vg_rank fg_rank fg_amr_level vg_loadbalance_weight " +
458 "vg_boundarytype fg_boundarytype vg_boundarylayer fg_boundarylayer " +
459 "populations_vg_blocks vg_f_saved " +
"populations_vg_acceleration_subcycles " +
460 "vg_e_vol fg_e_vol " +
461 "fg_e_hall vg_e_gradpe fg_b_vol vg_b_vol vg_b_background_vol vg_b_perturbed_vol " +
462 "vg_pressure fg_pressure populations_vg_ptensor " +
"vg_b_vol_derivatives fg_derivs " +
463 "ig_fac ig_latitude ig_chi0 ig_cellarea ig_upmappedarea ig_sigmap ig_sigmah ig_sigmaparallel ig_rhon " +
464 "ig_electrontemp ig_solverinternals ig_upmappednodecoords ig_upmappedb ig_openclosed ig_potential "+
465 "ig_precipitation ig_deltaphi "+
466 "ig_inplanecurrent ig_b ig_e vg_drift vg_ionospherecoupling vg_connection vg_fluxrope fg_curvature "+
467 "vg_amr_drho vg_amr_du vg_amr_dpsq vg_amr_dbsq vg_amr_db vg_amr_alpha1 vg_amr_reflevel vg_amr_alpha2 "+
468 "vg_gridcoordinates fg_gridcoordinates vg_pressure_anisotropy vg_amr_vorticity");
471 "variables_deprecated.output",
472 string() +
"List of deprecated names for data reduction operators (DROs). Names are case insensitive. " +
473 "Available (20250413): " +
"B BackgroundB fg_BackgroundB PerturbedB fg_PerturbedB " +
"E " +
474 "Rhom Rhoq populations_Rho " +
"V populations_V " +
475 "populations_moments_Backstream populations_moments_NonBackstream " +
476 "populations_moments_thermal populations_moments_nonthermal " +
477 "populations_minvalue populations_EffectiveSparsityThreshold populations_RhoLossAdjust "
478 "populations_rho_loss_adjust populations_1dmuspace " +
479 "populations_EnergyDensity populations_PrecipitationFlux populations_precipitationdifferentialflux" +
480 "LBweight vg_lbweight vg_loadbalanceweight MaxVdt MaxRdt populations_MaxVdt populations_MaxRdt " +
481 "populations_maxdt_acceleration populations_maxdt_translation MaxFieldsdt fg_maxfieldsdt" +
482 "MPIrank FsGridRank " +
"FsGridBoundaryType BoundaryType FsGridBoundaryLayer BoundaryLayer " +
483 "populations_Blocks fSaved vg_fsaved" +
"populations_accSubcycles populations_acceleration_subcycles" +
484 "VolE vg_VolE Evol E_vol fg_VolE fg_Evol " +
485 "HallE fg_HallE GradPeE e_gradpe VolB vg_VolB fg_VolB B_vol Bvol vg_Bvol fg_volB fg_Bvol " +
486 "BackgroundVolB PerturbedVolB " +
"Pressure vg_Pressure fg_Pressure populations_PTensor " +
487 "BVOLderivs b_vol_derivs");
489 RP::add(
"io.diagnostic_write_all_data_reducers",
"Write all available diagnostic reducers",
false);
491 RP::addComposing(
"variables.diagnostic",
493 "List of data reduction operators (DROs) to add to the diagnostic runtime output. Each "
494 "variable to be added has to be on a new line diagnostic = XXX. Names are case insensitive. " +
495 "Available (20250130): " +
"populations_vg_blocks " +
496 "vg_rhom populations_vg_rho_loss_adjust " +
"vg_loadbalance_weight " +
497 "vg_maxdt_acceleration vg_maxdt_translation " +
"fg_maxdt_fieldsolver " +
498 "populations_vg_maxdt_acceleration populations_vg_maxdt_translation ");
500 RP::addComposing(
"variables_deprecated.diagnostic",
502 "List of deprecated data reduction operators (DROs) to add to the diagnostic runtime output. "
503 "Names are case insensitive. " +
504 "Available (20250130): " +
"rhom populations_rholossadjust populations_rho_loss_adjust " +
505 "populations_blocks lbweight loadbalance_weight " +
"vg_lbweight vg_loadbalanceweight " +
506 "maxvdt maxdt_acceleration " +
"maxrdt maxdt_translation " +
507 "populations_maxvdt populations_maxrdt " +
508 "populations_maxdt_acceleration populations_maxdt_translation " +
509 "maxfieldsdt maxdt_fieldsolver fg_maxfieldsdt");
512 RP::add(
"bailout.write_restart",
513 "If 1, write a restart file on bailout. Gets reset when sending a STOP (1) or a KILL (0).",
true);
514 RP::add(
"bailout.min_dt",
"Minimum time step below which bailout occurs (s).", 1e-6);
515 RP::add(
"bailout.max_memory",
"Maximum amount of memory used per node (in GiB) over which bailout occurs.",
517 RP::add(
"bailout.velocity_space_wall_block_margin",
"Distance from the velocity space limits in blocks, if the distribution function reaches that distance from the wall we bail out to avoid hitting the wall.", 1);
520 RP::add(
"AMR.max_spatial_level",
"Maximum absolute spatial mesh refinement level", (uint)0);
521 RP::add(
"AMR.max_allowed_spatial_level",
"Maximum currently allowed spatial mesh refinement level", -1);
522 RP::add(
"AMR.should_refine",
"If false, do not refine Vlasov grid regardless of max spatial level",
true);
523 RP::add(
"AMR.adapt_refinement",
"If true, re-refine vlasov grid every refine_cadence balance",
false);
524 RP::add(
"AMR.refine_on_restart",
"If true, re-refine vlasov grid on restart. DEPRECATED, consider using the DOMR command",
false);
525 RP::add(
"AMR.force_refinement",
"If true, refine/unrefine the vlasov grid to match the config on restart",
false);
526 RP::add(
"AMR.should_filter",
"If true, filter vlasov grid with boxcar filter on restart",
false);
527 RP::add(
"AMR.use_alpha1",
"Use the maximum of dimensionless gradients alpha_1 as a refinement index",
true);
528 RP::add(
"AMR.alpha1_refine_threshold",
"Determines the minimum value of alpha_1 to refine cells", 0.5);
529 RP::add(
"AMR.alpha1_coarsen_threshold",
"Determines the maximum value of alpha_1 to unrefine cells, default half of the refine threshold", -1.0);
530 RP::add(
"AMR.use_alpha2",
"Use J/B_perp as a refinement index",
true);
531 RP::add(
"AMR.alpha2_refine_threshold",
"Determines the minimum value of alpha_2 to refine cells", 0.5);
532 RP::add(
"AMR.alpha2_coarsen_threshold",
"Determines the maximum value of alpha_2 to unrefine cells, default half of the refine threshold", -1.0);
533 RP::add(
"AMR.use_vorticity",
"Use vorticity as a refinement index",
false);
534 RP::add(
"AMR.vorticity_refine_threshold",
"Determines the minimum value of vorticity to refine cells", 0.5);
535 RP::add(
"AMR.vorticity_coarsen_threshold",
"Determines the maximum value of vorticity to unrefine cells, default half of the refine threshold", -1.0);
536 RP::add(
"AMR.use_anisotropy",
"Use pressure anisotropy as a refinement index",
false);
537 RP::add(
"AMR.anisotropy_refine_threshold",
"Determines the maximum value of pressure anisotropy to refine cells", 0.5);
538 RP::add(
"AMR.anisotropy_coarsen_threshold",
"Determines the minimum value of pressure anisotropy to unrefine cells, default twice the refine threshold", -1.0);
539 RP::add(
"AMR.anisotropy_max_reflevel",
"When anisotropy is below the refine threshold, defines the maximum level to refine to", 2);
540 RP::add(
"AMR.refine_cadence",
"Refine every nth load balance", 5);
541 RP::add(
"AMR.refine_after",
"Start refinement after this many simulation seconds", 0.0);
542 RP::add(
"AMR.refine_radius",
"Maximum distance from origin to allow refinement within. Only induced refinement allowed outside this radius.",
LARGE_REAL);
543 RP::add(
"AMR.number_of_refine_boxes",
"How many boxes outside which to suppress refinement, that number of box edges have to then be defined as well. If more than 1 box is defined, refinement is suppressed outside the union of the volumes of all boxes.", 0);
544 RP::addComposing(
"AMR.refinement_min_x",
"Refinement minimum X coordinate, no refinement at x < this value (m) except induced refinement.");
545 RP::addComposing(
"AMR.refinement_min_y",
"Refinement minimum Y coordinate, no refinement at y < this value (m) except induced refinement.");
546 RP::addComposing(
"AMR.refinement_min_z",
"Refinement minimum Z coordinate, no refinement at z < this value (m) except induced refinement.");
547 RP::addComposing(
"AMR.refinement_max_x",
"Refinement maximum X coordinate, no refinement at x > this value (m) except induced refinement.");
548 RP::addComposing(
"AMR.refinement_max_y",
"Refinement maximum Y coordinate, no refinement at y > this value (m) except induced refinement.");
549 RP::addComposing(
"AMR.refinement_max_z",
"Refinement maximum Z coordinate, no refinement at z > this value (m) except induced refinement.");
550 RP::add(
"AMR.alpha1_drho_weight",
"Multiplier for delta rho (plasma density) in alpha calculation", 1.0);
551 RP::add(
"AMR.alpha1_du_weight",
"Multiplier for delta U (total kinetic + field energy density) in alpha calculation", 1.0);
552 RP::add(
"AMR.alpha1_dpsq_weight",
"Multiplier for delta p squared (kinetic energy) in alpha calculation", 1.0);
553 RP::add(
"AMR.alpha1_dbsq_weight",
"Multiplier for delta B squared (field energy) in alpha calculation", 1.0);
554 RP::add(
"AMR.alpha1_db_weight",
"Multiplier for delta B (magnetic field strength) in alpha calculation", 1.0);
555 RP::add(
"AMR.number_of_boxes",
"How many boxes to be refined, that number of centers and sizes have to then be defined as well.", 0);
556 RP::addComposing(
"AMR.box_half_width_x",
"Half width in x of the box that is refined");
557 RP::addComposing(
"AMR.box_half_width_y",
"Half width in y of the box that is refined");
558 RP::addComposing(
"AMR.box_half_width_z",
"Half width in z of the box that is refined");
559 RP::addComposing(
"AMR.box_center_x",
"x coordinate of the center of the box that is refined");
560 RP::addComposing(
"AMR.box_center_y",
"y coordinate of the center of the box that is refined");
561 RP::addComposing(
"AMR.box_center_z",
"z coordinate of the center of the box that is refined");
562 RP::addComposing(
"AMR.box_max_level",
"max refinement level of the box that is refined");
563 RP::add(
"AMR.transShortPencils",
"if true, use one-cell pencils",
false);
564 RP::addComposing(
"AMR.filterpasses",
string(
"AMR filter passes for each individual refinement level"));
565 RP::add(
"adaptGPUWID",
"if true, will halve velocity block counts if GPU is in use and WID==8",
true);
566 RP::add(
"GPUallocations",
"How many parallel GPU vlasov allocations to make? (default 128)", 128);
569 RP::add(
"PAD.enable",
"Enable Artificial pitch-angle diffusion",0);
570 RP::add(
"PAD.coefficient",
"Set artificial pitch-angle diffusion coefficient (overriding .DAT file)",-1);
571 RP::add(
"PAD.CFL",
"Set CFL condition",0.1);
572 RP::add(
"PAD.vbins",
"number of bins for velocity",200);
573 RP::add(
"PAD.mubins",
"number of bins for mu",30);
574 RP::add(
"PAD.file",
"Path of txt file for nu0",
string(
"NU0BOX.DAT"));
575 RP::add(
"PAD.fudge",
"Divide diffusion coefficient nu0 (read from file) by a fudge factor (see Dubart et al 2023)",4);
578 RP::add(
"fieldtracing.fieldLineTracer",
"Field line tracing method to use for coupling ionosphere and magnetosphere (options are: Euler, BS)", std::string(
"Euler"));
579 RP::add(
"fieldtracing.tracer_max_allowed_error",
"Maximum allowed error for the adaptive field line tracers ", 1000);
580 RP::add(
"fieldtracing.tracer_max_attempts",
"Maximum allowed attempts for the adaptive field line tracers", 100);
581 RP::add(
"fieldtracing.tracer_min_dx",
"Minimum allowed field line tracer step length for the adaptive field line tracers (m)", 100e3);
582 RP::add(
"fieldtracing.fullbox_and_fluxrope_max_absolute_distance_to_trace",
"Maximum absolute distance in m to trace along the field line before ending. Defaults to the sum of the simulation box edge lengths LX+LY+LZ if set <= 0.", -1);
583 RP::add(
"fieldtracing.fullbox_max_incomplete_cells",
"Maximum fraction of cells left incomplete when stopping tracing loop for full box tracing. Defaults to zero to process all, will be slow at scale! Both fluxrope_max_incomplete_cells and fullbox_max_incomplete_cells will be achieved.", 0);
584 RP::add(
"fieldtracing.fluxrope_max_incomplete_cells",
"Maximum fraction of cells left incomplete when stopping loop for flux rope tracing. Defaults to zero to process all, will be slow at scale! Both fluxrope_max_incomplete_cells and fullbox_max_incomplete_cells will be achieved.", 0);
585 RP::add(
"fieldtracing.use_reconstruction_cache",
"Use the cache to store reconstruction coefficients. (0: don't, 1: use)", 0);
586 RP::add(
"fieldtracing.fluxrope_max_curvature_radii_to_trace",
"Maximum number of seedpoint curvature radii to trace forward and backward from each DCCRG cell to find flux ropes", 10);
587 RP::add(
"fieldtracing.fluxrope_max_curvature_radii_extent",
"Maximum extent in seedpoint curvature radii from the seed a field line is allowed to extend to be counted as a flux rope", 2);
588 RP::add(
"fieldtracing.min_allowed_x",
"Trace for x coordinates larger than this limit (in m).", -
LARGE_REAL);
589 RP::add(
"fieldtracing.min_allowed_y",
"Trace for y coordinates larger than this limit (in m).", -
LARGE_REAL);
590 RP::add(
"fieldtracing.min_allowed_z",
"Trace for z coordinates larger than this limit (in m).", -
LARGE_REAL);
591 RP::add(
"fieldtracing.max_allowed_x",
"Trace for x coordinates smaller than this limit (in m).",
LARGE_REAL);
592 RP::add(
"fieldtracing.max_allowed_y",
"Trace for y coordinates smaller than this limit (in m).",
LARGE_REAL);
593 RP::add(
"fieldtracing.max_allowed_z",
"Trace for z coordinates smaller than this limit (in m).",
LARGE_REAL);
596 RP::add(
"Asterix.mlp_layers",
string(
"Hidden layer architecture (neuron count per hidden layer) for MLP"),
"32,32,32");
597 RP::add(
"Asterix.tol",
string(
"MLP Compression reconstruction tolerance"),1e-4);
598 RP::add(
"Asterix.octree_tolerance",
string(
"OCTREE Compression reconstruction tolerance"),1e-3);
599 RP::add(
"Asterix.max_epochs",
string(
"Max MLP epochs"),50);
600 RP::add(
"Asterix.fourier_order",
string(
"Fourier Feature Order"),32);
601 RP::add(
"Asterix.interval",
string(
"Compression interval in seconds [Deprecated]"),1.0);
602 RP::add(
"Asterix.state",
string(
"Boolean Asterix compression toggle"),
false);
603 RP::add(
"Asterix.method",
string(
"Compression method string"),
"ZFP");
604 RP::add(
"Asterix.max_vdfs_per_nn",
string(
"Max vdfs per MLP in multi regression mode") ,std::numeric_limits<std::size_t>::max());
642 MPI_Comm_rank(MPI_COMM_WORLD, &
myRank);
643 const string prefix = string(
"./");
646 cerr <<
"ERROR restart write path " <<
P::restartWritePath <<
" not writeable, defaulting to local directory."
653 cerr <<
"ERROR recover write path " <<
P::recoverWritePath <<
" not writeable, defaulting to local directory."
671 cerr <<
"ERROR io.system_write_t_interval should be defined for all file types." << endl;
672 MPI_Abort(MPI_COMM_WORLD, 1);
677 cerr <<
"ERROR io.system_write_file_name should be defined for all file types." << endl;
678 MPI_Abort(MPI_COMM_WORLD, 1);
683 cerr <<
"ERROR io.system_write_path should be defined for all file types or none at all." << endl;
684 MPI_Abort(MPI_COMM_WORLD, 1);
689 cerr <<
"ERROR io.system_write_distribution_stride should be defined for all file types." << endl;
690 MPI_Abort(MPI_COMM_WORLD, 1);
695 cerr <<
"ERROR io.system_write_distribution_xline_stride should be defined for all file types." << endl;
696 MPI_Abort(MPI_COMM_WORLD, 1);
701 cerr <<
"ERROR io.system_write_distribution_yline_stride should be defined for all file types." << endl;
702 MPI_Abort(MPI_COMM_WORLD, 1);
707 cerr <<
"ERROR io.system_write_distribution_zline_stride should be defined for all file types." << endl;
708 MPI_Abort(MPI_COMM_WORLD, 1);
713 cerr <<
"ERROR You should set the same number of io.system_write_distribution_shell_stride "
714 <<
"and io.system_write_distribution_shell_radius." << endl;
715 MPI_Abort(MPI_COMM_WORLD, 1);
720 for (uint
i = 0;
i < maxSize;
i++) {
725 cerr <<
"ERROR io.system_write_fsgrid_variables should be defined for all file types (or none at all)." << endl;
726 MPI_Abort(MPI_COMM_WORLD, 1);
735 bool includefSaved =
false;
736 for(uint
i=0;
i<maxSize;
i++) {
741 includefSaved =
true;
746 includefSaved =
true;
754 while (slashIndx!=string::npos) {
765 <<
" not writeable. Please create them and remember the correct striping if in HPC environment." << endl;
767 MPI_Abort(MPI_COMM_WORLD, 1);
774 vector<string> mpiioKeys, mpiioValues;
775 RP::get(
"io.system_write_mpiio_hint_key", mpiioKeys);
776 RP::get(
"io.system_write_mpiio_hint_value", mpiioValues);
778 if (mpiioKeys.size() != mpiioValues.size()) {
780 cerr <<
"WARNING the number of io.system_write_mpiio_hint_key and io.system_write_mpiio_hint_value do not "
781 "match. Disregarding these options."
785 for (uint
i = 0;
i < mpiioKeys.size();
i++) {
792 RP::get(
"io.restart_write_mpiio_hint_key", mpiioKeys);
793 RP::get(
"io.restart_write_mpiio_hint_value", mpiioValues);
795 if (mpiioKeys.size() != mpiioValues.size()) {
797 cerr <<
"WARNING the number of io.restart_write_mpiio_hint_key and io.restart_write_mpiio_hint_value do not "
798 "match. Disregarding these options."
802 for (uint
i = 0;
i < mpiioKeys.size();
i++) {
809 RP::get(
"io.restart_read_mpiio_hint_key", mpiioKeys);
810 RP::get(
"io.restart_read_mpiio_hint_value", mpiioValues);
812 if (mpiioKeys.size() != mpiioValues.size()) {
814 cerr <<
"WARNING the number of io.restart_read_mpiio_hint_key and io.restart_read_mpiio_hint_value do not "
815 "match. Disregarding these options."
819 for (uint
i = 0;
i < mpiioKeys.size();
i++) {
829 RP::get(
"hallMinimumRho", hallRho);
837 if ((RP::isSet(
"restart.overrideReadFsGridDecompositionX")||RP::isSet(
"restart.overrideReadFsGridDecompositionY")||RP::isSet(
"restart.overrideReadFsGridDecompositionZ")) &&
838 !(RP::isSet(
"restart.overrideReadFsGridDecompositionX")&&RP::isSet(
"restart.overrideReadFsGridDecompositionY")&&RP::isSet(
"restart.overrideReadFsGridDecompositionZ")) ) {
839 cerr <<
"ERROR all of restart.overrideReadFsGridDecompositionX,Y,Z should be defined." << endl;
840 MPI_Abort(MPI_COMM_WORLD, 1);
842 fsgrid::Task_t temp_task_t;
843 RP::get(
"restart.overrideReadFsGridDecompositionX", temp_task_t);
845 RP::get(
"restart.overrideReadFsGridDecompositionY", temp_task_t);
847 RP::get(
"restart.overrideReadFsGridDecompositionZ", temp_task_t);
851 if (RP::helpRequested) {
856 string geometryString;
858 RP::get(
"gridbuilder.x_min",
P::xmin);
859 RP::get(
"gridbuilder.x_max",
P::xmax);
860 RP::get(
"gridbuilder.y_min",
P::ymin);
861 RP::get(
"gridbuilder.y_max",
P::ymax);
862 RP::get(
"gridbuilder.z_min",
P::zmin);
863 RP::get(
"gridbuilder.z_max",
P::zmax);
875 cerr <<
"AMR.max_allowed_spatial_level cannot be greater than AMR.max_spatial_level!\n";
877 MPI_Abort(MPI_COMM_WORLD, 1);
891 cerr <<
"ERROR invalid alpha_1 refine threshold" << endl;
893 MPI_Abort(MPI_COMM_WORLD, 1);
904 cerr <<
"ERROR invalid alpha_2 refine threshold" << endl;
906 MPI_Abort(MPI_COMM_WORLD, 1);
917 cerr <<
"ERROR invalid vorticity refine threshold" << endl;
919 MPI_Abort(MPI_COMM_WORLD, 1);
931 cerr <<
"ERROR invalid anisotropy refine threshold" << endl;
933 MPI_Abort(MPI_COMM_WORLD, 1);
992 #ifdef ASTERIX_OCTREE
1008 std::cerr <<
"Your ASTERIX setting do not make sense! You need to either disable compression or select an "
1009 "appropriate comrpession method!"
1012 MPI_Barrier(MPI_COMM_WORLD);
1013 MPI_Abort(MPI_COMM_WORLD,-1);
1017 auto parseToSize_T = [](
const std::string&
str) -> std::vector<size_t> {
1018 std::vector<std::size_t> result;
1019 std::string clean_str;
1020 std::copy_if(
str.begin(),
str.end(), std::back_inserter(clean_str), [](
unsigned char c) {
1021 return !std::isspace(c);
1024 std::stringstream ss(clean_str);
1026 while (std::getline(ss, token,
',')) {
1027 result.push_back(std::stoull(token));
1042 cerr <<
"AMR.number_of_boxes is set to " <<
P::amrBoxNumber <<
" so the same number of values is required for AMR.box_half_width_[xyz] and AMR.box_center_[xyz]." << endl;
1043 MPI_Abort(MPI_COMM_WORLD, 1);
1054 cerr <<
"AMR.number_of_refine_boxes is set to " <<
P::refineBoxNumber <<
" so the same number of values is required for AMR.refinementMin[XYZ] and AMR.refinementMax[XYZ]." << endl;
1055 MPI_Abort(MPI_COMM_WORLD, 1);
1065 cerr <<
"FilterPasses do not match AMR levels. \t" <<
" in " << __FILE__ <<
":" << __LINE__ << endl;
1066 MPI_Abort(MPI_COMM_WORLD, 1);
1078 auto g_sequence=[](
int size){
1098 cerr <<
"Box domain error!" << endl;
1099 MPI_Abort(MPI_COMM_WORLD, 1);
1107 RP::get(
"gridbuilder.dt",
P::dt);
1109 RP::get(
"gridbuilder.t_max",
P::t_max);
1138 if ((RP::isSet(
"fieldsolver.manualFsGridDecompositionX")||RP::isSet(
"fieldsolver.manualFsGridDecompositionY")||RP::isSet(
"fieldsolver.manualFsGridDecompositionZ")) &&
1139 !(RP::isSet(
"fieldsolver.manualFsGridDecompositionX")&&RP::isSet(
"fieldsolver.manualFsGridDecompositionY")&&RP::isSet(
"fieldsolver.manualFsGridDecompositionZ")) ) {
1140 cerr <<
"ERROR all of fieldsolver.manualFsGridDecompositionX,Y,Z should be defined." << endl;
1141 MPI_Abort(MPI_COMM_WORLD, 1);
1143 RP::get(
"fieldsolver.manualFsGridDecompositionX", temp_task_t);
1145 RP::get(
"fieldsolver.manualFsGridDecompositionY", temp_task_t);
1147 RP::get(
"fieldsolver.manualFsGridDecompositionZ", temp_task_t);
1162 logFile<<
"Performing spatial translation using ghost cell information with coalesced MPI updates."<<endl;
1174 logFile<<
"Capping ghost translation stencil size to VLASOV_STENCIL_WIDTH+1 around local domain."<<endl;
1189 std::vector<std::string> loadBalanceKeys;
1190 std::vector<std::string> loadBalanceValues;
1191 RP::get(
"loadBalance.optionKey", loadBalanceKeys);
1192 RP::get(
"loadBalance.optionValue", loadBalanceValues);
1193 if (loadBalanceKeys.size() != loadBalanceValues.size()) {
1195 cerr <<
"WARNING the number of load balance keys and values do not match. Disregarding these options." << endl;
1198 for (
size_t i = 0;
i < loadBalanceKeys.size(); ++
i) {
1213 const bool force_sparsity_in_output =
1215 if (force_sparsity_in_output) {
1236 std::cerr <<
"bailout.velocity_space_wall_block_margin is larger than 0.5 * MAX_BLOCKS_PER_DIM, aborting." << std::endl;
1284 cerr << __FILE__ <<
":" << __LINE__ <<
" ERROR: Unknown value for fieldtracing.fieldLineTracer: " <<
tracerString << endl;
set(gca, 'YDir', 'normal')
#define MAX_BLOCKS_PER_DIM
FieldTracingParameters fieldTracingParameters
static std::vector< uint > amrBoxHalfWidthX
static Real alphaDRhoWeight
static uint ohmGradPeTerm
static std::vector< std::pair< std::string, std::string > > restartReadHints
static Real alphaDBSqWeight
static Real anisotropyRefineThreshold
static bool systemWriteRestartCompressed
static bool fieldSolverDiffusiveEterms
static bool amrTransShortPencils
ASTERIX_COMPRESSION_METHODS
static bool writeInitialState
static std::size_t max_vdfs_per_nn
static Real bailout_max_memory
static Real vorticityCoarsenThreshold
static std::vector< Real > refinementMinZ
static std::vector< int > systemWriteDistributionWriteZlineStride
static Real mlp_tollerance
static Real alpha1RefineThreshold
static int restartStripeFactor
static uint maxFieldSolverSubcycles
static int writeRestartAsFloat
static int systemStripeFactor
static Real maxSlAccelerationRotation
static std::vector< CellID > localCells
static bool diagnosticWriteAllDROs
static bool fieldSolverFiniteDifferencingAtBoundaries
static bool vlasovSolverGhostTranslate
static Real alpha2RefineThreshold
static std::string restartWritePath
static int amrMaxSpatialRefLevel
static std::vector< Real > refinementMinY
static std::vector< int > systemWriteDistributionWriteShellStride
static int refineBoxNumber
static std::vector< std::string > outputVariableList
static std::vector< bool > systemWriteFsGrid
static std::vector< uint > amrBoxHalfWidthY
static bool refineOnRestart
static std::vector< int > systemWriteDistributionWriteYlineStride
static Real saveRestartWalltimeInterval
static bool useAnisotropy
static std::vector< Real > refinementMaxY
static std::vector< int > systemWrites
static void getParameters()
Get the global parameters.
static Realf PADcoefficient
static std::map< std::string, std::string > loadBalanceOptions
static bool prepareForRebalance
static bool addParameters()
Add the global parameters.
static std::vector< Real > systemWriteDistributionWriteShellRadius
static std::vector< std::size_t > mlp_arch
static std::vector< std::string > systemWritePath
static Real alphaDBWeight
static std::string loadBalanceAlgorithm
static std::vector< std::pair< std::string, std::string > > restartWriteHints
static int maxSlAccelerationSubcycles
static Real hallMinimumRhom
static bool meshRepartitioned
static std::vector< int > systemWriteDistributionWriteXlineStride
static std::string recoverWritePath
static bool dynamicTimestep
static std::string PADnu0
static Real alpha2CoarsenThreshold
static bool systemWriteRecoveryCompressed
static std::string projectName
static std::vector< Realf > amrBoxCenterY
static uint bailout_velocity_space_wall_margin
static std::vector< Real > refinementMaxX
static std::string mlpLayer
static int amrMaxAllowedSpatialRefLevel
static Real vlasovSolverMinCFL
static Real vorticityRefineThreshold
static int maxFilteringPasses
static Real electronDensity
static Real alpha1CoarsenThreshold
static std::array< fsgrid::Task_t, 3 > overrideReadFsGridDecomposition
static uint64_t vlsvBufferSize
static std::string restartFileName
static uint fieldSolverSubcycles
static Real compression_interval
static std::size_t mlp_max_epochs
static ASTERIX_COMPRESSION_METHODS vdf_compression_method
static Real fieldSolverMinCFL
static bool forceRefinement
static Real hallMinimumRhoq
static Real alphaDUWeight
static bool bailout_write_restart
static bool computeCurvature
static uint GPUallocations
static uint recoverMaxFiles
static Real octree_tolerance
static Real maxWaveVelocity
static std::string method_str
static std::vector< Realf > amrBoxCenterX
static std::vector< uint > amrBoxHalfWidthZ
static bool propagateVlasovAcceleration
static uint exitAfterRestarts
static std::vector< std::string > blurPassString
static bool artificialPADiff
static uint vlasovSolverGhostTranslateExtent
static std::vector< std::pair< std::string, std::string > > systemWriteHints
static std::vector< Real > refinementMinX
static Real bailout_min_dt
static std::vector< Real > systemWriteTimeInterval
static std::vector< int > amrBoxMaxLevel
static std::array< fsgrid::Task_t, 3 > manualFsGridDecomposition
static Real anisotropyCoarsenThreshold
static uint saveRecoverTstepInterval
static bool recalculateStencils
static std::vector< std::string > diagnosticVariableList
static std::vector< int > systemWriteDistributionWriteStride
static std::vector< Realf > amrBoxCenterZ
static Real vlasovSolverMaxCFL
static uint rebalanceInterval
static std::size_t mlp_fourier_order
static bool adaptRefinement
static bool propagateVlasovTranslation
static int anisotropyMaxReflevel
static bool systemWriteDistributionCompressed
static std::vector< Real > refinementMaxZ
static std::vector< std::string > systemWriteName
static bool vlasovAccelerateMaxwellianBoundaries
static std::vector< int > numPasses
static bool systemWriteAllDROs
static Real alphaDPSqWeight
static Real electronTemperature
static uint refineCadence
static Real electronPTindex
static uint diagnosticInterval
static Real fieldSolverMaxCFL
static bool propagateField
static ARCH_HOSTDEV VecSimple< T > min(VecSimple< T > const &l, VecSimple< T > const &r)
static ARCH_HOSTDEV VecSimple< T > max(VecSimple< T > const &l, VecSimple< T > const &r)