|
gimme-alpha 0.1
|
#include <glib.h>#include <stdlib.h>#include <stdio.h>#include <gio/gio.h>#include <gimmeprogs/argdefaults.h>#include <gimmeprogs/process-average-efield-args.h>
Include dependency graph for process-average-efield-args.c:Go to the source code of this file.
Functions | |
| void | program_print_version (FILE *f) |
| void | libpostproccalx_print_version (FILE *f) |
| void | libnextnano_print_version (FILE *f) |
| void | libmodeling_print_version (FILE *f) |
| void | libcommon_print_version (FILE *f) |
| void | do_print_version () |
| struct args * | process_args (int argc, char *argv[]) |
Variables | |
| static struct args | processed_args = {.base_dirs=NULL, .no_print_integration_error=0, .request_integration_abs_error=REQUESTED_QAG_PRECISION_ABSOLUTE, .request_integration_rel_error=REQUESTED_QAG_PRECISION_RELATIVE} |
| void do_print_version | ( | ) |
Definition at line 40 of file process-average-efield-args.c.
References libcommon_print_version(), libmodeling_print_version(), libnextnano_print_version(), libpostproccalx_print_version(), and program_print_version().
{
program_print_version(stdout);
libpostproccalx_print_version(stdout);
libnextnano_print_version(stdout);
libmodeling_print_version(stdout);
libcommon_print_version(stdout);
}
Here is the call graph for this function:| void libcommon_print_version | ( | FILE * | f | ) |
| void libmodeling_print_version | ( | FILE * | f | ) |
| void libnextnano_print_version | ( | FILE * | f | ) |
| void libpostproccalx_print_version | ( | FILE * | f | ) |
| struct args* process_args | ( | int | argc, |
| char * | argv[] | ||
| ) | [read] |
Definition at line 51 of file process-average-efield-args.c.
References ARGDEFAULT_DEPRECATED_GROUP_HELPINFO, args::avg_hh_lh, args::base_dirs, args::del_psi2, do_print_version(), DOUBLE_TYPE, args::Ep, args::ifaces_sequences, args::instrument_efield_alpha, args::interfaces, args::no_efield_term, args::no_integrate, args::no_interface_term, args::no_print_integration_error, print_version(), processed_args, args::request_integration_abs_error, args::request_integration_rel_error, args::separate_terms, string_to_data(), string_to_data_x2(), and unlikely.
{
gboolean print_version = FALSE;
int errored=0;
char **base_dir_names = NULL;
GOptionEntry options[] = {
{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &base_dir_names, "", NULL },
{ "no-print-integration-error", 'a', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_NONE, &(processed_args.no_print_integration_error), "Do not print estimation of integration error", NULL },
{ "integration-abs-error", 'R', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_DOUBLE, &(processed_args.request_integration_abs_error), "Requested absolute integration error", NULL},
{ "integration-rel-error", 'r', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_DOUBLE, &(processed_args.request_integration_rel_error), "Requested relative integration error", NULL},
{ "version", 'v', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_NONE, &print_version, "Print version information about this program", NULL },
{ NULL }
};
GOptionContext *ctx;
ctx = g_option_context_new("- computes the expectation value of the electric field in a nanostructure for the ground state");
g_option_context_add_main_entries(ctx, options, "Options");
g_option_context_parse(ctx, &argc, &argv, NULL);
if(print_version){
do_print_version();
return NULL;
}
gchar* htext = g_option_context_get_help(ctx, FALSE, NULL);
g_option_context_free(ctx);
/*Check to make sure what we want is there.*/
GFile *bn;
if(base_dir_names != NULL) {
for(int i = 0; base_dir_names[i] != NULL; i++) {
bn = g_file_new_for_commandline_arg(base_dir_names[i]);
processed_args.base_dirs = g_list_append(processed_args.base_dirs, bn);
}
}
if(processed_args.base_dirs == NULL) {
fprintf(stderr, "ERROR: you MUST give at least one base directory\n");
errored=1;
}
if(errored){
int errored=0;
printf("%s", htext);
printf("**Run with --version for version and compilation information**\n");
return NULL;
}
return &processed_args;
}
Here is the call graph for this function:| void program_print_version | ( | FILE * | f | ) |
struct args processed_args = {.base_dirs=NULL, .no_print_integration_error=0, .request_integration_abs_error=REQUESTED_QAG_PRECISION_ABSOLUTE, .request_integration_rel_error=REQUESTED_QAG_PRECISION_RELATIVE} [static] |
Definition at line 49 of file process-average-efield-args.c.
Referenced by process_args().