Have you considered using the function(x)/Eval functionality? See for instance Material property depending on solution - #2 by Maeggis
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| How to define a UserExpression that depends on the solution? | 5 | 3690 | March 21, 2019 | |
|
How to update an UserExpression for the next time step?
|
4 | 1524 | October 13, 2022 | |
| Update of old Fenics Code for Poisson Problem | 1 | 541 | July 3, 2020 | |
| Update time-dependent expression in PDE | 3 | 1108 | September 6, 2021 | |
|
Evaluate UserExpression with eval_cell
|
2 | 1797 | February 11, 2020 |