Skip to content

Commit d509a87

Browse files
authored
Merge pull request #37 from bmad-sim/dcs16/01
Changed project name SimUtils -> AcceleratorSimUtils.
2 parents ef1fbb4 + 24bca54 commit d509a87

File tree

12 files changed

+41
-41
lines changed

12 files changed

+41
-41
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ jobs:
6464
shell: julia --project=docs --color=yes {0}
6565
run: |
6666
using Documenter: DocMeta, doctest
67-
using SimUtils
68-
DocMeta.setdocmeta!(SimUtils, :DocTestSetup, :(using SimUtils); recursive=true)
69-
doctest(SimUtils)
67+
using AcceleratorSimUtils
68+
DocMeta.setdocmeta!(AcceleratorSimUtils, :DocTestSetup, :(using AcceleratorSimUtils); recursive=true)
69+
doctest(AcceleratorSimUtils)

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name = "SimUtils"
2-
uuid = "042f21a8-4046-4c2b-b9ed-b6e14110b343"
1+
name = "AcceleratorSimUtils"
2+
uuid = "8b14b3b2-39c5-4be4-bdc0-0b322e577224"
33
authors = ["mattsignorelli <[email protected]> and contributors"]
44
version = "0.4.0"
55

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# SimUtils
1+
# AcceleratorSimUtils
22

3-
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bmad-sim.github.io/SimUtils.jl/stable/)
4-
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bmad-sim.github.io/SimUtils.jl/dev/)
5-
[![Build Status](https://github.com/bmad-sim/SimUtils.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/bmad-sim/SimUtils.jl/actions/workflows/CI.yml?query=branch%3Amain)
3+
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bmad-sim.github.io/AcceleratorSimUtils.jl/stable/)
4+
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bmad-sim.github.io/AcceleratorSimUtils.jl/dev/)
5+
[![Build Status](https://github.com/bmad-sim/AcceleratorSimUtils.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/bmad-sim/AcceleratorSimUtils.jl/actions/workflows/CI.yml?query=branch%3Amain)
66

77
A package of utility routines used by the SciBmad project for the simulation of high energy accelerators and storage rings.
88

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[deps]
22
AtomicAndPhysicalConstants = "5c0d271c-5419-4163-b387-496237733d8b"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
4-
SimUtils = "042f21a8-4046-4c2b-b9ed-b6e14110b343"
4+
AcceleratorSimUtils = "8b14b3b2-39c5-4be4-bdc0-0b322e577224"

docs/make.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
using SimUtils
1+
using AcceleratorSimUtils
22
using Documenter
33

4-
DocMeta.setdocmeta!(SimUtils, :DocTestSetup, :(using SimUtils); recursive=true)
4+
DocMeta.setdocmeta!(AcceleratorSimUtils, :DocTestSetup, :(using AcceleratorSimUtils); recursive=true)
55

66
makedocs(;
7-
modules=[SimUtils],
7+
modules=[AcceleratorSimUtils],
88
authors="DavidSagan <[email protected]> and contributors",
9-
sitename="SimUtils.jl",
9+
sitename="AcceleratorSimUtils.jl",
1010
format=Documenter.HTML(;
11-
canonical="https://bmad-sim.github.io/SimUtils.jl",
11+
canonical="https://bmad-sim.github.io/AcceleratorSimUtils.jl",
1212
edit_link="main",
1313
assets=String[],
1414
),
@@ -18,6 +18,6 @@ makedocs(;
1818
)
1919

2020
deploydocs(;
21-
repo="github.com/bmad-sim/SimUtils.jl",
21+
repo="github.com/bmad-sim/AcceleratorSimUtils.jl",
2222
devbranch="main",
2323
)

docs/src/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
```@meta
2-
CurrentModule = SimUtils
2+
CurrentModule = AcceleratorSimUtils
33
```
44

5-
# SimUtils
5+
# AcceleratorSimUtils
66

7-
Documentation for [SimUtils](https://github.com/bmad-sim/SimUtils.jl).
7+
Documentation for [AcceleratorSimUtils](https://github.com/bmad-sim/AcceleratorSimUtils.jl).
88

99
```@index
1010
```
1111

1212
```@autodocs
13-
Modules = [SimUtils]
13+
Modules = [AcceleratorSimUtils]
1414
```

src/SimUtils.jl renamed to src/AcceleratorSimUtils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
module SimUtils
1+
module AcceleratorSimUtils
22

33
using FFTW, Random
44
using AtomicAndPhysicalConstants
55

66
@APCdef
77

88
export gen_pinknoise
9-
export one_cos, modulo2, un_sinc, un_cosc
9+
export one_cos, modulo2, sincu, coscu
1010
export calc_E_tot, calc_E_kinetic, calc_pc, calc_β, calc_1β, calc_γ, calc_changed_energy
1111

1212
include("math.jl")

src/math.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ function modulo2(x, amp)
3232
end
3333

3434
#---------------------------------------------------------------------------------------------------
35-
# un_sinc
35+
# sincu
3636

3737
"""
38-
un_sinc(x, nd::Int = 0)
38+
sincu(x, nd::Int = 0)
3939
4040
Returns the unnormalized `sinc(x)` (equal to `sin(x)/x`, no factors of pi here) for `nd = 0`
4141
or the `nd`th derivative for `nd > 0`.
4242
4343
Note: Currently, only `nd = 0` or `1` are implemented
44-
""" un_sinc(x)
44+
""" sincu(x)
4545

46-
function un_sinc(x, nd::Int = 0)
46+
function sincu(x, nd::Int = 0)
4747
if nd == 0
4848
return sinc(x/pi)
4949
elseif nd == 1
@@ -62,22 +62,22 @@ function un_sinc(x, nd::Int = 0)
6262
end
6363

6464
#---------------------------------------------------------------------------------------------------
65-
# un_cosc
65+
# coscu
6666

6767
"""
68-
un_cosc(x, nd::Int = 0)
68+
coscu(x, nd::Int = 0)
6969
7070
Returns, to machine precision, the `nd`th derivative of `(1 - cos(x)) / x^2`.
7171
If `nd = 0`, returns the function itself.
7272
7373
Note: Currently, only `nd = 0` or `1` are implemented
74-
""" un_cosc
74+
""" coscu
7575

76-
function un_cosc(x, nd::Int = 0)
76+
function coscu(x, nd::Int = 0)
7777
if nd == 0
78-
return 0.5 * un_sinc(x/2)^2
78+
return 0.5 * sincu(x/2)^2
7979
elseif nd == 1
80-
return 0.5 * un_sinc(x/2) * un_sinc(x/2, 1)
80+
return 0.5 * sincu(x/2) * sincu(x/2, 1)
8181
else
8282
error("nd = $nd not yet implemented.")
8383
end

test/math_test.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using SimUtils, Test
1+
using AcceleratorSimUtils, Test
22

33
@testset "math_test" begin
44
@test one_cos(1e-4) 4.999999995833334e-9 rtol = 1e-15
55
@test one_cos(1) 0.4596976941318603 rtol = 1e-15
6-
@test un_sinc(1.0) 0.8414709848078965 rtol = 1e-15
7-
@test abs(0.5e6 * (un_sinc(1.0+1e-6) - un_sinc(1.0-1e-6)) - un_sinc(1.0, 1)) < 1.0e-12
8-
@test un_cosc(1.0) 0.4596976941318603 rtol = 1e-15
9-
@test abs(0.5e6 * (un_cosc(1.0+1e-6) - un_cosc(1.0-1e-6)) - un_cosc(1.0, 1)) < 1.0e-10
6+
@test sincu(1.0) 0.8414709848078965 rtol = 1e-15
7+
@test abs(0.5e6 * (sincu(1.0+1e-6) - sincu(1.0-1e-6)) - sincu(1.0, 1)) < 1.0e-12
8+
@test coscu(1.0) 0.4596976941318603 rtol = 1e-15
9+
@test abs(0.5e6 * (coscu(1.0+1e-6) - coscu(1.0-1e-6)) - coscu(1.0, 1)) < 1.0e-10
1010
@test modulo2(2, 2) == -2
1111
@test modulo2(8, 3) == 2
1212
@test modulo2(9.0, 3.0) -3.0 rtol = 1e-15

test/particle_test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using SimUtils, AtomicAndPhysicalConstants
1+
using AcceleratorSimUtils, AtomicAndPhysicalConstants
22
using Test
33

44
s = Species("electron")

test/pink_test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using SimUtils
1+
using AcceleratorSimUtils
22
using Test
33

44
# Pink noise test here

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using SimUtils
1+
using AcceleratorSimUtils
22
using Test
33

4-
@testset verbose = true "SimUtils.jl" begin
4+
@testset verbose = true "AcceleratorSimUtils.jl" begin
55

66
@testset "math_test" begin
77
include("math_test.jl")

0 commit comments

Comments
 (0)