Derivative in C++ of a CoefficientFunction from python

More
4 years 5 months ago #2770 by paul.stocker
Hi from home office :)

Can I differentiate a coefficientfunction in C++ that is passed from python?
Assuming cf is the shared_ptr<CoefficientFunction> coming from python
Code:
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?

Cheers,
Paul
More
4 years 5 months ago #2771 by joachim
good point.

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

Joachim
The following user(s) said Thank You: paul.stocker
More
4 years 5 months ago #2780 by paul.stocker
Works perfectly! Thank you!
Time to create page: 0.094 seconds