Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

L2-GridFunction .Other()

More
6 years 8 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
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
More
6 years 8 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).
The following user(s) said Thank You: alexschlueter, janfp
Time to create page: 0.137 seconds