Skip to content

Commit

Permalink
Merge pull request #117 from SotaYoshida/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
SotaYoshida authored Mar 5, 2024
2 parents 0dfd2a1 + 953cffc commit e37f721
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NuclearToolkit"
uuid = "89bb3bae-bcec-43ae-87b7-9dd181dc6334"
authors = ["SotaYoshida <[email protected]> and contributors"]
version = "0.4.1"
version = "0.4.2"

[deps]
Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
Expand Down
18 changes: 12 additions & 6 deletions src/ShellModel/eigenvector_continuation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ function readRvecs!(mdim,inpf,tJ,vecs,wfinfos;num=100)
end

function prepEC(Hs,target_nuc,num_ev,num_ECsample,tJ,mode;
num_history=3,lm=100,ls=15,tol=1.e-9,q=1,
num_history=3,lm=400,ls=15,tol=1.e-9,q=1,
path_to_samplewav="",calc_moment=true,
save_wav = false,tdmatdir="./tdmat/",
gfactors = [1.0,0.0,5.586,-3.826],
effcharge=[1.5,0.5],debugmode=false,doublelanczos=true)
effcharge=[1.5,0.5],debugmode=false,doublelanczos=true,is_show=false)
to = TimerOutput()
sntf = Hs[1]
Anum = parse(Int64, match(reg,target_nuc).match)
Expand Down Expand Up @@ -292,7 +292,9 @@ function prepEC(Hs,target_nuc,num_ev,num_ECsample,tJ,mode;
close(io)
end
end
show_TimerOutput_results(to)
if is_show
show_TimerOutput_results(to)
end
return nothing
end

Expand Down Expand Up @@ -448,7 +450,9 @@ function solveEC(Hs,target_nuc,tJNs;
if length(Hs) > 1 && exact_logf != ""
@timeit to "scatter plot" plot_EC_scatter(target_nuc,Hs,sumV,tJNs,Dims,exlines)
end
show_TimerOutput_results(to)
if is_show
show_TimerOutput_results(to)
end
return nothing
end

Expand Down Expand Up @@ -583,8 +587,10 @@ function solveEC_UQ(Hs,target_nuc,tJNs,Erefs,errors;
# "std: ", @sprintf("%10.4f ", std([iThetas[i][n] for i =1:Ns])))
#end
println(tx)
write_history(iThetas,Ts,llhs,tJNs,Ens)
show_TimerOutput_results(to)
write_history(iThetas,Ts,llhs,tJNs,Ens)
if is_show
show_TimerOutput_results(to)
end
println("")
return nothing
end
Expand Down
1 change: 0 additions & 1 deletion src/ShellModel/lanczos_methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ function Jlanczos(Jvs,Jmat,TF,JTF,Jtol,Jvret,pbits,nbits,tdims,eval_jj,
ReORTH(it,vkp1,svs)

beta = sqrt(dot(vkp1,vkp1))
println(" betaJ $beta")
#if beta < 1.e-4;eljit=it;TF[1]=true;JTF[1]=true;break;end
vkp1 .*= 1.0/beta
Jmat[it+1,it] = beta; Jmat[it,it+1] = beta
Expand Down
4 changes: 2 additions & 2 deletions test/HFMBPT_IMSRG_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
@testset "testing DMD" begin
nuc = "He4"; emax = 2; hw = 20
s_pred = [30.0, 50.0]
ds = 0.25; smin = 15.0
ds = 0.5; smin = 15.0
# generating Omega
sntf = "tbme_emn500n4lo_2n3n_srg10.0hw20emax2.snt.bin"
pid = getpid()
Expand All @@ -73,4 +73,4 @@
end
end

end
end
4 changes: 2 additions & 2 deletions test/ShellModel_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
end

@testset "Testing EC on shell model" begin
target_nuc = "O18"
target_nuc = "O20"
num_ev = 3
targetJ = 0
sntpath = "interaction_file/random_snts/"
Expand All @@ -57,7 +57,7 @@ end
@test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath,save_wav=true) == nothing

println("make TDmat...")
num_ECsamples = length(Hs)
num_ECsample = length(Hs)
mode = "TD"
@test prepEC(Hs,target_nuc,num_ev,num_ECsample,targetJ,mode;path_to_samplewav=spath) == nothing

Expand Down
4 changes: 2 additions & 2 deletions test/parameters/optional_parameters_forDMD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ chi_order = 3; pottype="em500n3lo"

### --- IMSRG ---
smax = 500.0
dsmax = 0.25
dsmax = 0.5
denominatorDelta=0.0
BetaCM = 0.0
magnusmethod="NS"
magnusmethod="NS"
16 changes: 16 additions & 0 deletions test/parameters/optional_parameters_forDMD.jl~
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
###--- ChiralEFT ---
n_mesh = 50
emax = 2
calc_NN = true
calc_3N = false
hw = 20.0
srg = false
tbme_fmt = "snt.bin"
chi_order = 3; pottype="em500n3lo"

### --- IMSRG ---
smax = 500.0
dsmax = 0.25
denominatorDelta=0.0
BetaCM = 0.0
magnusmethod="NS"
3 changes: 0 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ using Test
using Printf

@testset "NuclearToolkit.jl" begin
println("pwd: ", pwd())
println("readdir() ",readdir("interaction_file"))

include("chiEFTint_test.jl")
include("HFMBPT_IMSRG_test.jl")
include("ShellModel_test.jl")
Expand Down

0 comments on commit e37f721

Please sign in to comment.