Domain¶
rhea_domain.h [source]¶
Typedefs
-
typedef struct rhea_domain_boundary rhea_domain_boundary_t¶
-
typedef struct rhea_domain_options rhea_domain_options_t¶
Enums
-
enum rhea_domain_shape_t¶
Values:
-
enumerator RHEA_DOMAIN_CUBE¶
-
enumerator RHEA_DOMAIN_BOX¶
-
enumerator RHEA_DOMAIN_SHELL¶
-
enumerator RHEA_DOMAIN_CUBE_SPHERICAL¶
-
enumerator RHEA_DOMAIN_BOX_SPHERICAL¶
-
enumerator RHEA_DOMAIN_CUBE¶
-
enum rhea_domain_velocity_bc_t¶
Values:
-
enumerator RHEA_DOMAIN_VELOCITY_BC_USER = -1¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_DIRICHLET_ALL = 0¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_DIRICHLET_NORM = 1¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_DIRICHLET_NORM_FIXDOF = 2¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_DIRICHLET_ALL_INNER = 3¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_DIR_SIDES_NEU_TB = 4¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_DIR_NORM_SIDES_DIR_ALL_TB = 5¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_DIR_NORM_SIDES_B_NEU_T = 6¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_NEUMANN_ALL = 7¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_PERIODX_DIR_ALL = 1100¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_PERIODY_DIR_ALL = 1010¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_PERIODZ_DIR_ALL = 1001¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_PERIODXY_DIR_ALL = 1110¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_PERIODXZ_DIR_ALL = 1101¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_PERIOD_ALL = 1111¶
-
enumerator RHEA_DOMAIN_VELOCITY_BC_USER = -1¶
-
enum rhea_domain_boundary_face_t¶
Values:
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_NONE = -1¶
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_BASE = 0¶
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_TOP¶
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_SIDE1¶
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_SIDE2¶
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_SIDE3¶
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_SIDE4¶
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_N¶
-
enumerator RHEA_DOMAIN_BOUNDARY_FACE_NONE = -1¶
Functions
-
void rhea_domain_add_options(ymir_options_t *opt_sup)¶
Defines options and adds them as sub-options.
-
void rhea_domain_process_options(rhea_domain_options_t *opt)¶
Processes options and stores them.
-
void rhea_domain_print_const_options(rhea_domain_options_t *opt)¶
Prints domain options that are assumed to remain constant.
-
void rhea_domain_convert_coordinates(double *coord1, double *coord2, double *coord3, const double x, const double y, const double z, rhea_domain_coordinate_type_t coord_type, rhea_domain_options_t *opt)¶
Converts nondimensional Cartesian coordinates (x,y,z) into coordinates (coord1,coord2,coord3) of the type
coord_type.
-
double rhea_domain_depth_m_to_depth(const double depth_m, rhea_domain_options_t *opt)¶
Converts dimensional depth [m] to nondimensional depth.
-
double rhea_domain_depth_m_to_radius(const double depth_m, rhea_domain_options_t *opt)¶
Converts dimensional depth [m] to nondimensional radius.
-
double rhea_domain_radius_to_radius_m(const double radius, rhea_domain_options_t *opt)¶
Converts nondimensional radius to dimensional radius [m].
-
double rhea_domain_compute_radius(const double x, const double y, const double z, rhea_domain_options_t *opt)¶
Computes the radius of a shell domain or the corresponding value for a rectangular domain.
-
int rhea_domain_elem_is_in_upper_mantle(const double *x, const double *y, const double *z, const int *Vmask, rhea_domain_options_t *opt)¶
Returns whether an element’s center is located in the upper mantle.
-
int rhea_domain_coord_is_in_upper_mantle(const double x, const double y, const double z, const double tol, rhea_domain_options_t *opt)¶
Returns whether a set of coordinates is located in the upper mantle. This method is not stable/reliable for nodes at the interface due to round-off errors, therfore a tolerance needs to be provided.
-
void rhea_domain_project_to_surface(double *x, double *y, double *z, rhea_domain_options_t *opt)¶
Maps coordinates onto the surface parallel to the radial direction.
-
void rhea_domain_extract_lateral(double *coord1, double *coord2, const double x, const double y, const double z, rhea_domain_coordinate_type_t coord_type, rhea_domain_options_t *opt)¶
Extracts lateral 2-dimensional coordinates of type
coord_type.
-
void rhea_domain_rotate_x_axis(double c[3], const double angle)¶
Rotates Cartesian coordinates about x-, y-, or z-axis by a given angle.
-
void rhea_domain_rotate_y_axis(double c[3], const double angle)¶
-
void rhea_domain_rotate_z_axis(double c[3], const double angle)¶
-
int rhea_domain_boundary_get_num(rhea_domain_options_t *opt)¶
Returns the number of boundary faces.
-
int rhea_domain_boundary_has_periodic(rhea_domain_options_t *opt)¶
Returns if the boundary has periodic faces.
-
rhea_domain_boundary_t *rhea_domain_boundary_new(p4est_t *p4est, rhea_domain_options_t *opt)¶
Creates a new boundary object.
-
void rhea_domain_boundary_destroy(rhea_domain_boundary_t *boundary)¶
Destroys a boundary object.
-
void rhea_domain_set_user_velocity_dirichlet_bc(ymir_vel_dir_fn_t vel_dir_bc_fn, void *vel_dir_bc_data, const int vel_dir_bc_nonzero)¶
Sets function that defines velocity Dirichlet BC’s.
-
ymir_vel_dir_t *rhea_domain_create_velocity_dirichlet_bc(ymir_mesh_t *ymir_mesh, ymir_vec_t *dirscal, void *data)¶
Creates Dirichlet boundary conditions.
-
struct rhea_domain_boundary¶
-
struct rhea_domain_options¶
Public Members
-
rhea_domain_shape_t shape¶
-
double box_length_x¶
-
double box_length_y¶
-
double box_length_z¶
-
int box_subdivision_x¶
-
int box_subdivision_y¶
-
int box_subdivision_z¶
-
int box_spherical_distortion_corr¶
-
double lm_um_interface_radius¶
-
double lm_um_interface_smoothing_width¶
-
rhea_domain_velocity_bc_t velocity_bc_type¶
-
double x_min¶
-
double x_max¶
-
double y_min¶
-
double y_max¶
-
double z_min¶
-
double z_max¶
-
double lon_min¶
-
double lon_max¶
-
double radius_min¶
-
double radius_max¶
-
double depth¶
-
double volume¶
-
double center[3]¶
-
double moment_of_inertia[3]¶
-
double moment_of_inertia_surface[3]¶
-
double radius_min_m¶
-
double radius_max_m¶
-
double density_kg_m3¶
-
double gravity_m_s2¶
-
rhea_domain_shape_t shape¶
rhea_domain_subset.h [source]¶
Typedefs
-
typedef struct rhea_domain_subset_column rhea_domain_subset_column_t¶
Properties of a column inside a domain.
Functions
-
int rhea_domain_subset_point_is_in_column(const double x, const double y, const double z, rhea_domain_subset_column_t *column, rhea_domain_options_t *domain_options)¶
Checks whether the given (x,y,z) coordinates are inside a column within the domain.
-
ymir_locidx_t rhea_domain_subset_apply_filter(ymir_vec_t *vec, ymir_gloidx_t *n_points_in_subset_global, rhea_domain_options_t *domain_options, rhea_domain_subset_column_t *column)¶
Filters a vector according to a column subset.
-
ymir_locidx_t rhea_domain_subset_write_txt(const char *file_path_base, ymir_gloidx_t *n_points_in_subset_global, ymir_vec_t *vec, rhea_domain_options_t *domain_options, rhea_domain_subset_column_t *column)¶
Writes coordinates & values of a vector that lie within a column subset to a text file.
-
ymir_locidx_t rhea_domain_subset_apply_filter_aleutian(ymir_vec_t *vec, ymir_gloidx_t *n_points_in_subset_global, rhea_domain_options_t *domain_options)¶
Filters a vector around Aleutian subduction.
-
ymir_locidx_t rhea_domain_subset_write_txt_aleutian(const char *file_path_base, ymir_vec_t *vec, ymir_gloidx_t *n_points_in_subset_global, rhea_domain_options_t *domain_options)¶
Writes coordinates & values of a vector around Aleutian subduction.
-
struct rhea_domain_subset_column¶
- #include <rhea_domain_subset.h>
Properties of a column inside a domain.
rhea_plate.h [source]¶
Defines
-
RHEA_PLATE_NONE (-1)¶
-
RHEA_PLATE_EARTH_MORVEL25_BEGIN RHEA_PLATE_EARTH_AM¶
-
RHEA_PLATE_EARTH_MORVEL25_END RHEA_PLATE_EARTH_YZ¶
-
RHEA_PLATE_EARTH_BIRD2003_BEGIN RHEA_PLATE_EARTH_AS¶
-
RHEA_PLATE_EARTH_BIRD2003_END RHEA_PLATE_EARTH_WL¶
Typedefs
-
typedef struct rhea_plate_options rhea_plate_options_t¶
-
typedef double (*rhea_plate_area_to_weight_fn_t)(double plate_area, double total_area)¶
Sets weights of each plate as the inverse relative plate area: weight = rhea_plate_set_weight_fn_t (total_area / plate_area)
Sets values outside of all plates to zero.
Enums
-
enum rhea_plate_cube_label_t¶
Values:
-
enumerator RHEA_PLATE_CUBE_NONE = RHEA_PLATE_NONE¶
-
enumerator RHEA_PLATE_CUBE_NW = 0¶
-
enumerator RHEA_PLATE_CUBE_NE¶
-
enumerator RHEA_PLATE_CUBE_SE¶
-
enumerator RHEA_PLATE_CUBE_SW¶
-
enumerator RHEA_PLATE_CUBE_N¶
-
enumerator RHEA_PLATE_CUBE_NONE = RHEA_PLATE_NONE¶
-
enum rhea_plate_earth_label_t¶
Values:
-
enumerator RHEA_PLATE_EARTH_NONE = RHEA_PLATE_NONE¶
-
enumerator RHEA_PLATE_EARTH_AM = 0¶
-
enumerator RHEA_PLATE_EARTH_AN¶
-
enumerator RHEA_PLATE_EARTH_AR¶
-
enumerator RHEA_PLATE_EARTH_AU¶
-
enumerator RHEA_PLATE_EARTH_CP¶
-
enumerator RHEA_PLATE_EARTH_CA¶
-
enumerator RHEA_PLATE_EARTH_CO¶
-
enumerator RHEA_PLATE_EARTH_EU¶
-
enumerator RHEA_PLATE_EARTH_IN¶
-
enumerator RHEA_PLATE_EARTH_JF¶
-
enumerator RHEA_PLATE_EARTH_LW¶
-
enumerator RHEA_PLATE_EARTH_MQ¶
-
enumerator RHEA_PLATE_EARTH_NZ¶
-
enumerator RHEA_PLATE_EARTH_NA¶
-
enumerator RHEA_PLATE_EARTH_PA¶
-
enumerator RHEA_PLATE_EARTH_PS¶
-
enumerator RHEA_PLATE_EARTH_RI¶
-
enumerator RHEA_PLATE_EARTH_SW¶
-
enumerator RHEA_PLATE_EARTH_SC¶
-
enumerator RHEA_PLATE_EARTH_SM¶
-
enumerator RHEA_PLATE_EARTH_SA¶
-
enumerator RHEA_PLATE_EARTH_SU¶
-
enumerator RHEA_PLATE_EARTH_SR¶
-
enumerator RHEA_PLATE_EARTH_YZ¶
-
enumerator RHEA_PLATE_EARTH_AS¶
-
enumerator RHEA_PLATE_EARTH_AP¶
-
enumerator RHEA_PLATE_EARTH_AT¶
-
enumerator RHEA_PLATE_EARTH_BR¶
-
enumerator RHEA_PLATE_EARTH_BS¶
-
enumerator RHEA_PLATE_EARTH_BH¶
-
enumerator RHEA_PLATE_EARTH_BU¶
-
enumerator RHEA_PLATE_EARTH_CL¶
-
enumerator RHEA_PLATE_EARTH_EA¶
-
enumerator RHEA_PLATE_EARTH_KE¶
-
enumerator RHEA_PLATE_EARTH_MA¶
-
enumerator RHEA_PLATE_EARTH_MS¶
-
enumerator RHEA_PLATE_EARTH_NH¶
-
enumerator RHEA_PLATE_EARTH_ND¶
-
enumerator RHEA_PLATE_EARTH_NB¶
-
enumerator RHEA_PLATE_EARTH_OK¶
-
enumerator RHEA_PLATE_EARTH_ON¶
-
enumerator RHEA_PLATE_EARTH_PM¶
-
enumerator RHEA_PLATE_EARTH_SS¶
-
enumerator RHEA_PLATE_EARTH_SB¶
-
enumerator RHEA_PLATE_EARTH_TI¶
-
enumerator RHEA_PLATE_EARTH_TO¶
-
enumerator RHEA_PLATE_EARTH_WL¶
-
enumerator RHEA_PLATE_EARTH_N¶
-
enumerator RHEA_PLATE_EARTH_NONE = RHEA_PLATE_NONE¶
Functions
-
void rhea_plate_add_options(ymir_options_t *opt_sup)¶
Defines options and adds them as sub-options.
-
void rhea_plate_process_options(rhea_plate_options_t *opt, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
Processes options and stores them.
-
void rhea_plate_perfmon_init(const int activate, const int skip_if_active)¶
Initializes performance counters.
-
void rhea_plate_perfmon_print(sc_MPI_Comm mpicomm, const int print_wtime, const int print_n_calls, const int print_flops)¶
Prints statistics collected by performance monitors.
-
int rhea_plate_data_create(rhea_plate_options_t *opt, sc_MPI_Comm mpicomm)¶
Allocates and performs the setup of data that is required for plate retrieval.
-
void rhea_plate_data_clear(rhea_plate_options_t *opt)¶
Clears storage of plate data.
-
int rhea_plate_get_n_plates(rhea_plate_options_t *opt)¶
Returns the number of plates.
-
int rhea_plate_is_inside(const double x, const double y, const double z, const int plate_label, rhea_plate_options_t *opt)¶
Checks whether the given (x,y,z) coordinates are inside a specific plate.
-
void rhea_plate_set_label_vec(ymir_vec_t *vec, rhea_plate_options_t *opt)¶
Sets plate labels at all entries of a vector.
-
void rhea_plate_set_weight_vec(ymir_vec_t *vec, rhea_plate_area_to_weight_fn_t area_to_weight_fn, const double *weight_values, rhea_plate_options_t *opt, double *calculated_plate_weights)¶
-
void rhea_plate_apply_filter_vec(ymir_vec_t *vec, const int plate_label, rhea_plate_options_t *opt)¶
Filters values of a vector inside a plate. Sets values outside this plate to zero.
-
void rhea_plate_apply_filter_all_vec(ymir_vec_t *vec, rhea_plate_options_t *opt)¶
Filters values of a vector inside any plate. Sets values outside of all plates to zero.
-
void rhea_plate_velocity_generate_from_rotation(ymir_vec_t *vel, const double rot_axis[3], rhea_plate_options_t *opt)¶
Generates plate velocity at all coordinates in the plate’s interior from a rotational axis.
-
void rhea_plate_velocity_generate(ymir_vec_t *vel, const int plate_label, rhea_plate_options_t *opt)¶
Generates plate velocity at all coordinates in the plate’s interior from (Euler pole) data. Velocity is zero outside of the plate.
-
void rhea_plate_velocity_generate_all(ymir_vec_t *vel, rhea_plate_options_t *opt)¶
Generates velocities of all plates at all coordinates from (Euler pole) data. Velocity is zero if outside of any plate.
-
void rhea_plate_velocity_evaluate_rotation(double rot_axis[3], ymir_vec_t *vel, const int plate_label, const int project_out_mean_rot, rhea_plate_options_t *opt)¶
Computes the rotational axis of a plate from the given velocity
vel.
-
double rhea_plate_velocity_get_mean_magnitude(ymir_vec_t *vel, const int plate_label, const int project_out_mean_rot, rhea_plate_options_t *opt)¶
Computes the mean velocity of a plate from the given velocity
vel.
-
void rhea_plate_velocity_get_mean_magnitude_all(double *mean_vel_magn, ymir_vec_t *vel, const int *plate_label, const int project_out_mean_rot, rhea_plate_options_t *opt)¶
Computes mean velocities of all plates from the given velocity
vel.
-
void rhea_plate_velocity_project_out_mean_rotation(ymir_vec_t *vel, rhea_plate_options_t *opt)¶
Removes mean rotation (or net rotation) from a velocity field.
-
struct rhea_plate_options¶
Public Members
-
int n_polygons¶
-
char *vertices_file_path_txt¶
-
int n_vertices_total¶
-
char *vertices_coarse_container_file_path_txt¶
-
int n_vertices_coarse_total¶
-
float **vertices_x¶
-
float **vertices_y¶
-
size_t *n_vertices¶
-
float **vertices_coarse_container_x¶
-
float **vertices_coarse_container_y¶
-
size_t *n_vertices_coarse_container¶
-
float *translation_x¶
-
float *translation_y¶
-
float x_min¶
-
float x_max¶
-
float y_min¶
-
float y_max¶
-
double *angular_velocity¶
-
char *xsection_boundary_lon_list¶
-
float *xsection_boundary¶
-
char *xsection_tangential_velocity_mm_yr_list¶
-
double *xsection_tangential_velocity¶
-
int xsection_n_intervals¶
-
double xsection_shrink_factor¶
-
rhea_domain_options_t *domain_options¶
-
rhea_temperature_options_t *temp_options¶
-
int n_polygons¶
rhea_topography.h [source]¶
Typedefs
-
typedef struct rhea_topography_options rhea_topography_options_t¶
Enums
Functions
-
void rhea_topography_add_options(ymir_options_t *opt_sup)¶
Defines options and adds them as sub-options.
-
void rhea_topography_process_options(rhea_topography_options_t *opt, rhea_domain_options_t *domain_options)¶
Processes options and stores them.
-
int rhea_topography_exists(rhea_topography_options_t *opt)¶
Checks whether a topography exists for the given set of options.
-
ymir_vec_t *rhea_topography_new(ymir_mesh_t *ymir_mesh)¶
Creates a new topography vector.
-
void rhea_topography_destroy(ymir_vec_t *topography)¶
Destroys a topography vector.
-
int rhea_topography_check_vec_type(ymir_vec_t *vec)¶
Checks whether a vector is of the right type.
-
int rhea_topography_is_valid(ymir_vec_t *vec)¶
Checks entries of a vector.
-
void rhea_topography_data_create(rhea_topography_options_t *opt, sc_MPI_Comm mpicomm)¶
Allocates and performs the setup of topography data.
-
void rhea_topography_data_clear(rhea_topography_options_t *opt)¶
Clears storage of topography data.
-
double rhea_topography_displacement_node(int *nearest_label, double x, double y, double z, rhea_topography_options_t *opt)¶
Calculates topography displacement for a single point with coordinates (x,y,z).
-
void rhea_topography_displacement_vec(ymir_vec_t *displacement, rhea_topography_options_t *opt)¶
Fills values of a vector with displacement calculations.
-
struct rhea_topography_options¶
Public Members
-
rhea_topography_t type¶
-
char *points_file_path_bin¶
-
char *points_file_path_txt¶
-
char *labels_file_path_bin¶
-
char *labels_file_path_txt¶
-
char *displacements_file_path_bin¶
-
char *displacements_file_path_txt¶
-
int n_points¶
-
char *write_points_file_path_bin¶
-
char *write_labels_file_path_bin¶
-
char *write_displacements_file_path_bin¶
-
rhea_pointcloud_topography_t *pointcloud¶
-
rhea_domain_options_t *domain_options¶
-
rhea_topography_t type¶