LinearProblem is not avaliable for CPP?

Hi,
I saw that there is the function dolfinx.fem.petsc.LinearProblem in DOLFINx, but it seems like it is not avaliable for CPP? see for instance, in the demo here: https://github.com/FEniCS/dolfinx/blob/v0.6.0/cpp/demo/hyperelasticity/main.cpp does it mean that we always need to define it ourselves?

Thanks!

Yes.
You could Also make your own class, equivalent to linear problem in C++. The reason for it not being part of the core library, is that it adds minimal gain in C++, as you have to define your forms explicitly anyhow. The only thing it actually wraps up is the creation of petsc matrices, vectors and the ksp solver.