File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -363,17 +363,20 @@ struct AddedOperator{T,
363363 } <: AbstractSciMLOperator{T}
364364 ops:: O
365365
366- function AddedOperator (ops:: AbstractSciMLOperator... )
367- sz = size (first (ops))
368- for op in ops[2 : end ]
369- @assert size (op) == sz " Size mismatich in operators $ops "
370- end
371-
366+ function AddedOperator (ops)
372367 T = promote_type (eltype .(ops)... )
373368 new {T,typeof(ops)} (ops)
374369 end
375370end
376371
372+ function AddedOperator (ops:: AbstractSciMLOperator... )
373+ sz = size (first (ops))
374+ for op in ops[2 : end ]
375+ @assert size (op) == sz " Size mismatich in operators $ops "
376+ end
377+ AddedOperator (ops)
378+ end
379+
377380# constructors
378381Base.:+ (ops:: AbstractSciMLOperator... ) = AddedOperator (ops... )
379382Base.:- (A:: AbstractSciMLOperator , B:: AbstractSciMLOperator ) = AddedOperator (A, - B)
You can’t perform that action at this time.
0 commit comments