toolkit
-
void print_help(global_variable gv)
[source] function to print help and give command line parameters
-
bulk_info retrieve_bulk_PT(global_variable gv, io_data *input_data, int sgleP, bulk_info z_b)
[source] retrieve bulk rock composition and PT compositions
-
void convert_system_comp(global_variable gv, char *sys_in, bulk_info z_b, double *bulk_rock)
[source] retrieve bulk rock composition and PT compositions This function is not used in the C version of MAGEMin, but can be called via the Julia wrapper MAGEMin_C to normalize the composition
-
double BrentRoots(double x1, double x2, double *data, double Tolerance, int mode, int maxIterations, double *valueAtRoot, int *niter, int *error)
[source] main Brent root finding routine
-
double euclidean_distance(double *array1, double *array2, int n)
[source] function to calculate the Euclidean distance between two normalized vectors - used to decypher which phase to add during phase update
-
void inverseMatrix(int *ipiv, double *A1, int n, double *work, int lwork)
[source] inverse a matrix using LAPACKE dgetrf and dgetri
-
int EndsWithTail(char *name, char *tail)
[source] compare last character of a string with a reference character - function to find out the Liquid endmembers, and remove them from considerations after levelling
-
void print_cp(global_variable gv, csd_phase_set *cp)
[source] function to print out considered phases structure
-
void print_SS_informations(global_variable gv, SS_ref SS_ref_db, int iss)
[source] rotate G-hyperplane using Gamma
-
SS_ref rotate_hyperplane(global_variable gv, SS_ref SS_ref_db)
[source] rotate G-hyperplane using Gamma
-
SS_ref raw_hyperplane(global_variable gv, SS_ref SS_ref_db, double *gb)
[source] raw G-hyperplane using Gamma
-
SS_ref restrict_SS_HyperVolume(global_variable gv, SS_ref SS_ref_db, double box_size)
[source] restrict solution phase hyper volume for local minimization
-
int getActiveSPhaseN(global_variable gv, PP_ref *PP_ref_db, SS_ref *SS_ref_db)
[source] retrieve the number of solution phase that are active
-
int getActivePhaseN(global_variable gv, PP_ref *PP_ref_db, SS_ref *SS_ref_db)
[source] retrieve the number of phases that are active
-
global_variable get_ss_id(global_variable gv, csd_phase_set *cp)
[source] get id of active solution phases
-
global_variable wave_melt_correction(global_variable gv, bulk_info z_b, double aspectRatio)
[source] Melt-fraction correction for P-wave and S-wave velocities The routine uses the reduction formulation of Clark et al., (2017) and is based on the equilibrium geometry model for the solid skeleton of Takei et al., 1997. * aspectRatio: Coefficient defining the geometry of the solid framework (contiguity): 0.0 (layered melt distributed) < 0.1 (grain boundary melt) < 1.0 (melt in separated bubble pockets)
printf(” Vp_Sol (harm) : %+12.5ft [km/s]n”,gv.solid_Vp); printf(” Vs_Sol (harm) : %+12.5ft [km/s]n”,gv.solid_Vs); gv.solid_Vs = anelastic_correction( 0,
gv.solid_Vs, z_b.P, z_b.T );
printf(” Vs_Sol (anel) : %+12.5ft [km/s]n”,gv.solid_Vs); if (gv.melt_fraction > 0.0){
- wave_melt_correction( gv.melt_bulkModulus,
gv.solid_bulkModulus, gv.solid_shearModulus, gv.melt_density, gv.solid_density, gv.solid_Vp, gv.solid_Vs, gv.melt_fraction, 0.1, gv.V_cor );
printf(”n Vp_Melt_cor : %+12.5ft [km/s]n”, gv.V_cor[0]); printf(” Vs_Melt_cor : %+12.5ft [km/s]n”, gv.V_cor[1]); printf(” Vp/Vs_Melt_cor : %+12.5ft [km/s]n”,gv.V_cor[0]/gv.V_cor[1]);
} printf(”n”);