Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rename #13

Merged
merged 4 commits into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- master
tags: '*'
tags: "*"
pull_request:
concurrency:
# Skip intermediate builds: always.
Expand All @@ -18,8 +18,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- 'nightly'
- "1.6"
- "nightly"
os:
- ubuntu-latest
arch:
Expand Down Expand Up @@ -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:
Expand All @@ -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)'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ Manifest.toml
*.png
*.pdf
run

*.pb.gz
.history
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
SpaceGrid = "3d4565c3-192b-4227-89f7-5476f913ab49"
BZMeshes = "3d4565c3-192b-4227-89f7-5476f913ab49"
20 changes: 10 additions & 10 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -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"
)
8 changes: 4 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -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]
```
10 changes: 5 additions & 5 deletions example/barychebtests.jl
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand All @@ -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)
8 changes: 4 additions & 4 deletions example/graphene_treetest.jl
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)

Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions example/triqs_bzmesh.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using PythonCall
using SpaceGrid
using BZMeshes

gf = pyimport("triqs.gf")
lat = pyimport("triqs.lattice")
Expand All @@ -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])
Expand All @@ -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
2 changes: 1 addition & 1 deletion src/SpaceGrid.jl → src/BZMeshes.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module SpaceGrid
module BZMeshes

using AbstractTrees
using StaticArrays
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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)
Expand Down