diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 79a90e8..1347df3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,7 +3,7 @@ on: push: branches: - master - tags: '*' + tags: "*" pull_request: concurrency: # Skip intermediate builds: always. @@ -18,8 +18,8 @@ jobs: fail-fast: false matrix: version: - - '1.6' - - 'nightly' + - "1.6" + - "nightly" os: - ubuntu-latest arch: @@ -54,7 +54,7 @@ jobs: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 with: - version: '1' + version: "1" - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-docdeploy@v1 env: @@ -63,6 +63,6 @@ jobs: - run: | julia --project=docs -e ' using Documenter: DocMeta, doctest - using SpaceGrid - DocMeta.setdocmeta!(SpaceGrid, :DocTestSetup, :(using SpaceGrid); recursive=true) - doctest(SpaceGrid)' + using BZMeshes + DocMeta.setdocmeta!(BZMeshes, :DocTestSetup, :(using BZMeshes); recursive=true) + doctest(BZMeshes)' diff --git a/.gitignore b/.gitignore index d4289a5..7e1ff91 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ Manifest.toml *.png *.pdf run + +*.pb.gz +.history \ No newline at end of file diff --git a/Project.toml b/Project.toml index 908e253..0a66aea 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ -name = "SpaceGrid" -uuid = "3d4565c3-192b-4227-89f7-5476f913ab49" -authors = ["Tao Wang", "Xiansheng Cai"] +name = "BZMeshes" +uuid = "d3690ab3-6367-44d6-ab08-b07ed981380e" +authors = ["Xiansheng Cai", "Tao Wang", "Kun Chen"] version = "0.1.0" [deps] diff --git a/README.md b/README.md index 0934fe3..2bdc9a5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# SpaceGrid +# BZMeshes -[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://numericalEFT.github.io/SpaceGrid.jl/stable) -[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://numericalEFT.github.io/SpaceGrid.jl/dev) -[![Build Status](https://github.com/numericalEFT/SpaceGrid.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/numericalEFT/SpaceGrid.jl/actions/workflows/CI.yml?query=branch%3Amaster) -[![Coverage](https://codecov.io/gh/numericalEFT/SpaceGrid.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/numericalEFT/SpaceGrid.jl) +[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://numericalEFT.github.io/BZMeshes.jl/stable) +[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://numericalEFT.github.io/BZMeshes.jl/dev) +[![Build Status](https://github.com/numericalEFT/BZMeshes.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/numericalEFT/BZMeshes.jl/actions/workflows/CI.yml?query=branch%3Amaster) +[![Coverage](https://codecov.io/gh/numericalEFT/BZMeshes.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/numericalEFT/BZMeshes.jl) diff --git a/docs/Project.toml b/docs/Project.toml index a2ec2a4..4955e15 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,3 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -SpaceGrid = "3d4565c3-192b-4227-89f7-5476f913ab49" +BZMeshes = "3d4565c3-192b-4227-89f7-5476f913ab49" diff --git a/docs/make.jl b/docs/make.jl index 93f9935..20bfbbe 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,24 +1,24 @@ -using SpaceGrid +using BZMeshes using Documenter -DocMeta.setdocmeta!(SpaceGrid, :DocTestSetup, :(using SpaceGrid); recursive=true) +DocMeta.setdocmeta!(BZMeshes, :DocTestSetup, :(using BZMeshes); recursive=true) makedocs(; - modules=[SpaceGrid], - authors="Tao Wang, Xiansheng Cai", - repo="https://github.com/fsxbhyy/SpaceGrid.jl/blob/{commit}{path}#{line}", - sitename="SpaceGrid.jl", + modules=[BZMeshes], + authors="Xiansheng Cai, Tao Wang and Kun Chen", + repo="https://github.com/numericaleft/BZMeshes.jl/blob/{commit}{path}#{line}", + sitename="BZMeshes.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true", - canonical="https://fsxbhyy.github.io/SpaceGrid.jl", - assets=String[], + canonical="https://numericaleft.github.io/BZMeshes.jl", + assets=String[] ), pages=[ "Home" => "index.md", - ], + ] ) deploydocs(; - repo="github.com/numericalEFT/SpaceGrid.jl", - devbranch="master", + repo="github.com/numericalEFT/BZMeshes.jl", + devbranch="master" ) diff --git a/docs/src/index.md b/docs/src/index.md index 7be81a1..4141330 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,14 +1,14 @@ ```@meta -CurrentModule = SpaceGrid +CurrentModule = BZMeshes ``` -# SpaceGrid +# BZMeshes -Documentation for [SpaceGrid](https://github.com/fsxbhyy/SpaceGrid.jl). +Documentation for [BZMeshes](https://github.com/fsxbhyy/BZMeshes.jl). ```@index ``` ```@autodocs -Modules = [SpaceGrid] +Modules = [BZMeshes] ``` diff --git a/example/barychebtests.jl b/example/barychebtests.jl index 40cbadf..3eb88c6 100644 --- a/example/barychebtests.jl +++ b/example/barychebtests.jl @@ -1,7 +1,7 @@ using CodeTracking -using SpaceGrid -using SpaceGrid.AbstractTrees, SpaceGrid.GridTree, SpaceGrid.BaseMesh, SpaceGrid.BaryCheb +using BZMeshes +using BZMeshes.AbstractTrees, BZMeshes.GridTree, BZMeshes.BaseMesh, BZMeshes.BaryCheb macro expr2fn(fname, expr, args...) fn = quote @@ -15,7 +15,7 @@ macro expr2fn(fname, expr, args...) return fn end -function test1D(f, F; Ni = 3, Nf = 12) +function test1D(f, F; Ni=3, Nf=12) for n in Ni:Nf bc = BaryCheb.BaryCheb1D(n) @@ -37,7 +37,7 @@ test1D(x -> (cos(x)), x -> (sin(x))) x0 = 1.5 println("ln(x+x0) <-> (x+x0)ln(x+x0)-x") -test1D(x -> (log(x+x0)), x -> ((x+x0)*log(x+x0)-x)) +test1D(x -> (log(x + x0)), x -> ((x + x0) * log(x + x0) - x)) println("x^4 <-> x^5/5") -test1D(x -> x^4, x -> x^5/5.0) +test1D(x -> x^4, x -> x^5 / 5.0) diff --git a/example/graphene_treetest.jl b/example/graphene_treetest.jl index e089c78..8f21c37 100644 --- a/example/graphene_treetest.jl +++ b/example/graphene_treetest.jl @@ -1,5 +1,5 @@ -using SpaceGrid -using SpaceGrid.AbstractTrees, SpaceGrid.GridTree, SpaceGrid.BaseMesh +using BZMeshes +using BZMeshes.AbstractTrees, BZMeshes.GridTree, BZMeshes.BaseMesh using Plots using LinearAlgebra @@ -20,7 +20,7 @@ function density(k; band=1) end latvec = [2 0; 1 sqrt(3)]' .* (2π) -# println(SpaceGrid.GridTree._calc_subpoints(3, [3,3], latvec, 2)) +# println(BZMeshes.GridTree._calc_subpoints(3, [3,3], latvec, 2)) # tg = treegridfromdensity(k -> density(k), latvec; atol=1 / 2^16, maxdepth=12, mindepth=1, N=6)#, type=:barycheb) tg = treegridfromdensity(k -> density(k), latvec; atol=1 / 2^10, maxdepth=12, mindepth=1, N=6)#, type=:barycheb) @@ -50,7 +50,7 @@ function green_real(k, n; band=1) ln = la.numatoms ϵ = dispersion(dim, ln, ham, k)[band] - μ - return - ϵ / ((π * T * (2*n + 1))^2 + ϵ^2) + return -ϵ / ((π * T * (2 * n + 1))^2 + ϵ^2) # return 1 / (exp((ϵ) / T) + 1.0) end diff --git a/example/triqs_bzmesh.jl b/example/triqs_bzmesh.jl index da1887d..5880e93 100644 --- a/example/triqs_bzmesh.jl +++ b/example/triqs_bzmesh.jl @@ -1,5 +1,5 @@ using PythonCall -using SpaceGrid +using BZMeshes gf = pyimport("triqs.gf") lat = pyimport("triqs.lattice") @@ -19,7 +19,7 @@ println(BZ.units) latvec = pyconvert(Array, BZ.units)[1:2, 1:2] println(latvec) -umesh = SpaceGrid.BaseMesh.UniformMesh{2, nk, SpaceGrid.BaseMesh.EdgedMesh}([0.0,0.0], latvec) +umesh = BZMeshes.BaseMesh.UniformMesh{2,nk,BZMeshes.BaseMesh.EdgedMesh}([0.0, 0.0], latvec) for (ip, p) in enumerate(mk) println(p, umesh[ip]) @@ -46,12 +46,12 @@ for p in mk inds = pyconvert(Array, p.index)[1:2] .+ 1 pval = pyconvert(Array, p.value) println(pval, umesh[inds...]) - data1[inds...] = pyconvert(ComplexF64, G_k_w.data[p.linear_index,0,0,0]) + data1[inds...] = pyconvert(ComplexF64, G_k_w.data[p.linear_index, 0, 0, 0]) end println(data0[1:8]) println(data1[1:8]) for i in 1:nk^2 - println(data0[i]≈data1[i]) + println(data0[i] ≈ data1[i]) end diff --git a/src/SpaceGrid.jl b/src/BZMeshes.jl similarity index 94% rename from src/SpaceGrid.jl rename to src/BZMeshes.jl index 791c225..8b72013 100644 --- a/src/SpaceGrid.jl +++ b/src/BZMeshes.jl @@ -1,4 +1,4 @@ -module SpaceGrid +module BZMeshes using AbstractTrees using StaticArrays diff --git a/test/runtests.jl b/test/runtests.jl index 7dbf907..12368b5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,9 +1,9 @@ -using SpaceGrid -using SpaceGrid.AbstractTrees, SpaceGrid.GridTree, SpaceGrid.BaseMesh, SpaceGrid.BaryCheb +using BZMeshes +using BZMeshes.AbstractTrees, BZMeshes.GridTree, BZMeshes.BaseMesh, BZMeshes.BaryCheb using LinearAlgebra, Random using Test -@testset "SpaceGrid.jl" begin +@testset "BZMeshes.jl" begin if isempty(ARGS)