![]() |
deltaFlow
|
Parses and stores command-line arguments for deltaFlow. More...
#include <Argparse.H>
Public Member Functions | |
| ArgumentParser (int argc, char *argv[]) | |
| Constructor: parses command-line arguments. | |
| ~ArgumentParser ()=default | |
| Destructor (default). | |
| ArgumentParser (const ArgumentParser &)=delete | |
| ArgumentParser & | operator= (const ArgumentParser &)=delete |
| ArgumentParser (const ArgumentParser &&)=delete | |
| ArgumentParser & | operator= (ArgumentParser &&)=delete |
| std::string | getInputFile () const noexcept |
| Get the input CDF file path. | |
| std::string | getJobName () const noexcept |
| Get the job name. | |
| double | getTolerance () const noexcept |
| Get the convergence tolerance ($$ \epsilon $$). | |
| int | getMaxIterations () const noexcept |
| Get the maximum number of iterations ($$ N_{max} $$). | |
| double | getRelaxationCoefficient () const noexcept |
| Get the relaxation coefficient ($$ \omega $$). | |
| SolverType | getSolverType () const noexcept |
| Get the solver type. | |
| InputFormat | getInputFormat () const noexcept |
| Get the input file format. | |
| PowerFlowOptions | getOptions () const noexcept |
| Get all parsed options as a plain data struct (ISP). | |
Private Member Functions | |
| void | parse_args (int argc, char *argv[]) |
| Parse the provided arguments. | |
| void | help () const noexcept |
| Print help message to stdout. | |
Private Attributes | |
| std::string | inputFile |
| Path to input CDF file. | |
| std::string | jobName |
| Job name (defaults to input filename) | |
| double | tolerance = 1E-8 |
| Convergence tolerance ($$ \epsilon $$) | |
| int | maxIterations = 1024 |
| Maximum number of iterations ($$ N_{max} $$) | |
| double | relaxation = 1.0 |
| Relaxation coefficient ($$ \omega $$) | |
| SolverType | method |
| Solver type. | |
| InputFormat | format |
| Input file format. | |
Parses and stores command-line arguments for deltaFlow.
The ArgumentParser extracts command-line arguments related to the input CDF file, job name, solver selection, convergence tolerance ($$ \epsilon $$), maximum iterations ($$ N_{max} $$), and relaxation coefficient ($$ \omega $$).
Definition at line 64 of file Argparse.H.
| ArgumentParser::ArgumentParser | ( | int | argc, |
| char * | argv[] | ||
| ) |
Constructor: parses command-line arguments.
| argc | Argument count. |
| argv | Argument vector. |
Definition at line 37 of file Argparse.C.
References parse_args().

|
default |
Destructor (default).
|
delete |
|
delete |
|
noexcept |
Get the input CDF file path.
Definition at line 131 of file Argparse.C.
References inputFile.
|
noexcept |
Get the input file format.
Definition at line 155 of file Argparse.C.
References format.
|
noexcept |
Get the job name.
Definition at line 135 of file Argparse.C.
References jobName.
|
noexcept |
Get the maximum number of iterations ($$ N_{max} $$).
Definition at line 143 of file Argparse.C.
References maxIterations.
|
noexcept |
Get all parsed options as a plain data struct (ISP).
Lets consumers that only need the parsed values (e.g. PowerFlowApplication) depend on a small data type instead of the full ArgumentParser interface.
Definition at line 159 of file Argparse.C.
References format, inputFile, PowerFlowOptions::inputFile, PowerFlowOptions::inputFormat, jobName, PowerFlowOptions::jobName, maxIterations, PowerFlowOptions::maxIterations, method, relaxation, PowerFlowOptions::relaxation, PowerFlowOptions::solverType, tolerance, and PowerFlowOptions::tolerance.

|
noexcept |
Get the relaxation coefficient ($$ \omega $$).
Definition at line 147 of file Argparse.C.
References relaxation.
|
noexcept |
Get the solver type.
Definition at line 151 of file Argparse.C.
References method.
|
noexcept |
Get the convergence tolerance ($$ \epsilon $$).
Definition at line 139 of file Argparse.C.
References tolerance.
|
privatenoexcept |
Print help message to stdout.
Definition at line 171 of file Argparse.C.
References LOG_MESSAGE.

|
delete |
|
delete |
|
private |
Parse the provided arguments.
| argc | Argument count. |
| argv | Argument vector. |
Definition at line 41 of file Argparse.C.
References format, GaussSeidel, help(), IEEE, inputFile, Utilities::isCommonDataFormat(), Utilities::isRawFormat(), jobName, LOG_DEBUG, LOG_MESSAGE, maxIterations, method, NewtonRaphson, PSSE, relaxation, and tolerance.


|
private |
Input file format.
Definition at line 142 of file Argparse.H.
|
private |
Path to input CDF file.
Definition at line 136 of file Argparse.H.
|
private |
Job name (defaults to input filename)
Definition at line 137 of file Argparse.H.
|
private |
Maximum number of iterations ($$ N_{max} $$)
Definition at line 139 of file Argparse.H.
|
private |
Solver type.
Definition at line 141 of file Argparse.H.
|
private |
Relaxation coefficient ($$ \omega $$)
Definition at line 140 of file Argparse.H.
|
private |
Convergence tolerance ($$ \epsilon $$)
Definition at line 138 of file Argparse.H.