@@ -274,15 +274,14 @@ function (H::PseudoHamiltonianVectorField{
274274 x, p, u, v; variable_costate:: Bool = false
275275)
276276 variable_costate || return H. f (x, p, u, v)
277- hasmethod (
278- H. f, Tuple{typeof (x),typeof (p),typeof (u),typeof (v)}, (:variable_costate ,)
279- ) || throw (
280- Exceptions. PreconditionError (
281- " variable_costate=true is not supported by this PseudoHamiltonianVectorField's inner function" ;
282- suggestion= " Provide an inner function accepting a `variable_costate::Bool` keyword and returning `(dx, dp, dpv)` when true" ,
283- context= " PseudoHamiltonianVectorField Autonomous/NonFixed call" ,
284- ),
285- )
277+ hasmethod (H. f, Tuple{typeof (x),typeof (p),typeof (u),typeof (v)}, (:variable_costate ,)) ||
278+ throw (
279+ Exceptions. PreconditionError (
280+ " variable_costate=true is not supported by this PseudoHamiltonianVectorField's inner function" ;
281+ suggestion= " Provide an inner function accepting a `variable_costate::Bool` keyword and returning `(dx, dp, dpv)` when true" ,
282+ context= " PseudoHamiltonianVectorField Autonomous/NonFixed call" ,
283+ ),
284+ )
286285 return H. f (x, p, u, v; variable_costate= true )
287286end
288287
@@ -293,9 +292,7 @@ function (H::PseudoHamiltonianVectorField{
293292)
294293 variable_costate || return H. f (t, x, p, u, v)
295294 hasmethod (
296- H. f,
297- Tuple{typeof (t),typeof (x),typeof (p),typeof (u),typeof (v)},
298- (:variable_costate ,),
295+ H. f, Tuple{typeof (t),typeof (x),typeof (p),typeof (u),typeof (v)}, (:variable_costate ,)
299296 ) || throw (
300297 Exceptions. PreconditionError (
301298 " variable_costate=true is not supported by this PseudoHamiltonianVectorField's inner function" ;
0 commit comments