From 2c888f20b50c7a8e2628a08b10eeb8578330fa0d Mon Sep 17 00:00:00 2001 From: Xiansheng Cai Date: Thu, 24 Nov 2022 21:33:04 -0500 Subject: [PATCH] wip --- example/compositemesh.jl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/example/compositemesh.jl b/example/compositemesh.jl index 194d79d..6a316be 100644 --- a/example/compositemesh.jl +++ b/example/compositemesh.jl @@ -14,7 +14,7 @@ br = BZMeshes.Cell(lattice=lattice, atoms=atoms, positions=positions) _dispersion(k) = -sum(cos.(k)) + 0.1 # _dispersion(k) = dot(k, k) - π^2 / 4 -T = 0.1 +T = 0.001 function dispersion(k) # constrain to 1st bz @@ -39,24 +39,25 @@ function int_mesh(mesh) return integrate(data, mesh) end -N = 16 +N = 8 bound = [-π, π] theta = SimpleGrid.Uniform(bound, N; isperiodic=true) # bzmesh = BZMeshes.PolarMesh(dispersion=dispersion, anglemesh=theta, cell=br, # kmax=π, Nloggrid=5, Nbasegrid=4, minterval=0.001) pm = BZMeshes.CompositePolarMesh(dispersion=dispersion, anglemesh=theta, cell=br, basegridtype=:uniform, - kmax=π * sqrt(2.1), Nloggrid=12, Nbasegrid=2, minterval=0.1T, N=4) + kmax=π * sqrt(2.4), Nloggrid=8, Nbasegrid=3, minterval=0.1T, N=4) pm2 = BZMeshes.CompositePolarMesh(dispersion=dispersion, anglemesh=theta, cell=br, basegridtype=:uniform, - kmax=π * sqrt(2.1), Nloggrid=8, Nbasegrid=4, minterval=0.5T, N=6) + kmax=π * sqrt(2.4), Nloggrid=10, Nbasegrid=6, minterval=0.01T, N=6) println("N=$(length(pm)), ", int_mesh(pm)) println("N=$(length(pm2)), ", int_mesh(pm2)) -um = BZMeshes.UniformBZMesh(cell=br, size=(1000, 1000)) -um2 = BZMeshes.UniformBZMesh(cell=br, size=(2000, 2000)) +Nuni = 1000 +um = BZMeshes.UniformBZMesh(cell=br, size=(Nuni, Nuni)) +um2 = BZMeshes.UniformBZMesh(cell=br, size=(2Nuni, 2Nuni)) println("N=$(length(um)), ", int_mesh(um)) println("N=$(length(um2)), ", int_mesh(um2)) \ No newline at end of file