Skip to content

Commit 3a4d4e7

Browse files
committed
pre-commit adjustments
1 parent 124d867 commit 3a4d4e7

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ makedocs(
3131
],
3232
"Scripts" => [
3333
"poisson_script.md",
34-
]
34+
],
3535
],
3636
)
3737

docs/src/poisson_script.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ Results are automatically stored using [DrWatson.jl](https://github.com/JuliaDyn
6666
data/[problem]/[domain]/order=[order]_maxdofs=[maxdofs]_decay=[decay]_mean=[mean]_θ=([θ_spatial],[θ_stochastic])_tail=[tail_extension]
6767
```
6868

69-
If the equilibration estimator is used, `_eq` is appended to the filename.
69+
If the equilibration estimator is used, `_eq` is appended to the filename.

scripts/poisson_simple.jl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@ function main(;
2222
decay = 2.0, # decay factor for the random coefficient
2323
mean = problem == PoissonProblemPrimal ? 1.0 : 0.0, # mean value of coefficient
2424
domain = "square", # domain, e.g., "square" or "lshape"
25-
initial_modes = [[0], [1,0], [0,1], [2,0], [0,0,1]], # initial multi-indices for stochastic basis
25+
initial_modes = [[0], [1, 0], [0, 1], [2, 0], [0, 0, 1]], # initial multi-indices for stochastic basis
2626
f! = (result, qpinfo) -> (result[1] = 1), # right-hand side function
2727
use_iterative_solver = true, # use iterative solver ? (otherwise direct)
28-
Plotter = nothing)
28+
Plotter = nothing
29+
)
2930

3031
## prepare stochastic coefficient
3132
τ = (problem <: PoissonProblemPrimal) ? 0.9 : 1.0
3233
if problem <: PoissonProblemPrimal
3334
@assert mean >= 1 "coefficient needs to be at least 1 to ensure ellipticity"
3435
end
3536
C = StochasticCoefficientCosinus(; τ = τ, decay = decay, mean = mean)
36-
37+
3738
## prepare grid
3839
xgrid = if domain == "square"
3940
uniform_refine(grid_unitsquare(Triangle2D), nrefs)
@@ -44,24 +45,24 @@ function main(;
4445
end
4546

4647
## prepare stochastic basis
47-
multi_indices = Array{Array{Int,1},1}(initial_modes)
48+
multi_indices = Array{Array{Int, 1}, 1}(initial_modes)
4849
prepare_multi_indices!(multi_indices)
4950
M = maximum(length.(multi_indices))
5051
OBType = problem <: PoissonProblemPrimal ? LegendrePolynomials : HermitePolynomials
5152
ansatz_deg = maximum([maximum(multi_indices[k]) for k in 1:length(multi_indices)]) + 4
52-
TensorBasis = TensorizedBasis(OBType, M, ansatz_deg, 2*ansatz_deg, 2*ansatz_deg, multi_indices = multi_indices)
53+
TensorBasis = TensorizedBasis(OBType, M, ansatz_deg, 2 * ansatz_deg, 2 * ansatz_deg, multi_indices = multi_indices)
5354

5455
## prepare FE spaces
5556
if problem <: LogTransformedPoissonProblemDual
56-
FEType = [HDIVRTk{2,order}, order == 0 ? L2P0{1} : H1Pk{1,2,order}]
57+
FEType = [HDIVRTk{2, order}, order == 0 ? L2P0{1} : H1Pk{1, 2, order}]
5758
FES = [FESpace{FEType[1]}(xgrid), FESpace{FEType[2]}(xgrid; broken = true)]
5859
unames = ["p", "u"]
5960
else
60-
FEType = H1Pk{1,2,order}
61+
FEType = H1Pk{1, 2, order}
6162
FES = FESpace{FEType}(xgrid)
6263
unames = ["u"]
6364
end
64-
65+
6566
## create solution vector
6667
sol = SGFEVector(FES, TensorBasis; active_modes = 1:length(multi_indices), unames = unames)
6768

@@ -85,4 +86,4 @@ function main(;
8586
return sol
8687
end
8788

88-
end # module
89+
end # module

0 commit comments

Comments
 (0)