Internal renaming in engine
Before really starting !439 (merged) it would make sense to rename some things in the engines. The proposal is as follows:
- The engines have methods and members corresponding to data vectors. Current naming is like this:
residual | Residual, Solution |
jacobian | Jacobian, Solution |
jacobian_apply | Residual, Solution |
nonlinear_jacobian_apply | Residual, Solution, Update |
- The proposal is to change those names to:
residual | Residual, Solution |
jacobian | Jacobian, Solution |
jacobian_apply | Result, Update |
nonlinear_jacobian_apply | Result, Update, Solution |
The changes would be: Solution->Update in the linear case of jacobian_apply and Solution->Update, Update->Solution in the nonlinear case of jacobian_apply. For me it would also be fine to always call the result 'Result' and not 'Residual' or 'Jacobian'.
- Why renaming?
Residual form:
r(u,v)=a(u,v)-b
Residual vector:
(R(z))_i = r(\sum_j(z)_j\phi_j, \phi_i)
Jacobian:
\nabla R(z)
Jacobian Apply:
\nabla R(z) w
If you look at the jacobian and the jacobian_apply the names of the objects should be different since they have different mathematical meaning. If it stays as it is, it is really confusing in the nonlinear case since the Solution at the moment corresponds to w and the update to z and this doesn't make any sense at all.
After renaming the name update actually makes sense. If you think about a Newton solver or a linear solver in residual formulation you actually evaluate the jacobian for a given solution and try to solve for an update. So calling z Solution and w update seems reasonable.