Hello Christopher,
thank you for the help.
I got as far as making a CoefficientFunction that gives the element number.
But I need the CoefficientFunction to know the element weights. You said to store the weights in an array. At what point can I do that?
I tried to initialize with the array.
The idea was to initialize my custom CoefficientFunction like this:
Code:
cf = ElementWeightCF(weights)
But that didn't work:
Code:
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. CppExtension.cppextension.ElementWeightCF()
It seems like the issue is to initialize the ngsolve CoefficientFunction with to many arguments.
You can find my .hpp file in the attachments.
How can I fix that issue or is there a better way of passing the element weights to my c++ CoefficientFunction?
Thanks in advance
Nils