State: Temperature, Velocity, Pressure¶
rhea_temperature.h [source]¶
Defines
-
RHEA_TEMPERATURE_SECONDS_PER_YEAR (31557600.0)¶
Typedefs
-
typedef struct rhea_temperature_options rhea_temperature_options_t¶
Enums
Functions
-
void rhea_temperature_add_options(ymir_options_t *opt_sup)¶
Defines options and adds them as sub-options.
-
void rhea_temperature_add_options_sinker(ymir_options_t *opt_sup)¶
-
void rhea_temperature_add_options_plume(ymir_options_t *opt_sup)¶
-
void rhea_temperature_process_options(rhea_temperature_options_t *opt, rhea_domain_options_t *domain_options)¶
Processes options and stores them.
-
double rhea_temperature_get_dim_K(rhea_temperature_options_t *opt)¶
Gets the scaling factor to convert nondimensional temperature to the corresponding dimensional quantity. Unit: [K]
-
double rhea_temperature_activation_energy_get_dim_J_mol(rhea_temperature_options_t *opt)¶
Gets the scaling factor to convert a nondimensional activation energy (Arrhenius relationship) to the corresponding dimensional quantity. Unit: [J/mol]
-
ymir_vec_t *rhea_temperature_new(ymir_mesh_t *ymir_mesh)¶
Creates a new temperature vector.
-
void rhea_temperature_destroy(ymir_vec_t *temperature)¶
Destroys a temperature vector.
-
void rhea_temperature_convert_to_dimensional_K(ymir_vec_t *temperature, rhea_temperature_options_t *opt)¶
Converts entries of a nondimensional temperature vector into dimensional values. Unit: [K]
-
int rhea_temperature_check_vec_type(ymir_vec_t *vec)¶
Checks whether a vector is of the right type.
-
int rhea_temperature_is_valid(ymir_vec_t *vec)¶
Checks entries of a vector.
-
MPI_Offset *rhea_temperature_segment_offset_create(ymir_vec_t *vec)¶
Gets rank-global offsets or rank-local sizes of a distributed vector for each MPI-rank.
-
MPI_Offset rhea_temperature_segment_offset_get(ymir_vec_t *vec)¶
-
int rhea_temperature_segment_size_get(ymir_vec_t *vec)¶
-
int rhea_temperature_write(char *file_path_bin, ymir_vec_t *temperature, sc_MPI_Comm mpicomm)¶
Writes temperature to binary file.
-
void rhea_temperature_bound(ymir_vec_t *temperature)¶
Bounds temperature vector to valid interval.
-
void rhea_temperature_bound_mat(sc_dmatrix_t *temperature_mat)¶
-
double *rhea_temperature_get_elem_gauss(sc_dmatrix_t *temp_el_mat, ymir_vec_t *temp_vec, const ymir_locidx_t elid)¶
Gets the temperature of one element at Gauss nodes.
-
void rhea_temperature_compute(ymir_vec_t *temperature, rhea_temperature_options_t *opt)¶
Computes the temperature.
-
void rhea_temperature_background_compute(ymir_vec_t *back_temperature, rhea_temperature_options_t *opt)¶
Computes the background temperature.
-
void rhea_temperature_add_rhs_vel(ymir_vec_t *rhs_vel, ymir_vec_t *temperature, rhea_temperature_options_t *opt)¶
Computes and adds velocity right-hand side in (primal) function space, given a temperature vector.
-
struct rhea_temperature_options¶
Public Members
-
rhea_temperature_t type¶
-
double neutral¶
-
double scale¶
-
double shift¶
-
char *import_path_txt¶
-
char *import_path_bin¶
-
double cold_plate_model_plate_age_yr¶
-
double thermal_expansivity_1_k¶
-
double thermal_diffusivity_m2_s¶
-
double temperature_difference_K¶
-
double gas_constant_J_Kmol¶
-
int sinker_active¶
-
int sinker_random_count¶
-
double sinker_decay¶
-
double sinker_width¶
-
double sinker_scaling¶
-
double sinker_center_x¶
-
double sinker_center_y¶
-
double sinker_center_z¶
-
double sinker_dilatation¶
-
double sinker_translation_x¶
-
double sinker_translation_y¶
-
double sinker_translation_z¶
-
double sinker_radius_scale¶
-
double sinker_radius_shift¶
-
int plume_active¶
-
int plume_random_count¶
-
double plume_decay¶
-
double plume_width¶
-
double plume_scaling¶
-
double plume_center_x¶
-
double plume_center_y¶
-
double plume_center_z¶
-
double plume_dilatation¶
-
double plume_translation_x¶
-
double plume_translation_y¶
-
double plume_translation_z¶
-
double plume_radius_scale¶
-
double plume_radius_shift¶
-
double rhs_scaling¶
-
double lower_mantle_rhs_scaling¶
-
rhea_domain_options_t *domain_options¶
-
rhea_temperature_t type¶
rhea_velocity.h [source]¶
Typedefs
-
typedef struct rhea_velocity_rhs_compute_data rhea_velocity_rhs_compute_data_t¶
-
typedef void (*rhea_velocity_rhs_compute_fn_t)(ymir_vec_t *rhs_vel, ymir_vec_t *temperature, ymir_vec_t *composition, void *data)¶
-
typedef void (*rhea_velocity_rhs_nz_dir_compute_fn_t)(ymir_vec_t *rhs_vel_nonzero_dirichlet, void *data)¶
-
typedef void (*rhea_velocity_rhs_nz_neu_compute_fn_t)(ymir_vec_t **rhs_vel_face_nonzero_neumann, void *data)¶
Functions
-
double rhea_velocity_get_dim_m_s(rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
Gets the scaling factor to convert nondimensional values to corresponding dimensional quantities. Unit: [m/s] Unit: [cm/yr] Unit: [mm/yr]
-
double rhea_velocity_get_dim_cm_yr(rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
-
double rhea_velocity_get_dim_mm_yr(rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
-
ymir_vec_t *rhea_velocity_new(ymir_mesh_t *ymir_mesh)¶
Creates a new velocity vector.
-
void rhea_velocity_destroy(ymir_vec_t *velocity)¶
Destroys a velocity vector.
-
void rhea_velocity_convert_to_dimensional_m_s(ymir_vec_t *velocity, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
Converts entries of a nondimensional velocity vector into dimensional values: Unit: [m/s] Unit: [cm/yr] Unit: [mm/yr]
-
void rhea_velocity_convert_to_dimensional_cm_yr(ymir_vec_t *velocity, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
-
void rhea_velocity_convert_to_dimensional_mm_yr(ymir_vec_t *velocity, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
-
int rhea_velocity_check_vec_type(ymir_vec_t *vec)¶
Checks whether a vector is of the right type.
-
int rhea_velocity_is_valid(ymir_vec_t *vec)¶
Checks entries of a vector.
-
void rhea_velocity_interpolate_from_surface(ymir_vec_t *vel_vol, ymir_vec_t *vel_surf, const int mass_weighted)¶
Interpolates velocity from surface to volume.
-
MPI_Offset *rhea_velocity_segment_offset_create(ymir_vec_t *vec)¶
Gets rank-global offsets or rank-local sizes of a distributed vector for each MPI-rank
-
MPI_Offset rhea_velocity_segment_offset_get(ymir_vec_t *vec)¶
-
int rhea_velocity_segment_size_get(ymir_vec_t *vec)¶
-
void rhea_velocity_remove_mass(ymir_vec_t *vel)¶
Inverts (lumped) mass matrix.
-
ymir_vec_t *rhea_velocity_surface_new(ymir_mesh_t *ymir_mesh)¶
Creates a new velocity vector at surface.
-
void rhea_velocity_surface_destroy(ymir_vec_t *vel_surf)¶
Destroys a velocity vector at surface.
-
int rhea_velocity_surface_check_vec_type(ymir_vec_t *vec)¶
Checks whether a vector is of the right type.
-
int rhea_velocity_surface_is_valid(ymir_vec_t *vec)¶
Checks entries of a vector.
-
ymir_vec_t *rhea_velocity_surface_new_from_vol(ymir_vec_t *vel_vol)¶
Creates a new velocity vector at surface with values interpolated from a velocity volume vector.
-
void rhea_velocity_surface_interpolate(ymir_vec_t *vel_surf, ymir_vec_t *vel_vol)¶
Interpolates velocity from volume to surface.
-
void rhea_velocity_get_elem_gll(sc_dmatrix_t *vel_el_mat, ymir_vec_t *vel_vec, const ymir_locidx_t elid)¶
Gets the velocity of one element at GLL nodes.
-
void rhea_velocity_nonzero_boundary_set_face_normals(ymir_vec_t *vel_nonzero_boundary, double normal_flow_vel[RHEA_DOMAIN_BOUNDARY_FACE_N])¶
Sets nonzero normal velocity at boundaries of a recangular domain, where a constant normal velocity is specified by an entry in the array
normal_flow_vel.In addition, a corresponding callback function for
rhea_stokes_problemis provided.
-
void rhea_velocity_nonzero_boundary_set_face_normals_fn(ymir_vec_t *vel_nonzero_boundary, void *data)¶
-
void rhea_velocity_rhs_compute(ymir_vec_t *rhs_vel, ymir_vec_t *temperature, ymir_vec_t *composition, void *data)¶
-
void rhea_velocity_stats_get_global(double *magn_min_mm_yr, double *magn_max_mm_yr, double *magn_mean_mm_yr, ymir_vec_t *velocity, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
Computes global velocity statistics.
-
void rhea_velocity_stats_get_global_lithosphere(double *magn_max_mm_yr, double *magn_mean_mm_yr, ymir_vec_t *velocity, ymir_vec_t *viscosity, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
-
void rhea_velocity_stats_get_global_surface(double *magn_min_mm_yr, double *magn_max_mm_yr, double *magn_mean_mm_yr, ymir_vec_t *vel_vol, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
Computes global velocity statistics at the surface.
-
void rhea_velocity_stats_get_global_surface_lithosphere(double *magn_max_mm_yr, double *magn_mean_mm_yr, ymir_vec_t *vel_vol, ymir_vec_t *visc_vol, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options)¶
-
struct rhea_velocity_rhs_compute_data¶
rhea_pressure.h [source]¶
Functions
-
ymir_vec_t *rhea_pressure_new(ymir_mesh_t *ymir_mesh, ymir_pressure_elem_t *press_elem)¶
Creates a new pressure vector.
-
void rhea_pressure_destroy(ymir_vec_t *pressure)¶
Destroys a pressure vector.
-
void rhea_pressure_convert_to_dimensional_Pa(ymir_vec_t *pressure, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options, rhea_viscosity_options_t *visc_options)¶
Converts entries of a nondimensional pressure vector into dimensional values:
[Pa]
-
int rhea_pressure_check_vec_type(ymir_vec_t *vec, ymir_pressure_elem_t *press_elem)¶
Checks whether a vector is of the right type.
-
int rhea_pressure_is_valid(ymir_vec_t *vec)¶
Checks entries of a vector.
-
MPI_Offset *rhea_pressure_segment_offset_create(ymir_vec_t *vec)¶
Gets rank-global offsets or rank-local sizes of a distributed vector for each MPI-rank.
-
MPI_Offset rhea_pressure_segment_offset_get(ymir_vec_t *vec)¶
-
int rhea_pressure_segment_size_get(ymir_vec_t *vec)¶
-
double rhea_pressure_compute_mean(ymir_vec_t *pressure, ymir_pressure_elem_t *press_elem)¶
Computes global mean value.
-
int rhea_pressure_project_out_mean(ymir_vec_t *pressure, ymir_pressure_elem_t *press_elem)¶
Projects out global mean value.
-
void rhea_pressure_remove_mass(ymir_vec_t *press, ymir_pressure_elem_t *press_elem)¶
Inverts (lumped) mass matrix.
-
void rhea_pressure_stats_get_global(double *abs_min_Pa, double *abs_max_Pa, double *mean_Pa, ymir_vec_t *pressure, ymir_pressure_elem_t *press_elem, rhea_domain_options_t *domain_options, rhea_temperature_options_t *temp_options, rhea_viscosity_options_t *visc_options)¶
Computes global pressure statistics.
rhea_velocity_pressure.h [source]¶
Functions
-
ymir_vec_t *rhea_velocity_pressure_new(ymir_mesh_t *ymir_mesh, ymir_pressure_elem_t *press_elem)¶
Creates a new (velocity,pressure) vector.
-
void rhea_velocity_pressure_destroy(ymir_vec_t *velocity_pressure)¶
Destroys a (velocity,pressure) vector.
-
int rhea_velocity_pressure_check_vec_type(ymir_vec_t *vec)¶
Checks whether a vector is of the right type.
-
int rhea_velocity_pressure_is_valid(ymir_vec_t *vec)¶
Checks entries of a vector.
-
int rhea_velocity_pressure_create_components(ymir_vec_t **vel, ymir_vec_t **press, ymir_vec_t *vel_press, ymir_pressure_elem_t *press_elem)¶
Creates velocity and pressure vectors and gets data of each component from a combined velocity-pressure vector. Tries to obtain a view onto the data if possible.
-
void rhea_velocity_pressure_copy_components(ymir_vec_t *vel, ymir_vec_t *press, ymir_vec_t *vel_press, ymir_pressure_elem_t *press_elem)¶
Copies velocity and pressure from a combined velocity-pressure vector.
-
void rhea_velocity_pressure_set_components(ymir_vec_t *vel_press, ymir_vec_t *vel, ymir_vec_t *press, ymir_pressure_elem_t *press_elem)¶
Copies velocity and pressure to a combined velocity-pressure vector.
-
int rhea_velocity_pressure_read(ymir_vec_t *vel_press, char *vel_file_path_bin, char *press_file_path_bin, ymir_pressure_elem_t *press_elem, sc_MPI_Comm mpicomm)¶
Reads velocity and pressure from binary files.
-
int rhea_velocity_pressure_write(char *vel_file_path_bin, char *press_file_path_bin, ymir_vec_t *vel_press, ymir_pressure_elem_t *press_elem, sc_MPI_Comm mpicomm)¶
Writes velocity and pressure to binary files.