sum and weighted-sum opertors are broken since MR!439
!439 (merged) changed the behaviour of the call switch. It now contains an isLinear flag. This broke the InstationarySumLocalOperator
and the WeightedSumLocalOperator
.
These classes are local operators, but forward calls to other local operators. The issue is now, that the opertor des not know whether it is invoked in a linear or non-linear context.
If I understand the idea correctly, we have to define
isLinear = false
as in the non-linear case we get more parameters and we have to be prepared for potential sub-operators, which require the linearization point. Then we can implement the forward call, where we invoke the LocalAssemblerCallSwitch
like
LocalAssemblerCallSwitch<OP, OP::, OP::isLinear>::
jacobian_apply_volume(eg,lfsu,x,z,lfsv,y);
An important question which I don't understand... why do I have to specify isLinear
explicitly? Can't we just write the call-switch as
template<typename LA, bool doIt, bool isLinear = LA::isLinear>
struct LocalAssemblerCallSwitch
If I understand correctly these changes only concern on-the-fly operators, so that all these necessary code changes would be obsolete for linear operators, if we write the struct as suggested. You could even add the bool to the function calls and use a SFINAE, but I agree that specializing the class way might be easier to read.