From d05916706be377bc41599f7d5ebc9e56993dd534 Mon Sep 17 00:00:00 2001 From: Nicolas Riel Date: Thu, 28 Nov 2024 17:10:34 +0100 Subject: [PATCH] corrected mistake forbidding negative O content (reduced conditions) --- julia/MAGEMin_wrappers.jl | 2 +- src/TC_database/TC_init_database.c | 2 +- src/initialize.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/julia/MAGEMin_wrappers.jl b/julia/MAGEMin_wrappers.jl index 80f436a..6e304de 100644 --- a/julia/MAGEMin_wrappers.jl +++ b/julia/MAGEMin_wrappers.jl @@ -900,7 +900,7 @@ function convertBulk4MAGEMin(bulk_in::T1,bulk_in_ox::Vector{String},sys_in::Stri MAGEMin_bulk[c[id0]] .= 1e-4; end - id1 = findall(MAGEMin_bulk[d] .< 2e-5) + id1 = findall(MAGEMin_bulk[d] .< 2e-5 .&& MAGEMin_bulk[d] .> -2e-5) if ~isempty(id1) MAGEMin_bulk[d[id1]] .= 0.0; end diff --git a/src/TC_database/TC_init_database.c b/src/TC_database/TC_init_database.c index 3cf20fb..152e909 100644 --- a/src/TC_database/TC_init_database.c +++ b/src/TC_database/TC_init_database.c @@ -1490,7 +1490,7 @@ global_variable get_bulk_metapelite_ext( global_variable gv) { gv.bulk_rock[5] = 1.7686; /** K2O */ gv.bulk_rock[6] = 2.4820; /** Na2O */ gv.bulk_rock[7] = 0.6393; /** TiO2 */ - gv.bulk_rock[8] = 0.1; /** O */ + gv.bulk_rock[8] = -0.5; /** O */ gv.bulk_rock[9] = 0.0630; /** MnO */ gv.bulk_rock[10] = 10.0; /** H2O */ gv.bulk_rock[11] = 10.0; /** CO2 */ diff --git a/src/initialize.c b/src/initialize.c index ee70b54..707ce20 100644 --- a/src/initialize.c +++ b/src/initialize.c @@ -874,7 +874,8 @@ bulk_info reset_z_b_bulk( global_variable gv, for (i = 0; i < gv.len_ox; i++) { z_b.zEl_array[i] = 0.0; z_b.bulk_rock[i] = gv.bulk_rock[i]; - if (gv.bulk_rock[i] > 0.0){ + // if (gv.bulk_rock[i] > 0.0){ + if (gv.bulk_rock[i] != 0.0){ sum += 1; } }