Derivative in C++ of a CoefficientFunction from python

Hi from home office :slight_smile:

Can I differentiate a coefficientfunction in C++ that is passed from python?
Assuming cf is the shared_ptr coming from python

cf->Diff(MakeCoordinateCoefficientFunction (0), make_shared<ConstantCoefficientFunction>(1) );

does not work. It seems, I need exactly the same CoordinateCoefficientFunction and cannot use a new one, right?
Is there another way than passing “x” from python?


good point.

I just changed the differentiation of Coordinate-CFs such that dx/dx is always 1


Works perfectly! Thank you!