From 68dfae6b6a4a73ec888ed9333ad36d3cc21080fa Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Wed, 20 Sep 2023 21:51:59 +0100 Subject: [PATCH] add module to RuntimeGeneratedFunctions call (#2259) Co-authored-by: Yingbo Ma --- src/systems/pde/pdesystem.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/systems/pde/pdesystem.jl b/src/systems/pde/pdesystem.jl index 048dbf304e..7e54538d7d 100644 --- a/src/systems/pde/pdesystem.jl +++ b/src/systems/pde/pdesystem.jl @@ -94,6 +94,7 @@ struct PDESystem <: ModelingToolkit.AbstractMultivariateSystem analytic = nothing, analytic_func = nothing, gui_metadata = nothing, + eval_module = @__MODULE__, checks::Union{Bool, Int} = true, name) if checks == true || (checks & CheckUnits) > 0 @@ -114,7 +115,7 @@ struct PDESystem <: ModelingToolkit.AbstractMultivariateSystem p = ps isa SciMLBase.NullParameters ? [] : map(a -> a.first, ps) args = vcat(DestructuredArgs(p), args) ex = Func(args, [], eq.rhs) |> toexpr - eq.lhs => drop_expr(@RuntimeGeneratedFunction(ex)) + eq.lhs => drop_expr(@RuntimeGeneratedFunction(eval_module, ex)) end end end