Skip to content

Commit 3e43712

Browse files
Merge pull request #78 from ArnoStrouwen/docs1
Documenter 1.0 upgrade
2 parents 873db37 + 945ff93 commit 3e43712

File tree

5 files changed

+31
-48
lines changed

5 files changed

+31
-48
lines changed

.github/workflows/CI.yml

+4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ on:
33
pull_request:
44
branches:
55
- master
6+
paths-ignore:
7+
- 'docs/**'
68
push:
79
branches:
810
- master
11+
paths-ignore:
12+
- 'docs/**'
913
jobs:
1014
test:
1115
runs-on: ubuntu-latest

docs/Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ MultiScaleArrays = "f9640e96-87f6-5992-9c3b-0743c6a49ffa"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
44

55
[compat]
6-
Documenter = "0.27"
6+
Documenter = "1"
77
MultiScaleArrays = "1.10"

docs/make.jl

+2-10
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,8 @@ makedocs(sitename = "MultiScaleArrays.jl",
99
authors = "Chris Rackauckas",
1010
modules = [MultiScaleArrays],
1111
clean = true, doctest = false, linkcheck = true,
12-
strict = [
13-
:doctest,
14-
:linkcheck,
15-
:parse_error,
16-
:example_block,
17-
# Other available options are
18-
# :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block, :footnote, :meta_block, :missing_docs, :setup_block
19-
],
20-
format = Documenter.HTML(analytics = "UA-90474609-3",
21-
assets = ["assets/favicon.ico"],
12+
warnonly = [:missing_docs],
13+
format = Documenter.HTML(assets = ["assets/favicon.ico"],
2214
canonical = "https://docs.sciml.ai/MultiScaleArrays/stable/"),
2315
pages = pages)
2416

docs/src/index.md

+16-29
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# MultiScaleArrays.jl: High-Performance Matrix Exponentiation and Products
22

3-
MultiScaleArrays.jl allows you to easily build multiple scale models which are
3+
MultiScaleArrays.jl allows you to easily build multiple-scale models that are
44
fully compatible with native Julia scientific computing packages like
55
DifferentialEquations.jl or Optim.jl. These models utilize
6-
a tree structure to describe phenomena of multiple scales, but the interface allows
6+
a tree structure to describe phenomena on multiple scales, but the interface allows
77
you to describe equations on different levels, using aggregations from lower
88
levels to describe complex systems. Their structure allows for complex and dynamic
99
models to be developed with only a small performance difference. In the end, they present
@@ -48,7 +48,7 @@ struct Embryo{T <: AbstractMultiScaleArray, B <: Number} <: AbstractMultiScaleAr
4848
end
4949
```
5050

51-
This setup defines a type structure which is both a tree and an array. A picture of a possible
51+
This setup defines a type structure that is both a tree and an array. A picture of a possible
5252
version is the following:
5353

5454
![](https://user-images.githubusercontent.com/1814174/27211626-79fe1b9a-520f-11e7-87f1-1cb33da91609.PNG)
@@ -61,7 +61,7 @@ cell2 = Cell([4.0; 5.0])
6161
```
6262

6363
and build types higher up in the hierarchy by using the `constuct` method. The method
64-
is `construct(T::AbstractMultiScaleArray, nodes, values)`, though, if `values` is not given it's
64+
is `construct(T::AbstractMultiScaleArray, nodes, values)`, though, if `values` is not given, it's
6565
taken to be empty.
6666

6767
```julia
@@ -150,32 +150,19 @@ Pkg.status(; mode = PKGMODE_MANIFEST) # hide
150150
</details>
151151
```
152152

153-
```@raw html
154-
You can also download the
155-
<a href="
156-
```
157-
158-
```@eval
159-
using TOML
160-
version = TOML.parse(read("../../Project.toml", String))["version"]
161-
name = TOML.parse(read("../../Project.toml", String))["name"]
162-
link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
163-
"/assets/Manifest.toml"
164-
```
165-
166-
```@raw html
167-
">manifest</a> file and the
168-
<a href="
169-
```
170-
171153
```@eval
172154
using TOML
155+
using Markdown
173156
version = TOML.parse(read("../../Project.toml", String))["version"]
174157
name = TOML.parse(read("../../Project.toml", String))["name"]
175-
link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
176-
"/assets/Project.toml"
177-
```
178-
179-
```@raw html
180-
">project</a> file.
181-
```
158+
link_manifest = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
159+
"/assets/Manifest.toml"
160+
link_project = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
161+
"/assets/Project.toml"
162+
Markdown.parse("""You can also download the
163+
[manifest]($link_manifest)
164+
file and the
165+
[project]($link_project)
166+
file.
167+
""")
168+
```

src/MultiScaleArrays.jl

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ Each type above then contains three fields:
2424
2525
Note that the ordering of the fields matters.
2626
`B` is the `BottomType`, which has to be the same as the eltype for the array
27-
in the leaf types. `T` is another `AbstractMultiScaleArray`. Thus at each level,
28-
an` AbstractMultiScaleArray` contains some information of its own (`values`), the
27+
in the leaf types. `T` is another `AbstractMultiScaleArray`. Thus, at each level,
28+
an `AbstractMultiScaleArray` contains some information of its own (`values`), the
2929
next level down in the hierarchy (`nodes`), and caching for indices (`end_idxs`).
30-
You can add and use extra fields as you please, and even make the types immutable.
30+
You can add and use extra fields as you please, and you can even make the types immutable.
3131
3232
## The MultiScaleModel API
3333
3434
The resulting type acts as an array. A leaf type `l` acts exactly as an array
3535
with `l[i] == l.values[i]`. Higher nodes also act as a linear array. If `ln` is level
3636
`n` in the hierarchy, then `ln.nodes` is the vector of level `n-1` objects, and `ln.values`
37-
are its "intrinsic values". There is an indexing scheme on `ln`, where:
37+
are its intrinsic values. There is an indexing scheme on `ln`, where:
3838
3939
- `ln[i,j,k]` gets the `k`th `n-3` object in the `j`th `n-2` object in the `i`th level `n-1`
4040
object. Of course, this recurses for the whole hierarchy.
4141
- `ln[i]` provides a linear index through all `.nodes` and `.values` values in every lower
4242
level and `ln.values` itself.
4343
44-
Thus `typeof(ln) <: AbstractVector{B}` where `B` is the eltype of its leaves and
44+
Thus, `typeof(ln) <: AbstractVector{B}`, where `B` is the eltype of its leaves and
4545
all `.values`'s.
4646
4747
In addition, iterators are provided to make it easy to iterate through levels.
@@ -59,7 +59,7 @@ mimics a vector in order for usage in DifferentialEquations or Optim. So for exa
5959
embryo[12]
6060
```
6161
62-
returns the "12th protein", counting by Embryo > Tissue > Population > Cell in order
62+
returns the 12th protein, counting by Embryo > Tissue > Population > Cell in order
6363
of the vectors. The linear indexing exists for every `AbstractMultiScaleArray`.
6464
These types act as full linear vectors, so standard operations do the sensical
6565
operations:
@@ -82,7 +82,7 @@ for cell in level_iter(embryo, 3)
8282
end
8383
```
8484
85-
or the multiple level iter, which is the one generally used in
85+
or the multiple-level iter, which is the one generally used in
8686
DifferentialEquations.jl functions:
8787
8888
```julia
@@ -101,7 +101,7 @@ end
101101
```
102102
103103
However, the interesting behavior comes from event handling. Since `embryo` will be the
104-
"vector" for the differential equation or optimization problem, it will be the value
104+
vector for the differential equation or optimization problem, it will be the value
105105
passed to the event handling. MultiScaleArrays includes behavior for changing the
106106
structure. For example:
107107

0 commit comments

Comments
 (0)