Skip to content

Commit

Permalink
Fix typos (#1983)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner authored Dec 7, 2023
1 parent 98db220 commit 9dc6f97
Show file tree
Hide file tree
Showing 42 changed files with 121 additions and 121 deletions.
4 changes: 2 additions & 2 deletions _assets/blog/2021-08-sharks/notebook.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ end
# ╔═╡ d830e69e-f085-495e-be2c-8ea44582fa20
md"""
Looking at [videos of swimming dogfish](https://youtu.be/nMa6lD2CQVI?t=200), we can see a couple general features
- The motion of the front half of the body has a small amplitude (around 20% of the tail). This sets the amplitude evelope for the traveling wave.
- The motion of the front half of the body has a small amplitude (around 20% of the tail). This sets the amplitude envelope for the traveling wave.
"""

# ╔═╡ c2b7a082-c05d-41bb-af4c-eb23f6a331bf
Expand Down Expand Up @@ -264,7 +264,7 @@ We can learn a lot from this simple plot. For example, the side-to-side force ha
This simple model is a great start and it opens up a ton of avenues for improving the shark simulation and suggesting research questions:
- The instantaneous net forces should be zero in a free swimming body! We could add reaction motions to our model to achieve this. Would the model shark swim in a straight line if we did this, or is a control-loop needed?
- Real sharks are 3D (gasp!). While we could easily extend this approach using 2D splines, it will take much longer to simulate. Is there a way use GPUs to accelerate the simulations without completely changing the solver?
- If we were going to make a bio-inspired robot of this shark, we will have constraints on the shape and motion and powering available. Can we use this framework to help optimize our robotic within it's contraints?
- If we were going to make a bio-inspired robot of this shark, we will have constraints on the shape and motion and powering available. Can we use this framework to help optimize our robotic within it's constraints?
Below you can find links to all the packages used in this notebook. Happy Simulating!
Expand Down
8 changes: 4 additions & 4 deletions _assets/blog/moredots/More-Dots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
"source": [
"function vec_prealloc!(X, TWELVE_TEMP_ARRAYS)\n",
" T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 = TWELVE_TEMP_ARRAYS\n",
" \n",
"\n",
" # evaluate T7 = 2X.^2 + 6X.^3 - sqrt.(X):\n",
" T1 .= X.^2\n",
" T2 .= 2 .* T1\n",
Expand All @@ -257,14 +257,14 @@
" T5 .= T2 .+ T4\n",
" T6 .= sqrt.(X)\n",
" T7 .= T5 .- T6\n",
" \n",
"\n",
" # evaluate T12 = f(T7):\n",
" T8 .= T7.^2\n",
" T9 .= 3 .* T8\n",
" T10 .= 5 .* T7\n",
" T11 .= T9 .+ T10\n",
" T12 .= T11 .+ 2\n",
" \n",
"\n",
" # store result in X\n",
" X .= T12\n",
" return X\n",
Expand Down Expand Up @@ -488,7 +488,7 @@
"\n",
"* Even if you eliminate the cost of allocation and garbage collection, in the pre-allocated version of the traditionally vectorized code (`vec_pre`), it is still much slower than the devectorized code. This is especially true for very small vectors (due to the cost of setting up all of the little loops) and very large vectors (which don't fit into cache, and hence the cache misses induced by the non-fused loops are expensive).\n",
"\n",
"* The new-style \"dot-vectorized code\" (`newvec`) is mostly within 10% of the cost of the devectorized loop. The worst case is that of length-1 arrays, where the overhead of the `broadcast` bookkeeping is noticable, but even then it is only a 30% penalty."
"* The new-style \"dot-vectorized code\" (`newvec`) is mostly within 10% of the cost of the devectorized loop. The worst case is that of length-1 arrays, where the overhead of the `broadcast` bookkeeping is noticeable, but even then it is only a 30% penalty."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion _rss/head.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For instance 'website_url' or 'website_description'.
Notes:
* namespaces (xmlns): https://validator.w3.org/feed/docs/howto/declare_namespaces.html
* best practices: https://www.rssboard.org/rss-profile
* fd2rss convers markdown to html and fixes or removes relative links
* fd2rss converts markdown to html and fixes or removes relative links
* fd_rss_feed_url is built out of {website_url}/{rss_file}.xml, you can change the
rss_file variable in your config file if you want to use something different than 'feed'
-->
Expand Down
4 changes: 2 additions & 2 deletions blog/2013/04/distributed-numerical-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ Distributed Numerical Optimization | This post walks through the parallel computing functionality of Julia... """
@def published = "5 April 2013"
@def title = "Distributed Numerical Optimization"
@def authors = """<a href="https://mlubin.github.io/">Miles Lubin</a>"""
@def authors = """<a href="https://mlubin.github.io/">Miles Lubin</a>"""
@def hascode = true
@def hasmath = true

Expand Down Expand Up @@ -134,7 +134,7 @@ macro creates a [task](https://docs.julialang.org/en/latest/manual/control-flow/
on the *master process* (e.g. process 1). Each task feeds work to a
corresponding worker; the call `remotecall_fetch(p, f, lst[idx])` function
calls `f` on process `p` and returns the result when finished. Tasks are
uninterruptable and only surrender control at specific points such as
uninterruptible and only surrender control at specific points such as
`remotecall_fetch`. Tasks cannot directly modify variables from the enclosing
scope, but the same effect can be achieved by using the `next_idx` function to
access and mutate `i`. *The task idiom functions in place of using a loop to
Expand Down
4 changes: 2 additions & 2 deletions blog/2013/05/graphical-user-interfaces-part1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ Building GUIs with Julia, Tk, and Cairo, Part I | This is the first of two blog posts designed to walk users through the process of creating GUIs in Julia.... """
@def published = "23 May 2013"
@def title = "Building GUIs with Julia, Tk, and Cairo, Part I"
@def authors = """ <a href="http://holylab.wustl.edu">Timothy E. Holy</a>"""
@def authors = """ <a href="http://holylab.wustl.edu">Timothy E. Holy</a>"""
@def hascode = true

This is the first of two blog posts designed to walk users through the process of creating GUIs in Julia.
Expand Down Expand Up @@ -354,7 +354,7 @@ bind(ctrls.playback, "command", path -> playt(-1, ctrls, state, showframe)
```
The `path` input is generated by Tk/Tcl, but we don't have to use it.
Instead, we use anonymous functions to pass the arguments relavant to this particular GUI instantiation.
Instead, we use anonymous functions to pass the arguments relevant to this particular GUI instantiation.
Note that these two buttons share `state`; that means that any changes made by one callback will have impact on the other.
#### Placing the buttons in the frame (layout management)
Expand Down
6 changes: 3 additions & 3 deletions blog/2013/09/fast-numeric.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ Fast Numeric Computation in Julia | Working on numerical problems daily, I have always dreamt of a language that provides an elegant interface while allowing me to write codes that run blazingly fast on large data sets. Julia is a language that turns this dream into a reality.... """
@def published = "4 September 2013"
@def title = "Fast Numeric Computation in Julia"
@def authors = """<a href="https://dahua.me">Dahua Lin</a>"""
@def authors = """<a href="https://dahua.me">Dahua Lin</a>"""
@def hascode = true


Expand Down Expand Up @@ -74,7 +74,7 @@ for i = 1:length(x)
end
```

This version finishes the computation in one pass, without introducing any temporary arrays. Moreover, if `r` is pre-allocated, one can even omit the statment that creates `r`. The [*Devectorize.jl*](https://github.com/lindahua/Devectorize.jl) package provides a macro ``@devec`` that can automatically translate vectorized expressions into loops:
This version finishes the computation in one pass, without introducing any temporary arrays. Moreover, if `r` is pre-allocated, one can even omit the statement that creates `r`. The [*Devectorize.jl*](https://github.com/lindahua/Devectorize.jl) package provides a macro ``@devec`` that can automatically translate vectorized expressions into loops:

```julia
using Devectorize
Expand Down Expand Up @@ -147,7 +147,7 @@ for i = 1:m
end
```

The loop here accesses the elements row-by-row, as `a[i,1], a[i,2], ..., a[i,n]`. The interval between these elements is `m`. Intuitively, it jumps at the stride of length `m` from the begining of each row to the end in each inner loop, and then jumps back to the begining of next row. This is not very efficient, especially when `m` is large.
The loop here accesses the elements row-by-row, as `a[i,1], a[i,2], ..., a[i,n]`. The interval between these elements is `m`. Intuitively, it jumps at the stride of length `m` from the beginning of each row to the end in each inner loop, and then jumps back to the beginning of next row. This is not very efficient, especially when `m` is large.

This procedure can be made much more cache-friendly by changing the order of computation:

Expand Down
4 changes: 2 additions & 2 deletions blog/2015/10/compose3d-threejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ JSoC 2015 project: Interactive 3D Graphics in the Browser with Compose3D | Over the last three months, I've been working on Compose3D (https://github.com/rohitvarkey/Compose3D.jl),... """
@def published = "20 October 2015"
@def title = "JSoC 2015 project: Interactive 3D Graphics in the Browser with Compose3D"
@def authors = """<a href="https://github.com/rohitvarkey">Rohit Varkey Thankachan</a>"""
@def authors = """<a href="https://github.com/rohitvarkey">Rohit Varkey Thankachan</a>"""
@def hascode = true


Expand Down Expand Up @@ -48,7 +48,7 @@ helping performance.

On the other hand, web components introduced issues with IJulia notebooks regarding serving the files required by
ThreeJS. I'm still working on finding a good solution for this problem, but for now, a hack gets ThreeJS working in
IJulia, albiet with some limitations.
IJulia, albeit with some limitations.

### Drawing stuff!

Expand Down
6 changes: 3 additions & 3 deletions blog/2016/02/iteration.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ end
Obviously, this simple implementation skips all relevant error
checking. However, here the main point I wish to explore is that the
allocation of `B` turns out to be
[non-inferrable](https://docs.julialang.org/en/latest/manual/faq/#man-type-stability-1):
[non-inferable](https://docs.julialang.org/en/latest/manual/faq/#man-type-stability-1):
`sz` is a `Vector{Int}`, the length (number of elements) of a specific
`Vector{Int}` is not encoded by the type itself, and therefore the
dimensionality of `B` cannot be inferred.
Expand All @@ -312,7 +312,7 @@ result:
B = Array{eltype(A)}(undef, sz...)::Array{eltype(A),ndims(A)}
```

or by using an implementation that *is* inferrable:
or by using an implementation that *is* inferable:

```
function sumalongdims(A, dims)
Expand Down Expand Up @@ -464,7 +464,7 @@ julia> Tuple(I) .+ 1
If desired you can package this back up in a `CartesianIndex`, or just
use it directly (with splatting) for indexing.
The compiler optimizes all these operations away, so there is no actual
"cost" to constucting objects in this way.
"cost" to constructing objects in this way.

Why is iteration disallowed? One reason is to support the following:

Expand Down
4 changes: 2 additions & 2 deletions blog/2016/03/arrays-iteration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ Generalizing AbstractArrays: opportunities and challenges | Somewhat unusually, this blog post is future-looking: it mostly... """
@def published = "27 March 2016"
@def title = "Generalizing AbstractArrays: opportunities and challenges"
@def authors = """ <a href="http://holylab.wustl.edu">Tim Holy</a>"""
@def authors = """ <a href="http://holylab.wustl.edu">Tim Holy</a>"""
@def hascode = true


Expand Down Expand Up @@ -362,7 +362,7 @@ These examples suggest a formalization of `AbstractArray`:
Resolving these conflicting demands is not easy. One approach might be
to decree that some of these array types simply can't be supported
with generic code. It is possible that this is the right
strategy. Alternatively, one can attept to devise an array API that
strategy. Alternatively, one can attempt to devise an array API that
handles all of these types (and hopefully more).

In GitHub issue
Expand Down
2 changes: 1 addition & 1 deletion blog/2016/04/biojulia2016.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ BioJulia Project in 2016 | I am pleased to announce that the next phase of BioJulia is starting! In the next several months, I'm going to implement many crucial features for bioinformatics that will motivate you to use Julia and BioJulia libraries in your work. But before going to the details of the project, let me briefly int... """
@def published = "30 April 2016"
@def title = "BioJulia Project in 2016"
@def authors = "Kenta Sato"
@def authors = "Kenta Sato"


I am pleased to announce that the next phase of BioJulia is starting! In the next several months, I'm going to implement many crucial features for bioinformatics that will motivate you to use Julia and BioJulia libraries in your work. But before going to the details of the project, let me briefly introduce you what the BioJulia project is. This project is supported by the Moore Foundation and the Julia project.
Expand Down
2 changes: 1 addition & 1 deletion blog/2016/08/GSoC2016-Graft.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Dict(
)
```

Cleary, using labels internally is a very bad idea. Any sort of data access would set off multiple dictionary look-ups. Instead, if a bidirectional map
Clearly, using labels internally is a very bad idea. Any sort of data access would set off multiple dictionary look-ups. Instead, if a bidirectional map
could be used to translate labels into vertex identifiers and back, the number of dictionary lookups could be reduced to one. The data would also be better structured for query processing.

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ Announcing support for complex-domain linear programs in Convex.jl | I am pleased to announce the support for complex-domain linear programs (LPs) in Convex.jl. As one of the *Google Summer of Code* students under *The Julia Language*, I had proposed to implement the support for complex semidefinite programming. In the first phase of project, I started by tackling the... """
@def published = "17 August 2016"
@def title = "Announcing support for complex-domain linear programs in Convex.jl"
@def authors = "Ayush Pandey"
@def authors = "Ayush Pandey"
@def hascode = true


Expand Down Expand Up @@ -69,7 +69,7 @@ x1== xr.value + im*xi.value # should return true

List of all the affine atoms are as follows:

1. addition, substraction, multiplication, division
1. addition, subtraction, multiplication, division
2. indexing and slicing
3. k-th diagonal of a matrix
4. construct diagonal matrix
Expand Down
10 changes: 5 additions & 5 deletions blog/2017/01/moredots.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ More Dots: Syntactic Loop Fusion in Julia | After a lengthy design process (https://github.com/JuliaLang/julia/issues/8450) and preliminary foundations in Julia 0.5 (/blog/2016-10-11-julia-0.5-highlights#vectorized_function_calls), Julia 0.6 includes new facilities for writing code in the "vectorized"... """
@def published = "21 January 2017"
@def title = "More Dots: Syntactic Loop Fusion in Julia"
@def authors = """ <a href="https://math.mit.edu/~stevenj">Steven G. Johnson</a>"""
@def authors = """ <a href="https://math.mit.edu/~stevenj">Steven G. Johnson</a>"""
@def hascode = true


Expand Down Expand Up @@ -73,7 +73,7 @@ tasks (e.g. string processing).
To explore this question (also discussed
[in this blog post](https://www.johnmyleswhite.com/notebook/2013/12/22/the-relationship-between-vectorized-and-devectorized-code/)), let's begin by rewriting the code above in a more traditional vectorized style, without
so many dots, such as you might use in Julia 0.4 or in other languages
(most famously Matlab, Python/Numpy, or R).
(most famously Matlab, Python/Numpy, or R).

```julia
X = f(2 * X.^2 + 6 * X.^3 - sqrt(X))
Expand Down Expand Up @@ -126,7 +126,7 @@ allowing you to *combine arrays and scalars or arrays of different shapes/dimens
has its own unique capabilities.)
From the standpoint of the programmer, this adds a certain amount of
clarity because it indicates explicitly when an elementwise operation
is occuring. From the standpoint of the compiler, dot-call syntax
is occurring. From the standpoint of the compiler, dot-call syntax
enables the *syntactic loop fusion* optimization described in more detail
below, which we think is an overwhelming advantage of this style.

Expand Down Expand Up @@ -528,8 +528,8 @@ julia> s = ["The QUICK Brown", "fox jumped", "over the LAZY dog."];

julia> s .= replace.(lowercase.(s), r"\s+", "-")
3-element Array{String,1}:
"the-quick-brown"
"fox-jumped"
"the-quick-brown"
"fox-jumped"
"over-the-lazy-dog."
```

Expand Down
22 changes: 11 additions & 11 deletions blog/2017/03/piday.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ Some fun with &pi; in Julia | !pi (/assets/blog/2017-03-14-piday/pi.png) ^credit ... """
@def published = "14 March 2017"
@def title = "Some fun with &#928; in Julia"
@def authors = "Simon Byrne, Luis Benet and David Sanders"
@def authors = "Simon Byrne, Luis Benet and David Sanders"
@def hasmath = true
@def hascode = true

Expand Down Expand Up @@ -258,7 +258,7 @@ The idea is to split $S$ up into two parts, $S = S_N + T_N$, where
$ S_N := \sum_{n=1}^N \frac{1}{n^2}$ contains the first $N$ terms,
and $T_N := S - S_N = \sum_{n=N+1}^\infty \frac{1}{n^2}$ contains the rest (an infinite number of terms).

We will evalute $S_N$ numerically, and use the following analytical bound for $T_N$:
We will evaluate $S_N$ numerically, and use the following analytical bound for $T_N$:

$$\frac{1}{N+1} \le T_N \le \frac{1}{N}$$.

Expand Down Expand Up @@ -590,16 +590,16 @@ end
intervals = make_intervals()

10-element Array{ValidatedNumerics.Interval{Float64},1}:
Interval(0.0, 0.2)
Interval(0.19999999999999998, 0.4)
Interval(0.0, 0.2)
Interval(0.19999999999999998, 0.4)
Interval(0.39999999999999997, 0.6000000000000001)
Interval(0.6, 0.8)
Interval(0.7999999999999999, 1.0)
Interval(1.0, 1.2000000000000002)
Interval(1.2, 1.4000000000000001)
Interval(1.4, 1.6)
Interval(1.5999999999999999, 1.8)
Interval(1.7999999999999998, 2.0)
Interval(0.6, 0.8)
Interval(0.7999999999999999, 1.0)
Interval(1.0, 1.2000000000000002)
Interval(1.2, 1.4000000000000001)
Interval(1.4, 1.6)
Interval(1.5999999999999999, 1.8)
Interval(1.7999999999999998, 2.0)
```

Given one of those intervals, we evaluate the function of interest:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@def rss = """ GSoC 2017: Implementing iterative solvers for numerical linear algebra | The central part of my GSoC project is about implementing the Jacobi-Davidson method natively in Julia, available in JacobiDavidson.jl (https://github.com/haampie/JacobiDavidson.jl). This method computes a few approximate solutions of the eigenvalue problem Ax = lambda Bx for large and sparse mat... """
@def published = "23 August 2017"
@def title = "GSoC 2017: Implementing iterative solvers for numerical linear algebra"
@def authors = "Harmen Stoppels, Andreas Noack"
@def authors = "Harmen Stoppels, Andreas Noack"
@def hasmath = true
@def hascode = true

Expand Down Expand Up @@ -112,7 +112,7 @@ It does not yet detect 50003, but that might happen when `pairs` is increased a

![Residual norm](/assets/blog/2017-08-23-native-julia-implementations-of-iterative-solvers-for-numerical-linear-algebra/resnorm.svg)

It's not easy to construct a preconditioner this good for any given problem, but usually people tend to know what works well in specific classes of problems. If no specific preconditioner is availabe, you can always try a general one such as ILU. The next section illustrates that.
It's not easy to construct a preconditioner this good for any given problem, but usually people tend to know what works well in specific classes of problems. If no specific preconditioner is available, you can always try a general one such as ILU. The next section illustrates that.

### ILU example
As an example of how ILU can be used we generate a non-symmetric, banded matrix having a structure that typically arises in finite differences schemes of three-dimensional problems:
Expand Down
Loading

0 comments on commit 9dc6f97

Please sign in to comment.