Utilities¶
- Contents
rhea.h [source]¶
Typedefs
-
typedef struct rhea_all_options rhea_all_options_t¶
Enums
-
enum rhea_performance_monitor_print_wtime_t¶
Values:
-
enumerator RHEA_PERFMON_PRINT_WTIME_NONE = 0¶
-
enumerator RHEA_PERFMON_PRINT_WTIME_ESSENTIAL¶
-
enumerator RHEA_PERFMON_PRINT_WTIME_ALL¶
-
enumerator RHEA_PERFMON_PRINT_WTIME_NONE = 0¶
-
enum rhea_performance_monitor_print_ncalls_t¶
Values:
-
enumerator RHEA_PERFMON_PRINT_NCALLS_NONE = 0¶
-
enumerator RHEA_PERFMON_PRINT_NCALLS_ESSENTIAL¶
-
enumerator RHEA_PERFMON_PRINT_NCALLS_ALL¶
-
enumerator RHEA_PERFMON_PRINT_NCALLS_NONE = 0¶
Functions
-
void rhea_init_begin(int *mpisize, int *mpirank, int *ompsize, int argc, char **argv, sc_MPI_Comm mpicomm)¶
Begin the initialization of a program powered by rhea. Should be followed by calling
rhea_init_end (...).Initializes the rhea library and dependent libraries. Retrieves parameters of the parallel envirionment.
-
void rhea_init_end(ymir_options_t *options)¶
Ends the initialization of a program powered by rhea. Should follow after calling
rhea_init_begin (...).Parses options and sets up ymir library.
-
int rhea_production_run_get()¶
Get whether the program execution is flagged as a production run.
-
void rhea_production_run_set(const int is_production_run)¶
Set the program execution as a production run.
-
void rhea_add_options_base(ymir_options_t *options)¶
Defines rhea options and adds them as sub-options.
-
void rhea_add_options_all(ymir_options_t *options)¶
-
void rhea_add_options_newton(ymir_options_t *options)¶
-
void rhea_process_options_all(rhea_all_options_t *all_options)¶
Processes all rhea options and stores them.
-
void rhea_process_options_newton(rhea_domain_options_t *domain_options, rhea_discretization_options_t *discr_options, rhea_newton_options_t *newton_options)¶
Processes a subset of options and stores them.
-
void rhea_print_physics_const_options(rhea_domain_options_t *domain_options, rhea_temperature_options_t *temperature_options, rhea_viscosity_options_t *viscosity_options)¶
Print options that describe flow physics.
-
int rhea_performance_monitor_active()¶
Get whether performance monitoring is active.
-
void rhea_performance_monitor_init(const char **monitor_name, const int n_monitors)¶
Initializes performance monitors.
-
void rhea_performance_monitor_finalize()¶
Finalizes performance monitors.
-
void rhea_performance_monitor_print(const char *title, rhea_performance_monitor_print_wtime_t print_wtime, rhea_performance_monitor_print_ncalls_t print_n_calls, rhea_performance_monitor_print_flops_t print_flops, rhea_performance_monitor_print_ymir_t print_ymir)¶
Prints statistics collected by performance monitors.
-
void rhea_performance_monitor_start(const int monitor_index)¶
Starts/stops a single performance monitor.
-
void rhea_performance_monitor_stop_add(const int monitor_index)¶
-
void rhea_performance_monitor_start_barrier(const int monitor_index)¶
Starts/stops a single performance monitor with MPI barrier.
-
void rhea_performance_monitor_stop_add_barrier(const int monitor_index)¶
-
struct rhea_all_options¶
Public Members
-
rhea_domain_options_t *domain_options¶
-
rhea_temperature_options_t *temperature_options¶
-
rhea_composition_options_t *composition_options¶
-
rhea_plate_options_t *plate_options¶
-
rhea_weakzone_options_t *weakzone_options¶
-
rhea_topography_options_t *topography_options¶
-
rhea_viscosity_options_t *viscosity_options¶
-
rhea_discretization_options_t *discr_options¶
-
rhea_domain_options_t *domain_options¶
rhea_math.h [source]¶
Functions
-
double rhea_math_exp(const double x)¶
RHEA_MATH
Basic mathematical operations. Computes exponential or (natural) logarithm and catches infinite output.
-
double rhea_math_log(const double x)¶
-
double rhea_math_smin_logexp(const double x, const double y, const double p)¶
Computes a smooth version of the minimum avoiding overflow and underflow:
smin (x, y) = log (exp (p*x) + exp(p*y)) / p = min + log (1 + exp(p*(max - min))) / p
where
min=min(x,y),max=max(x,y), and the parameterp<0controls “smoothness” such thatsmin (x, y) -> min (x, y) as p<0 and p -> -infinity
-
double rhea_math_smin_logexp_nondim(const double x, const double y, const double p, const double d)¶
-
double rhea_math_smax_logexp(const double x, const double y, const double p)¶
Computes a smooth version of the maximum avoiding overflow and underflow:
smax (x, y) = log (exp (p*x) + exp(p*y)) / p = max + log (1 + exp(p*(min - max))) / p
where
min=min(x,y),max=max(x,y), and the parameterp>0controls “smoothness” such thatsmax (x, y) -> max (x, y) as p>0 and p -> +infinity
-
double rhea_math_smax_logexp_nondim(const double x, const double y, const double p, const double d)¶
-
double rhea_math_smin_gpm(const double x, const double y, const double p)¶
Computes a smooth version of the minimum based on the generalized/power mean.
-
double rhea_math_smin_gpm_nondim(const double x, const double y, const double p, const double d)¶
-
double rhea_math_smin_gpm_dx_nondim(const double x, const double y, const double p, const double d)¶
-
double rhea_math_smin_gpm_dx_impl_nondim(const double smin, const double y, const double p, const double d)¶
-
double rhea_math_smax_gpm(const double x, const double y, const double p)¶
Computes a smooth version of the mximum based on the generalized/power mean.
-
double rhea_math_smax_gpm_nondim(const double x, const double y, const double p, const double d)¶