![]() |
|
Namespace for command line arguments. More...
Classes | |
struct | ArgInfo |
Structure to store information on a command line argument. More... | |
Functions | |
void | setup (int argc, char **argv) |
Set values. More... | |
void | output () |
Doc the command line arguments. More... | |
void | specify_command_line_flag (const std::string &command_line_flag, const std::string &doc) |
Specify possible argument-free command line flag. More... | |
void | specify_command_line_flag (const std::string &command_line_flag, double *arg_pt, const std::string &doc) |
void | specify_command_line_flag (const std::string &command_line_flag, int *arg_pt, const std::string &doc) |
void | specify_command_line_flag (const std::string &command_line_flag, unsigned *arg_pt, const std::string &doc) |
void | specify_command_line_flag (const std::string &command_line_flag, std::string *arg_pt, const std::string &doc) |
bool | command_line_flag_has_been_set (const std::string &flag) |
void | doc_all_flags (std::ostream &outstream) |
Document the values of all flags (specified or not). More... | |
void | doc_specified_flags () |
Document specified command line flags. More... | |
void | doc_available_flags () |
Document available command line flags. More... | |
void | check_arg_index (const int &argc, const int &arg_index) |
Helper function to check if command line index is legal. More... | |
void | parse_and_assign (int argc, char *argv[], const bool &throw_on_unrecognised_args) |
void | parse_and_assign (const bool &throw_on_unrecognised_args) |
Variables | |
int | Argc |
Number of arguments + 1. More... | |
char ** | Argv |
Arguments themselves. More... | |
std::map< std::string, ArgInfo< bool > > | Specified_command_line_flag |
Map to indicate an input flag as having been set. More... | |
std::map< std::string, ArgInfo< double > > | Specified_command_line_double_pt |
Map to associate an input flag with a double – specified via pointer. More... | |
std::map< std::string, ArgInfo< int > > | Specified_command_line_int_pt |
Map to associate an input flag with an int – specified via pointer. More... | |
std::map< std::string, ArgInfo< unsigned > > | Specified_command_line_unsigned_pt |
Map to associate an input flag with an unsigned – specified via pointer. More... | |
std::map< std::string, ArgInfo< std::string > > | Specified_command_line_string_pt |
Map to associate an input flag with a string – specified via pointer. More... | |
Namespace for command line arguments.
Helper function to check if command line index is legal.
References doc_available_flags(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and output().
Referenced by parse_and_assign().
bool oomph::CommandLineArgs::command_line_flag_has_been_set | ( | const std::string & | flag | ) |
Check if command line flag has been set (value will have been assigned directly).
Check if specified flag has been set (the associated value will have been assigned directly)
References Specified_command_line_double_pt, Specified_command_line_flag, Specified_command_line_int_pt, Specified_command_line_string_pt, Specified_command_line_unsigned_pt, and oomph::Global_string_for_annotation::string().
Referenced by FourierDecomposedHelmholtzProblem< ELEMENT >::actions_after_adapt(), FourierDecomposedHelmholtzProblem< ELEMENT >::actions_before_adapt(), SolarRadiationProblem< ELEMENT >::actions_before_implicit_timestep(), FourierDecomposedHelmholtzProblem< ELEMENT >::actions_before_newton_convergence_check(), SolarRadiationProblem< ELEMENT >::actions_before_newton_convergence_check(), AnnularDiskProblem< ELASTICITY_ELEMENT >::AnnularDiskProblem(), AxisymFvKProblem< ELEMENT >::AxisymFvKProblem(), ProblemParameters::boundary_accel_0(), ProblemParameters::boundary_accel_1(), ProblemParameters::boundary_d2fluxdt2_0(), ProblemParameters::boundary_d2fluxdt2_1(), ProblemParameters::boundary_dfluxdt_0(), ProblemParameters::boundary_dfluxdt_1(), ProblemParameters::boundary_displ_0(), ProblemParameters::boundary_displ_1(), ProblemParameters::boundary_flux_0(), ProblemParameters::boundary_flux_1(), ProblemParameters::boundary_pressure(), ProblemParameters::boundary_traction(), ProblemParameters::boundary_veloc_0(), ProblemParameters::boundary_veloc_1(), BubbleInChannelProblem< ELEMENT >::BubbleInChannelProblem(), AxiPoroProblem< ELEMENT, TIMESTEPPER >::complete_problem_setup(), UnsteadyHeatMeltProblem< ELEMENT >::complete_problem_setup(), UnsteadyHeatProblem< ELEMENT >::complete_problem_setup(), ElasticAnnulusProblem< ELASTICITY_ELEMENT >::complete_problem_setup(), RingWithTRibProblem< ELASTICITY_ELEMENT >::complete_problem_setup(), UnsteadyHeatProblem< ELEMENT >::create_flux_elements(), StefanBoltzmannProblem< ELEMENT >::create_melt_elements(), StefanBoltzmannProblem< ELEMENT >::create_sb_elements(), AnnularDiskProblem< ELASTICITY_ELEMENT >::create_traction_elements(), AxisymmetricVibratingShellProblem< ELEMENT >::doc_solution(), VibratingShellProblem< ELEMENT >::doc_solution(), AxiPoroProblem< ELEMENT, TIMESTEPPER >::doc_solution(), TetmeshPoissonProblem< ELEMENT >::doc_solution(), UnsteadyHeatProblem< ELEMENT >::doc_solution(), DropInChannelProblem< ELEMENT >::DropInChannelProblem(), ProblemParameters::exact_soln(), FallingBlockProblem< ELEMENT >::FallingBlockProblem(), ProblemParameters::Fluid_body_force(), GlobalFct::get_residuals(), main(), MultiPoissonProblem< ELEMENT >::MultiPoissonProblem(), PrescribedBoundaryDisplacementProblem< ELEMENT >::PrescribedBoundaryDisplacementProblem(), RisingBubbleProblem< ELEMENT >::RisingBubbleProblem(), AxiPoroProblem< ELEMENT, TIMESTEPPER >::set_boundary_values(), AxiPoroProblem< ELEMENT, TIMESTEPPER >::set_initial_condition(), FSIChannelWithLeafletProblem< ELEMENT >::set_iterative_solver(), AxisymmetricVibratingShellProblem< ELEMENT >::set_nprev_for_extrapolation_of_strain_rate_for_all_elements(), VibratingShellProblem< ELEMENT >::set_nprev_for_extrapolation_of_strain_rate_for_all_elements(), ProblemParameters::Solid_body_force(), StefanBoltzmannProblem< ELEMENT >::StefanBoltzmannProblem(), TwoLayerInterfaceProblem< ELEMENT >::TwoLayerInterfaceProblem(), UnstructuredFluidProblem< ELEMENT >::UnstructuredFluidProblem(), and UnstructuredImmersedEllipseProblem< ELEMENT >::UnstructuredImmersedEllipseProblem().
void oomph::CommandLineArgs::doc_all_flags | ( | std::ostream & | outstream | ) |
Document the values of all flags (specified or not).
Document the values of all flags (specified or not)
References Specified_command_line_double_pt, Specified_command_line_flag, Specified_command_line_int_pt, Specified_command_line_string_pt, Specified_command_line_unsigned_pt, and oomph::Global_string_for_annotation::string().
Referenced by oomph::MyDocInfo::copy_args_string(), and main().
void oomph::CommandLineArgs::doc_available_flags | ( | ) |
Document available command line flags.
References oomph::oomph_info, Specified_command_line_double_pt, Specified_command_line_flag, Specified_command_line_int_pt, Specified_command_line_string_pt, Specified_command_line_unsigned_pt, and oomph::Global_string_for_annotation::string().
Referenced by check_arg_index(), GlobalFct::get_residuals(), main(), and parse_and_assign().
void oomph::CommandLineArgs::doc_specified_flags | ( | ) |
Document specified command line flags.
References oomph::oomph_info, Specified_command_line_double_pt, Specified_command_line_flag, Specified_command_line_int_pt, Specified_command_line_string_pt, Specified_command_line_unsigned_pt, and oomph::Global_string_for_annotation::string().
Referenced by main().
void oomph::CommandLineArgs::output | ( | ) |
Doc the command line arguments.
References Argc, Argv, i, oomph::oomph_info, and compute_granudrum_aor::str.
Referenced by check_arg_index().
void oomph::CommandLineArgs::parse_and_assign | ( | const bool & | throw_on_unrecognised_args | ) |
Parse previously specified command line, check for recognised flags and assign associated values
References Argc, Argv, and parse_and_assign().
void oomph::CommandLineArgs::parse_and_assign | ( | int | argc, |
char * | argv[], | ||
const bool & | throw_on_unrecognised_args | ||
) |
Parse command line, check for recognised flags and assign associated values
References check_arg_index(), doc_available_flags(), oomph::MPI_Helpers::finalize(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, Specified_command_line_double_pt, Specified_command_line_flag, Specified_command_line_int_pt, Specified_command_line_string_pt, Specified_command_line_unsigned_pt, and oomph::Global_string_for_annotation::string().
Referenced by main(), and parse_and_assign().
void oomph::CommandLineArgs::specify_command_line_flag | ( | const std::string & | command_line_flag, |
const std::string & | doc | ||
) |
Specify possible argument-free command line flag.
References Specified_command_line_flag.
Referenced by main().
void oomph::CommandLineArgs::specify_command_line_flag | ( | const std::string & | command_line_flag, |
double * | arg_pt, | ||
const std::string & | doc | ||
) |
Specify possible command line flag that specifies a double, accessed via pointer
References Specified_command_line_double_pt.
void oomph::CommandLineArgs::specify_command_line_flag | ( | const std::string & | command_line_flag, |
int * | arg_pt, | ||
const std::string & | doc | ||
) |
Specify possible command line flag that specifies an int, accessed via pointer
References Specified_command_line_int_pt.
void oomph::CommandLineArgs::specify_command_line_flag | ( | const std::string & | command_line_flag, |
std::string * | arg_pt, | ||
const std::string & | doc | ||
) |
Specify possible command line flag that specifies a string, accessed via pointer
References Specified_command_line_string_pt.
void oomph::CommandLineArgs::specify_command_line_flag | ( | const std::string & | command_line_flag, |
unsigned * | arg_pt, | ||
const std::string & | doc | ||
) |
Specify possible command line flag that specifies an unsigned, accessed via pointer
References Specified_command_line_unsigned_pt.
int oomph::CommandLineArgs::Argc |
Number of arguments + 1.
Referenced by DeformableFishPoissonProblem< ELEMENT >::DeformableFishPoissonProblem(), demo_elastic_fish_poisson(), demo_fish_poisson(), demo_smoothing_with_nonlinear_elasticity(), TestPoissonProblem< ELEMENT >::doc_solution(), FSICollapsibleChannelProblem< ELEMENT >::doc_solution(), FSIDrivenCavityProblem< ELEMENT >::doc_solution(), PoissonProblem< ELEMENT >::doc_solution(), EighthSpherePoissonProblem< ELEMENT >::doc_solution(), FSIRingProblem::dynamic_run(), EighthSpherePoissonProblem< ELEMENT >::EighthSpherePoissonProblem(), ElasticCollapsibleChannelMesh< ELEMENT >::ElasticCollapsibleChannelMesh(), ElasticRefineableCollapsibleChannelMesh< ELEMENT >::ElasticRefineableCollapsibleChannelMesh(), FSIChannelWithLeafletProblem< ELEMENT >::FSIChannelWithLeafletProblem(), main(), output(), StaticDiskCompressionProblem< ELEMENT >::parameter_study(), parse_and_assign(), print_stacktrace(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::PseudoElasticCollapsibleChannelProblem(), SheetGlueProblem< ELEMENT >::run(), BlockCompressionProblem< ELEMENT >::run(), DiskShockWaveProblem< ELEMENT, TIMESTEPPER >::run(), ShellProblem< ELEMENT >::run_it(), run_it(), setup(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::steady_run(), LinearWaveProblem< ELEMENT, TIMESTEPPER >::unsteady_run(), PseudoElasticCollapsibleChannelProblem< FLUID_ELEMENT, SOLID_ELEMENT >::unsteady_run(), and OscEllipseProblem< ELEMENT, TIMESTEPPER >::unsteady_run().
char ** oomph::CommandLineArgs::Argv |
Arguments themselves.
Referenced by main(), output(), parse_and_assign(), print_stacktrace(), ElasticRingProblem< ELEMENT >::set_initial_conditions(), and setup().
Map to associate an input flag with a double – specified via pointer.
Referenced by command_line_flag_has_been_set(), doc_all_flags(), doc_available_flags(), doc_specified_flags(), parse_and_assign(), and specify_command_line_flag().
Map to indicate an input flag as having been set.
Referenced by command_line_flag_has_been_set(), doc_all_flags(), doc_available_flags(), doc_specified_flags(), parse_and_assign(), and specify_command_line_flag().
Map to associate an input flag with an int – specified via pointer.
Referenced by command_line_flag_has_been_set(), doc_all_flags(), doc_available_flags(), doc_specified_flags(), parse_and_assign(), and specify_command_line_flag().
std::map< std::string, ArgInfo< std::string > > oomph::CommandLineArgs::Specified_command_line_string_pt |
Map to associate an input flag with a string – specified via pointer.
Referenced by command_line_flag_has_been_set(), doc_all_flags(), doc_available_flags(), doc_specified_flags(), parse_and_assign(), and specify_command_line_flag().
std::map< std::string, ArgInfo< unsigned > > oomph::CommandLineArgs::Specified_command_line_unsigned_pt |
Map to associate an input flag with an unsigned – specified via pointer.
Referenced by command_line_flag_has_been_set(), doc_all_flags(), doc_available_flags(), doc_specified_flags(), parse_and_assign(), and specify_command_line_flag().