Skip to content

Commit 0b6edca

Browse files
add required name for PDESystem
1 parent 6e16d47 commit 0b6edca

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/systems/pde/pdesystem.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,21 @@ struct PDESystem <: ModelingToolkit.AbstractMultivariateSystem
5656
type: type of the system
5757
"""
5858
connection_type::Any
59+
"""
60+
name: the name of the system
61+
"""
62+
name::Symbol
5963
@add_kwonly function PDESystem(eqs, bcs, domain, ivs, dvs,
6064
ps=SciMLBase.NullParameters();
6165
defaults=Dict(),
6266
connection_type = nothing,
6367
checks::Bool = true
68+
name
6469
)
6570
if checks
6671
check_units(eqs)
6772
end
68-
new(eqs, bcs, domain, ivs, dvs, ps, defaults, connection_type)
73+
new(eqs, bcs, domain, ivs, dvs, ps, defaults, connection_type, name)
6974
end
7075
end
7176

test/pde.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ bcs = [u(0,x) ~ - x * (x-1) * sin(x),
1212
domains = [t (0.0,1.0),
1313
x (0.0,1.0)]
1414

15-
pdesys = PDESystem(eq,bcs,domains,[t,x],[u])
15+
@named pdesys = PDESystem(eq,bcs,domains,[t,x],[u])
1616

1717
@test all(isequal.(independent_variables(pdesys), [t,x]))

0 commit comments

Comments
 (0)