Hi Andrew, I think you can just use the `.subs()` method on a sympy expression and provide mappings from Sympy symbols to Firedrake objects such as Functions, TestFunctions, or TrialFunctions. Alternatively, you can write your manufactured solution in UFL directly and just use UFL’s differentiation operations to compute the required source term, bypassing sympy altogether. Cheers, David From: <firedrake-bounces@imperial.ac.uk> on behalf of Andrew Hicks <ahick17@lsu.edu> Date: Thursday, 16 April 2020 at 01:35 To: firedrake <firedrake@imperial.ac.uk> Subject: [firedrake] SymPy to UFL Hi all, I am currently trying to work on projects such as manufacturing solutions for PDE’s. I will mainly be using SymPy for this. My question is, is there a way to take a SymPy expression in my code and apply some function to it to convert it to UFL format, so that I can then use it in my firedrake functions? Thanks, Andrew Hicks
participants (1)
- 
                
                Ham, David A