Skip to content

Commit 74fb734

Browse files
Merge pull request #2243 from vaerksted/master
fix typos
2 parents 01aa166 + 5570a78 commit 74fb734

20 files changed

+33
-33
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
- This repository follows the [SciMLStyle](https://github.com/SciML/SciMLStyle) and the SciML [ColPrac](https://github.com/SciML/ColPrac).
2-
- Please run `using JuliaFormatter, ModelingToolkit; format(joinpath(dirname(pathof(ModelingToolkit)), ".."))` before commiting.
2+
- Please run `using JuliaFormatter, ModelingToolkit; format(joinpath(dirname(pathof(ModelingToolkit)), ".."))` before committing.
33
- Add tests for any new features.

docs/src/basics/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ We can solve this problem by using the `missing_variable_defaults()` function
120120
prob = ODEProblem(sys, ModelingToolkit.missing_variable_defaults(sys), (0,1))
121121
```
122122

123-
This function provides 0 for the default values, which is a safe assumption for dummy derivatives of most models. However, the 2nd arument allows for a different default value or values to be used if needed.
123+
This function provides 0 for the default values, which is a safe assumption for dummy derivatives of most models. However, the 2nd argument allows for a different default value or values to be used if needed.
124124

125125
```
126126
julia> ModelingToolkit.missing_variable_defaults(sys, [1,2,3])

src/ModelingToolkit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ abstract type AbstractOptimizationSystem <: AbstractTimeIndependentSystem end
106106

107107
function independent_variable end
108108

109-
# this has to be included early to deal with depency issues
109+
# this has to be included early to deal with dependency issues
110110
include("structural_transformation/bareiss.jl")
111111
function complete end
112112
function var_derivative! end

src/bipartite_graph.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ Essentially the graph adapter performs two largely orthogonal functions
618618
1. It pairs an undirected bipartite graph with a matching of the destination vertex.
619619
620620
This matching is used to induce an orientation on the otherwise undirected graph:
621-
Matched edges pass from destination to source [source to desination], all other edges
621+
Matched edges pass from destination to source [source to destination], all other edges
622622
pass in the opposite direction.
623623
624624
2. It exposes the graph view obtained by contracting the destination [source] vertices
@@ -632,7 +632,7 @@ graph is acyclic.
632632
# Hypergraph interpretation
633633
634634
Consider the bipartite graph `B` as the incidence graph of some hypergraph `H`.
635-
Note that a maching `M` on `B` in the above sense is equivalent to determining
635+
Note that a matching `M` on `B` in the above sense is equivalent to determining
636636
an (1,n)-orientation on the hypergraph (i.e. each directed hyperedge has exactly
637637
one head, but any arbitrary number of tails). In this setting, this is simply
638638
the graph formed by expanding each directed hyperedge into `n` ordinary edges
@@ -685,7 +685,7 @@ function Base.iterate(c::CMONeighbors{false}, (l, state...))
685685
r === nothing && return nothing
686686
# If this is a matched edge, skip it, it's reversed in the induced
687687
# directed graph. Otherwise, if there is no matching for this destination
688-
# edge, also skip it, since it got delted in the contraction.
688+
# edge, also skip it, since it got deleted in the contraction.
689689
vsrc = c.g.matching[r[1]]
690690
if vsrc === c.v || !isa(vsrc, Int)
691691
state = (r[2],)

src/inputoutput.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ end
112112
same_or_inner_namespace(u, var)
113113
114114
Determine whether `var` is in the same namespace as `u`, or a namespace internal to the namespace of `u`.
115-
Example: `sys.u ~ sys.inner.u` will bind `sys.inner.u`, but `sys.u` remains an unbound, external signal. The namepsaced signal `sys.inner.u` lives in a namspace internal to `sys`.
115+
Example: `sys.u ~ sys.inner.u` will bind `sys.inner.u`, but `sys.u` remains an unbound, external signal. The namespaced signal `sys.inner.u` lives in a namespace internal to `sys`.
116116
"""
117117
function same_or_inner_namespace(u, var)
118118
nu = get_namespace(u)
119119
nv = get_namespace(var)
120120
nu == nv || # namespaces are the same
121-
startswith(nv, nu) || # or nv starts with nu, i.e., nv is an inner namepsace to nu
121+
startswith(nv, nu) || # or nv starts with nu, i.e., nv is an inner namespace to nu
122122
occursin('', string(getname(var))) &&
123123
!occursin('', string(getname(u))) # or u is top level but var is internal
124124
end
@@ -127,7 +127,7 @@ function inner_namespace(u, var)
127127
nu = get_namespace(u)
128128
nv = get_namespace(var)
129129
nu == nv && return false
130-
startswith(nv, nu) || # or nv starts with nu, i.e., nv is an inner namepsace to nu
130+
startswith(nv, nu) || # or nv starts with nu, i.e., nv is an inner namespace to nu
131131
occursin('', string(getname(var))) &&
132132
!occursin('', string(getname(u))) # or u is top level but var is internal
133133
end
@@ -177,7 +177,7 @@ f_ip : (xout,x,u,p,t) -> nothing
177177
178178
The return values also include the remaining states and parameters, in the order they appear as arguments to `f`.
179179
180-
If `disturbance_inputs` is an array of variables, the generated dynamics function will preserve any state and dynamics associated with distrubance inputs, but the distrubance inputs themselves will not be included as inputs to the generated function. The use case for this is to generate dynamics for state observers that estimate the influence of unmeasured disturbances, and thus require state variables for the disturbance model, but without disturbance inputs since the disturbances are not available for measurement.
180+
If `disturbance_inputs` is an array of variables, the generated dynamics function will preserve any state and dynamics associated with disturbance inputs, but the disturbance inputs themselves will not be included as inputs to the generated function. The use case for this is to generate dynamics for state observers that estimate the influence of unmeasured disturbances, and thus require state variables for the disturbance model, but without disturbance inputs since the disturbances are not available for measurement.
181181
See [`add_input_disturbance`](@ref) for a higher-level interface to this functionality.
182182
183183
# Example

src/structural_transformation/bareiss.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ else
3434
function Base.swapcols!(A::AbstractSparseMatrixCSC, i, j)
3535
i == j && return
3636

37-
# For simplicitly, let i denote the smaller of the two columns
37+
# For simplicity, let i denote the smaller of the two columns
3838
j < i && @swap(i, j)
3939

4040
colptr = getcolptr(A)
@@ -72,7 +72,7 @@ else
7272
return nothing
7373
end
7474
function swaprows!(A::AbstractSparseMatrixCSC, i, j)
75-
# For simplicitly, let i denote the smaller of the two rows
75+
# For simplicity, let i denote the smaller of the two rows
7676
j < i && @swap(i, j)
7777

7878
rows = rowvals(A)
@@ -184,7 +184,7 @@ const bareiss_virtcolswap = ((M, i, j) -> nothing, swaprows!,
184184
Perform Bareiss's fraction-free row-reduction algorithm on the matrix `M`.
185185
Optionally, a specific pivoting method may be specified.
186186
187-
swap_strategy is an optional argument that determines how the swapping of rows and coulmns is performed.
187+
swap_strategy is an optional argument that determines how the swapping of rows and columns is performed.
188188
bareiss_colswap (the default) swaps the columns and rows normally.
189189
bareiss_virtcolswap pretends to swap the columns which can be faster for sparse matrices.
190190
"""

src/structural_transformation/partial_state_selection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function dummy_derivative_graph!(structure::SystemStructure, var_eq_matching, ja
209209
J = nothing
210210
else
211211
_J = jac(eqs, vars)
212-
# only accecpt small intergers to avoid overflow
212+
# only accept small integers to avoid overflow
213213
is_all_small_int = all(_J) do x′
214214
x = unwrap(x′)
215215
x isa Number || return false

src/structural_transformation/symbolics_tearing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function full_equations(sys::AbstractSystem; simplify = false)
103103
if rhs isa Symbolic
104104
return 0 ~ rhs
105105
else # a number
106-
error("tearing failled because the system is singular")
106+
error("tearing failed because the system is singular")
107107
end
108108
end
109109
eq
@@ -194,7 +194,7 @@ function to_mass_matrix_form(neweqs, ieq, graph, fullvars, isdervar::F,
194194
return (new_lhs ~ new_rhs), invview(var_to_diff)[dervar]
195195
else # a number
196196
if abs(rhs) > 100eps(float(rhs))
197-
@warn "The equation $eq is not consistent. It simplifed to 0 == $rhs."
197+
@warn "The equation $eq is not consistent. It simplified to 0 == $rhs."
198198
end
199199
return nothing
200200
end

src/systems/alias_elimination.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ count_nonzeros(a::CLILVector) = nnz(a)
200200

201201
# Linear variables are highest order differentiated variables that only appear
202202
# in linear equations with only linear variables. Also, if a variable's any
203-
# derivaitves is nonlinear, then all of them are not linear variables.
203+
# derivatives is nonlinear, then all of them are not linear variables.
204204
function find_linear_variables(graph, linear_equations, var_to_diff, irreducibles)
205205
stack = Int[]
206206
linear_variables = falses(length(var_to_diff))
@@ -273,7 +273,7 @@ function aag_bareiss!(structure, mm_orig::SparseMatrixCLIL{T, Ti}) where {T, Ti}
273273
# linear algebraic equations can be set to 0.
274274
#
275275
# For all the other variables, we can update the original system with
276-
# Bareiss'ed coefficients as Gaussian elimination is nullspace perserving
276+
# Bareiss'ed coefficients as Gaussian elimination is nullspace preserving
277277
# and we are only working on linear homogeneous subsystem.
278278

279279
is_algebraic = let var_to_diff = var_to_diff

src/systems/diffeqs/modelingtoolkitize.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function modelingtoolkitize(prob::DiffEqBase.ODEProblem; kwargs...)
3737
elseif v in var_set
3838
D(v)
3939
else
40-
error("Non-permuation mass matrix is not supported.")
40+
error("Non-permutation mass matrix is not supported.")
4141
end
4242
end
4343
end

0 commit comments

Comments
 (0)