Skip to content

Commit

Permalink
MAGEMin_C v1.6.8 (#66)
Browse files Browse the repository at this point in the history
- Corrected issue when deactivating solution phase model that was leading to incorrect phase list
  • Loading branch information
NicolasRiel authored Dec 27, 2024
1 parent 5069c74 commit c6e989f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MAGEMin_C"
uuid = "e5d170eb-415a-4524-987b-12f1bce1ddab"
authors = ["Nicolas Riel <[email protected]> & Boris Kaus <[email protected]>"]
version = "1.6.7"
version = "1.6.8"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand Down
15 changes: 12 additions & 3 deletions julia/MAGEMin_wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,16 @@ function point_wise_minimization( P ::Float64,
LibMAGEMin.reset_SS(gv,z_b, DB.SS_ref_db)
LibMAGEMin.reset_sp(gv, DB.sp)

if ~isnothing(rm_list)
# if the list of phase to be removed is not empty then we first activate all combination
# the following entries are set to 2, as only values of 0 or 1 are considered in the C code
# i.e. that all phases are first set active before removing the ones in the list (with expection of the restricted ones)
gv.mbCpx = 2
gv.mbIlm = 2
gv.mpSp = 2
gv.mpIlm = 2
end

gv = LibMAGEMin.ComputeG0_point(gv.EM_database, z_b, gv, DB.PP_ref_db,DB.SS_ref_db);


Expand All @@ -1071,14 +1081,13 @@ function point_wise_minimization( P ::Float64,
flags_off = zeros(Int32,5);
if i in rm_list
unsafe_copyto!(SS_ref_db[i].ss_flags,pointer(flags_off), 5)
else
unsafe_copyto!(SS_ref_db[i].ss_flags,pointer(flags_on), 5)
# else
# unsafe_copyto!(SS_ref_db[i].ss_flags,pointer(flags_on), 5)
end
end

end


# here we can over-ride default W's
if ~isnothing(W)
if gv.EM_database == W.database # check if the database fit
Expand Down
2 changes: 1 addition & 1 deletion src/initialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ global_variable global_variable_alloc( bulk_info *z_b ){
}

strcpy(gv.outpath,"./output/"); /** define the outpath to save logs and final results file */
strcpy(gv.version,"1.6.1 [28/11/2024]"); /** MAGEMin version */
strcpy(gv.version,"1.6.3 [05/01/2025]"); /** MAGEMin version */

/* generate parameters */
strcpy(gv.buffer,"none");
Expand Down

0 comments on commit c6e989f

Please sign in to comment.