Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 22 additions & 0 deletions .github/workflows/Runic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Runic formatting
on:
push:
branches:
- 'master'
- 'release-'
tags:
- '*'
pull_request:
jobs:
runic:
name: Runic
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - uses: julia-actions/setup-julia@v2
# with:
# version: '1'
# - uses: julia-actions/cache@v2
- uses: fredrikekre/runic-action@v1
with:
version: '1'
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FastGaussQuadrature.jl
[![Build Status](https://github.com/JuliaApproximation/FastGaussQuadrature.jl/workflows/CI/badge.svg)](https://github.com/JuliaApproximation/FastGaussQuadrature.jl/actions)
[![codecov](https://codecov.io/gh/JuliaApproximation/FastGaussQuadrature.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaApproximation/FastGaussQuadrature.jl)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl)

A Julia package to compute `n`-point Gauss quadrature nodes and weights to 16-digit accuracy and in `O(n)` time.
So far the package includes `gausschebyshev()`, `gausslegendre()`, `gaussjacobi()`, `gaussradau()`, `gausslobatto()`, `gausslaguerre()`, and `gausshermite()`.
Expand Down
54 changes: 34 additions & 20 deletions docs/logo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,63 @@ logocolors = Luxor.Colors.JULIA_LOGO_COLORS

@svg begin
n = 15
Drawing(500,500, "docs/src/assets/logo.svg")
Drawing(500, 500, "docs/src/assets/logo.svg")
origin()
unitlength = 210
translate(0, unitlength)

Y = (n+1/2)/π
Y = (n + 1 / 2) / π

x_lgd, w_lgd = gausslegendre(n)
x_cbs, w_cbs = gausschebyshev(n,3)
x_jcb, w_jcb = gaussjacobi(n,5/2,1/2)
x_cbs, w_cbs = gausschebyshev(n, 3)
x_jcb, w_jcb = gaussjacobi(n, 5 / 2, 1 / 2)

c_lgd = logocolors[1] # Red
c_cbs = logocolors[2] # Green
c_jcb = logocolors[4] # Purple

p_jcb = [Point(unitlength*x_jcb[i], -Y*unitlength*w_jcb[i]) for i in 1:n]
p_cbs = [Point(unitlength*x_cbs[i], -Y*unitlength*w_cbs[i]) for i in 1:n]
p_lgd = [Point(unitlength*x_lgd[i], -Y*unitlength*w_lgd[i]) for i in 1:n]
p_jcb = [Point(unitlength * x_jcb[i], -Y * unitlength * w_jcb[i]) for i in 1:n]
p_cbs = [Point(unitlength * x_cbs[i], -Y * unitlength * w_cbs[i]) for i in 1:n]
p_lgd = [Point(unitlength * x_lgd[i], -Y * unitlength * w_lgd[i]) for i in 1:n]

l_jcb = [norm(p_jcb[i+1]-p_jcb[i]) for i in 1:n-1]
l_cbs = [norm(p_cbs[i+1]-p_cbs[i]) for i in 1:n-1]
l_lgd = [norm(p_lgd[i+1]-p_lgd[i]) for i in 1:n-1]
l_jcb = [norm(p_jcb[i + 1] - p_jcb[i]) for i in 1:(n - 1)]
l_cbs = [norm(p_cbs[i + 1] - p_cbs[i]) for i in 1:(n - 1)]
l_lgd = [norm(p_lgd[i + 1] - p_lgd[i]) for i in 1:(n - 1)]

r_jcb = zeros(n)
r_cbs = zeros(n)
r_lgd = zeros(n)

r_jcb[end] = norm(l_jcb[end])/2 * 0.8
r_cbs[end] = norm(l_cbs[end])/2 * 0.7
r_lgd[end] = norm(l_lgd[end])/2 * 0.75
r_jcb[end] = norm(l_jcb[end]) / 2 * 0.8
r_cbs[end] = norm(l_cbs[end]) / 2 * 0.7
r_lgd[end] = norm(l_lgd[end]) / 2 * 0.75

for i in reverse(1:n-1) r_jcb[i] = l_jcb[i] - r_jcb[i+1] end
for i in reverse(1:n-1) r_cbs[i] = l_cbs[i] - r_cbs[i+1] end
for i in reverse(1:n-1) r_lgd[i] = l_lgd[i] - r_lgd[i+1] end
for i in reverse(1:(n - 1))
r_jcb[i] = l_jcb[i] - r_jcb[i + 1]
end
for i in reverse(1:(n - 1))
r_cbs[i] = l_cbs[i] - r_cbs[i + 1]
end
for i in reverse(1:(n - 1))
r_lgd[i] = l_lgd[i] - r_lgd[i + 1]
end

sethue(c_cbs)
for i in 5:n circle(p_cbs[i], r_cbs[i], :fill) end
for i in 5:n
circle(p_cbs[i], r_cbs[i], :fill)
end
sethue(c_jcb)
for i in 1:n circle(p_jcb[i], r_jcb[i], :fill) end
for i in 1:n
circle(p_jcb[i], r_jcb[i], :fill)
end
sethue(c_lgd)
for i in 1:n circle(p_lgd[i], r_lgd[i], :fill) end
for i in 1:n
circle(p_lgd[i], r_lgd[i], :fill)
end
sethue(c_cbs)
for i in 1:4 circle(p_cbs[i], r_cbs[i], :fill) end
for i in 1:4
circle(p_cbs[i], r_cbs[i], :fill)
end

finish()
preview()
Expand Down
Loading
Loading