Skip to content

Commit 47b5b00

Browse files
Clean up exports
1 parent 1d92c52 commit 47b5b00

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

src/ModelingToolkit.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module ModelingToolkit
22

3+
export Operation, Expression
4+
export calculate_jacobian, generate_jacobian, generate_function
5+
export @register
6+
7+
38
using DiffEqBase
49
using StaticArrays, LinearAlgebra
510

@@ -30,9 +35,4 @@ include("function_registration.jl")
3035
include("simplify.jl")
3136
include("utils.jl")
3237

33-
export Operation, Expression, AbstractComponent
34-
export calculate_jacobian, generate_jacobian, generate_function
35-
export ArrayFunction, SArrayFunction
36-
export @register
37-
3838
end # module

src/differentials.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
export Differential, expand_derivatives, @deriv
2+
3+
14
struct Differential <: Function
25
x::Expression
36
end
@@ -79,5 +82,3 @@ end
7982
function calculate_jacobian(eqs,vars)
8083
Expression[Differential(vars[j])(eqs[i]) for i in 1:length(eqs), j in 1:length(vars)]
8184
end
82-
83-
export Differential, expand_derivatives, @deriv, calculate_jacobian

src/simplify.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
export simplify_constants
2+
3+
14
function simplify_constants(O::Operation, shorten_tree)
25
while true
36
O′ = _simplify_constants(O, shorten_tree)
@@ -72,5 +75,3 @@ function _simplify_constants(O::Operation, shorten_tree)
7275
end
7376
_simplify_constants(x, shorten_tree) = x
7477
_simplify_constants(x) = _simplify_constants(x, true)
75-
76-
export simplify_constants

src/systems/diffeqs/first_order_transform.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
export ode_order_lowering
2+
3+
14
function lower_varname(var::Variable, idv, order)
25
order == 0 && return var
36
name = Symbol(var.name, :_, string(idv.name)^order)
@@ -45,5 +48,3 @@ function rename(O::Expression)
4548
end
4649
return Operation(O.op, rename.(O.args))
4750
end
48-
49-
export ode_order_lowering

0 commit comments

Comments
 (0)