From 7dd11deebea885104b263cbeeccd43bd18599266 Mon Sep 17 00:00:00 2001 From: Kun Chen Date: Mon, 19 Sep 2022 17:03:18 -0400 Subject: [PATCH 1/4] add pb.gz to gitignore --- .gitignore | 2 ++ .history/.gitignore_20220919170241 | 35 ++++++++++++++++++++++++++++ .history/.gitignore_20220919170301 | 37 ++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 .history/.gitignore_20220919170241 create mode 100644 .history/.gitignore_20220919170301 diff --git a/.gitignore b/.gitignore index d4289a5..6eca45e 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ Manifest.toml *.png *.pdf run + +*.pb.gz diff --git a/.history/.gitignore_20220919170241 b/.history/.gitignore_20220919170241 new file mode 100644 index 0000000..d4289a5 --- /dev/null +++ b/.history/.gitignore_20220919170241 @@ -0,0 +1,35 @@ + + +# Files generated by invoking Julia with --code-coverage +*.jl.cov +*.jl.*.cov + +# Files generated by invoking Julia with --track-allocation +*.jl.mem +*.jl.*.mem + +# System-specific files and directories generated by the BinaryProvider and BinDeps packages +# They contain absolute paths specific to the host computer, and so should not be committed +deps/deps.jl +deps/build.log +deps/downloads/ +deps/usr/ +deps/src/ + +# Build artifacts for creating documentation generated by the Documenter package +docs/build/ +docs/site/ +/run/ + +# File generated by Pkg, the package manager, based on a corresponding Project.toml +# It records a fixed state of all packages used by the project. As such, it should not be +# committed for packages, but should be committed for applications that require a static +# environment. +Manifest.toml + +*.DS_Store + +.ipynb_checkpoints +*.png +*.pdf +run diff --git a/.history/.gitignore_20220919170301 b/.history/.gitignore_20220919170301 new file mode 100644 index 0000000..6eca45e --- /dev/null +++ b/.history/.gitignore_20220919170301 @@ -0,0 +1,37 @@ + + +# Files generated by invoking Julia with --code-coverage +*.jl.cov +*.jl.*.cov + +# Files generated by invoking Julia with --track-allocation +*.jl.mem +*.jl.*.mem + +# System-specific files and directories generated by the BinaryProvider and BinDeps packages +# They contain absolute paths specific to the host computer, and so should not be committed +deps/deps.jl +deps/build.log +deps/downloads/ +deps/usr/ +deps/src/ + +# Build artifacts for creating documentation generated by the Documenter package +docs/build/ +docs/site/ +/run/ + +# File generated by Pkg, the package manager, based on a corresponding Project.toml +# It records a fixed state of all packages used by the project. As such, it should not be +# committed for packages, but should be committed for applications that require a static +# environment. +Manifest.toml + +*.DS_Store + +.ipynb_checkpoints +*.png +*.pdf +run + +*.pb.gz From f92a2e73f88d3f79435cbf89084332e6c0b17060 Mon Sep 17 00:00:00 2001 From: Kun Chen Date: Mon, 19 Sep 2022 17:03:58 -0400 Subject: [PATCH 2/4] remove history --- .gitignore | 1 + .history/.gitignore_20220919170241 | 35 ---------------------------- .history/.gitignore_20220919170301 | 37 ------------------------------ 3 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 .history/.gitignore_20220919170241 delete mode 100644 .history/.gitignore_20220919170301 diff --git a/.gitignore b/.gitignore index 6eca45e..7e1ff91 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ Manifest.toml run *.pb.gz +.history \ No newline at end of file diff --git a/.history/.gitignore_20220919170241 b/.history/.gitignore_20220919170241 deleted file mode 100644 index d4289a5..0000000 --- a/.history/.gitignore_20220919170241 +++ /dev/null @@ -1,35 +0,0 @@ - - -# Files generated by invoking Julia with --code-coverage -*.jl.cov -*.jl.*.cov - -# Files generated by invoking Julia with --track-allocation -*.jl.mem -*.jl.*.mem - -# System-specific files and directories generated by the BinaryProvider and BinDeps packages -# They contain absolute paths specific to the host computer, and so should not be committed -deps/deps.jl -deps/build.log -deps/downloads/ -deps/usr/ -deps/src/ - -# Build artifacts for creating documentation generated by the Documenter package -docs/build/ -docs/site/ -/run/ - -# File generated by Pkg, the package manager, based on a corresponding Project.toml -# It records a fixed state of all packages used by the project. As such, it should not be -# committed for packages, but should be committed for applications that require a static -# environment. -Manifest.toml - -*.DS_Store - -.ipynb_checkpoints -*.png -*.pdf -run diff --git a/.history/.gitignore_20220919170301 b/.history/.gitignore_20220919170301 deleted file mode 100644 index 6eca45e..0000000 --- a/.history/.gitignore_20220919170301 +++ /dev/null @@ -1,37 +0,0 @@ - - -# Files generated by invoking Julia with --code-coverage -*.jl.cov -*.jl.*.cov - -# Files generated by invoking Julia with --track-allocation -*.jl.mem -*.jl.*.mem - -# System-specific files and directories generated by the BinaryProvider and BinDeps packages -# They contain absolute paths specific to the host computer, and so should not be committed -deps/deps.jl -deps/build.log -deps/downloads/ -deps/usr/ -deps/src/ - -# Build artifacts for creating documentation generated by the Documenter package -docs/build/ -docs/site/ -/run/ - -# File generated by Pkg, the package manager, based on a corresponding Project.toml -# It records a fixed state of all packages used by the project. As such, it should not be -# committed for packages, but should be committed for applications that require a static -# environment. -Manifest.toml - -*.DS_Store - -.ipynb_checkpoints -*.png -*.pdf -run - -*.pb.gz From 458e689ba85627e266e7ed7f90f6efa2ce0a1b18 Mon Sep 17 00:00:00 2001 From: Kun Chen Date: Mon, 19 Sep 2022 17:13:16 -0400 Subject: [PATCH 3/4] rename package to BZMeshes --- .github/workflows/CI.yml | 14 +++++++------- Project.toml | 6 +++--- README.md | 10 +++++----- docs/Project.toml | 2 +- docs/make.jl | 20 ++++++++++---------- docs/src/index.md | 8 ++++---- example/barychebtests.jl | 10 +++++----- example/graphene_treetest.jl | 8 ++++---- example/triqs_bzmesh.jl | 8 ++++---- src/{SpaceGrid.jl => BZMeshes.jl} | 2 +- test/runtests.jl | 6 +++--- 11 files changed, 47 insertions(+), 47 deletions(-) rename src/{SpaceGrid.jl => BZMeshes.jl} (94%) 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/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..92e78bc 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], + modules=[BZMeshes], authors="Tao Wang, Xiansheng Cai", - repo="https://github.com/fsxbhyy/SpaceGrid.jl/blob/{commit}{path}#{line}", - sitename="SpaceGrid.jl", + repo="https://github.com/fsxbhyy/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://fsxbhyy.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) From 203358f9ad0783c0f0a1704ce81a040fb0b365ab Mon Sep 17 00:00:00 2001 From: Kun Chen Date: Mon, 19 Sep 2022 17:24:51 -0400 Subject: [PATCH 4/4] update docs make --- docs/make.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 92e78bc..20bfbbe 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,12 +5,12 @@ DocMeta.setdocmeta!(BZMeshes, :DocTestSetup, :(using BZMeshes); recursive=true) makedocs(; modules=[BZMeshes], - authors="Tao Wang, Xiansheng Cai", - repo="https://github.com/fsxbhyy/BZMeshes.jl/blob/{commit}{path}#{line}", + 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/BZMeshes.jl", + canonical="https://numericaleft.github.io/BZMeshes.jl", assets=String[] ), pages=[