#include <eh_utils.h>
#include <math.h>
#include <stdlib.h>
Go to the source code of this file.
Functions | |
void | eh_init_glib (void) |
void | eh_exit (int code) |
void | eh_exit_on_error (GError *error, const gchar *format,...) |
gint | eh_fprint_version_info (FILE *fp, const gchar *prog, gint maj, gint min, gint micro) |
gboolean | eh_is_in_domain (gssize n_i, gssize n_j, gssize i, gssize j) |
double | eh_date_to_years (Eh_date_t *d) |
double | sigma (double s, double t, double p) |
void | eh_test_function (const char *func_name, Eh_test_func f) |
gboolean | eh_check_to_s (gboolean assert, const gchar *str, gchar ***str_list) |
void | eh_set_error_strv (GError **error, GQuark domain, gint code, gchar **err_s) |
gchar * | eh_render_error_str (GError *error, const gchar *err_str) |
gchar * | eh_render_command_str (int argc, char *argv[]) |
Variables | |
gchar * | brief_copyleft_msg [] |
gboolean eh_check_to_s | ( | gboolean | assert, | |
const gchar * | str, | |||
gchar *** | str_list | |||
) |
Definition at line 203 of file eh_misc.c.
References eh_strv_append().
Referenced by inflow_check_params(), init_avulsion(), init_bedload(), init_debris_flow(), init_diffusion(), init_erosion(), init_failure(), init_inflow(), init_isostasy(), init_plume_hypo(), init_quake(), init_squall(), init_storm(), init_tide(), plume_check_params(), sakura_check_params(), and sed_hydro_check().
double eh_date_to_years | ( | Eh_date_t * | d | ) |
Definition at line 127 of file eh_misc.c.
References Eh_date_t::day, eh_require, Eh_date_t::month, and Eh_date_t::year.
Referenced by eh_str_to_time_in_years().
void eh_exit | ( | int | code | ) |
Definition at line 44 of file eh_misc.c.
Referenced by _print_choices(), bio_array_to_cell_array(), calculate_head_index(), eh_exit_on_error(), eh_get_opt_key(), eh_logger(), eh_open_log_file(), eh_opt_key_value(), eh_print_msg(), eh_scan_entry(), eh_scan_label(), eh_scan_next_record(), eh_scanner_eor(), eh_seek_record_start(), main(), nrerror(), plumeconc(), plumeout1(), plumeread2d(), print_choices(), sedflux_parse_command_line(), tpool_destroy(), and tpool_init().
void eh_exit_on_error | ( | GError * | error, | |
const gchar * | format, | |||
... | ||||
) |
Definition at line 65 of file eh_misc.c.
References eh_exit(), eh_free, and eh_render_error_str().
Referenced by main(), sedflux_init(), and sedflux_setup().
gint eh_fprint_version_info | ( | FILE * | fp, | |
const gchar * | prog, | |||
gint | maj, | |||
gint | min, | |||
gint | micro | |||
) |
Definition at line 91 of file eh_misc.c.
References brief_copyleft_msg, and eh_print_message().
Referenced by main(), sedflux_get_file_name_interactively(), and sedflux_parse_command_line().
void eh_init_glib | ( | void | ) |
Definition at line 25 of file eh_misc.c.
References eh_calloc_c_style(), eh_free_c_style(), eh_malloc_c_style(), and eh_realloc_c_style().
Referenced by main(), and sedflux_setup().
gboolean eh_is_in_domain | ( | gssize | n_i, | |
gssize | n_j, | |||
gssize | i, | |||
gssize | j | |||
) |
Test if the index to a cell is within a square domain.
n_i | The number of i elements in the domain. | |
n_j | The number of j elements in the domain. | |
i | An i coordinate to test. | |
j | An j coordinate to test. |
Definition at line 121 of file eh_misc.c.
Referenced by sed_cube_find_adjacent_shore_edge(), sed_cube_find_columns_custom(), sed_cube_find_line_path(), sed_cube_find_shore_edge(), sed_cube_is_in_domain(), sed_cube_is_shore_edge(), sed_cube_x_slope(), sed_cube_y_slope(), and sed_cube_y_slope_fast().
gchar* eh_render_command_str | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 249 of file eh_misc.c.
References eh_free, eh_require, and eh_strv_append().
Referenced by main(), and sedflux_setup().
gchar* eh_render_error_str | ( | GError * | error, | |
const gchar * | err_str | |||
) |
void eh_set_error_strv | ( | GError ** | error, | |
GQuark | domain, | |||
gint | code, | |||
gchar ** | err_s | |||
) |
Definition at line 211 of file eh_misc.c.
References eh_free.
Referenced by eh_symbol_table_require_labels(), inflow_check_params(), init_avulsion(), init_bedload(), init_debris_flow(), init_diffusion(), init_erosion(), init_failure(), init_inflow(), init_isostasy(), init_plume_hypo(), init_quake(), init_squall(), init_storm(), init_tide(), sakura_check_params(), and sed_process_queue_set_families().
void eh_test_function | ( | const char * | func_name, | |
Eh_test_func | f | |||
) |
double sigma | ( | double | s, | |
double | t, | |||
double | p | |||
) |
Calculate the density of sea water
Calculate the density of sea water for a given salinity, temperature, and pressure. Use the international unesco equation of state 1980.
p | Water pressure in bars. This is water depth (in meters) times .1. | |
s | Salinity of water in promille. | |
t | Water temperature in degrees centigrade. |
Definition at line 147 of file eh_misc.c.
Referenced by hydrosedload().
gchar* brief_copyleft_msg[] |
Initial value:
{ "Copywrite (C) 2006 Eric Hutton." , "This is free software; see the source for copying conditions. This is NO" , "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." , NULL }
Definition at line 82 of file eh_misc.c.
Referenced by eh_fprint_version_info().