#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <unistd.h>
#include <utils/utils.h>
Go to the source code of this file.
Defines | |
#define | DEFAULT_N (100) |
#define | DEFAULT_DT (1.) |
#define | DEFAULT_MAG (1.) |
#define | DEFAULT_VERBOSE 0 |
#define | DEFAULT_UNITS SI_UNITS |
#define | SI_UNITS 0 |
#define | MERCALLI_UNITS 1 |
#define | OMORI_UNITS 2 |
#define | G_UNITS 3 |
#define | INFO_MERCALLI 0 |
#define | INFO_OMORI 1 |
Functions | |
double | earthquake (double a, double dt) |
double | convert_accel_to_si (double acceleration) |
double | convert_accel_to_g (double acceleration) |
double | convert_accel_to_omori (double acceleration) |
double | convert_accel_to_mercalli (double acceleration) |
double | convert_mercalli_to_accel (double mercalli) |
double | convert_omori_to_accel (double omori) |
double | convert_g_to_accel (double g) |
double | convert_si_to_accel (double si) |
int | main (int argc, char *argv[]) |
int | do_help (char *message[]) |
#define DEFAULT_DT (1.) |
#define DEFAULT_MAG (1.) |
#define DEFAULT_N (100) |
#define DEFAULT_UNITS SI_UNITS |
Definition at line 195 of file earthquake_main.c.
#define DEFAULT_VERBOSE 0 |
Definition at line 194 of file earthquake_main.c.
#define G_UNITS 3 |
#define INFO_MERCALLI 0 |
#define INFO_OMORI 1 |
#define MERCALLI_UNITS 1 |
#define OMORI_UNITS 2 |
#define SI_UNITS 0 |
double convert_accel_to_g | ( | double | acceleration | ) |
double convert_accel_to_mercalli | ( | double | acceleration | ) |
double convert_accel_to_omori | ( | double | acceleration | ) |
double convert_accel_to_si | ( | double | acceleration | ) |
double convert_g_to_accel | ( | double | g | ) |
double convert_mercalli_to_accel | ( | double | mercalli | ) |
double convert_omori_to_accel | ( | double | omori | ) |
double convert_si_to_accel | ( | double | si | ) |
int do_help | ( | char * | message[] | ) |
Definition at line 365 of file earthquake_main.c.
double earthquake | ( | double | a, | |
double | dt | |||
) |
Generate an earthquake.
This will give the maximum earthquake that occured within the time step dt.
a | determined from the mean quake over a time step. | |
dt | the number of time steps that are considered to find the maximum. |
Definition at line 35 of file earthquake.c.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 215 of file earthquake_main.c.
References convert_accel_to_g(), convert_accel_to_mercalli(), convert_accel_to_omori(), convert_accel_to_si(), convert_g_to_accel(), convert_mercalli_to_accel(), convert_omori_to_accel(), convert_si_to_accel(), DEFAULT_DT, DEFAULT_MAG, DEFAULT_N, earthquake(), eh_check_opts(), eh_exit(), eh_get_opt_bool(), eh_get_opt_dbl(), eh_get_opt_int(), eh_get_opt_key(), eh_opts_init(), eh_print_message(), G_UNITS, help_msg, INFO_MERCALLI, INFO_OMORI, MERCALLI_UNITS, OMORI_UNITS, and SI_UNITS.