Splitting a Form into parts which do and don't contain a given Argument #4107
-
I have a Form which I would like to separate into two Forms: the terms which contain a given Argument and the terms which do not. I will then modify these Forms separately and add them back together. As an example, consider the modified Poisson equation
I realize this is unnecessarily complicated for this example, but I am looking for a general method. ufl.algorithms.formsplitter.extract_blocks nearly achieves what I'm looking for except the resulting terms appear to be associated with individual FunctionSpaces instead of the original MixedFunctionSpace. This caused errors when I tried to use the Form which resulted from adding the pieces together. I appreciate any help! Please let me know if additional information is needed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think you can use UFL
|
Beta Was this translation helpful? Give feedback.
I think you can use UFL
replace
withas_vector
: