- Thank you received: 108
L2-GridFunction .Other()
7 years 3 months ago #143
by joachim
Replied by joachim on topic L2-GridFunction .Other()
Hi, I think we cannot do it directly quite now, but I see two solutions with reasonable effort:
1. Add the Other() operator also to CoefficientFunctions. It becomes a new node in the evaluation tree . We store the 'other' MappedIntegrationRule within the 'this' MappedIntegrationrule. On evaluating the OtherCoefficientFunction the intrules are swapped. If proxies appear within the other - subtree we need special treatment - I would exclude it for the first implementation.
2. The Apply and the AssembleLinearization is working quite now, right ? The problem comes only from the semi-linearization, where we differentiate some terms with respect to the trial-function, but we freeze the trial-function at some other places (and want to use the GridFunction instead). We could add a Freeze - function, which throws away the derivatives of the sub-tree.
Then Alex code would look like
What do you think ? How do we continue ?
Solution 1 (which will find more users soon) needs changes in the core code, I may find some time during the coming week for that, and you can test.
Solution 2 is additive and can be done by Alex, but I think it is quite special purpose.
Joachim
1. Add the Other() operator also to CoefficientFunctions. It becomes a new node in the evaluation tree . We store the 'other' MappedIntegrationRule within the 'this' MappedIntegrationrule. On evaluating the OtherCoefficientFunction the intrules are swapped. If proxies appear within the other - subtree we need special treatment - I would exclude it for the first implementation.
2. The Apply and the AssembleLinearization is working quite now, right ? The problem comes only from the semi-linearization, where we differentiate some terms with respect to the trial-function, but we freeze the trial-function at some other places (and want to use the GridFunction instead). We could add a Freeze - function, which throws away the derivatives of the sub-tree.
Then Alex code would look like
Code:
v = fes.TrialFunction()
u = Freeze(v)
What do you think ? How do we continue ?
Solution 1 (which will find more users soon) needs changes in the core code, I may find some time during the coming week for that, and you can test.
Solution 2 is additive and can be done by Alex, but I think it is quite special purpose.
Joachim
7 years 3 months ago #147
by joachim
Replied by joachim on topic L2-GridFunction .Other()
I have added the Other() operator for ordinary CFs.
Pls try it, it's tested only for a few simple cases by now, and certainly it needs some fixes.
Compile is not supported (Compile(True) throws, and Compile(False) falls back to standard evaluation).
Pls try it, it's tested only for a few simple cases by now, and certainly it needs some fixes.
Compile is not supported (Compile(True) throws, and Compile(False) falls back to standard evaluation).
The following user(s) said Thank You: alexschlueter, janfp
Time to create page: 0.091 seconds