Request: Make generated operators scalable by a constant
Hi everyone. The idea of this issue is to introduce the possibility to rescale the new generated operators "on-the-fly" with a constant.
**Example:** Lets say my right hand side consists of a linear combination of terms and I assemble it by consecutively applying operators `A`, `B` and `C` (first with updateType _Replace_ and afterwards with _Add_) on some function `u`.
Now assume I want to individually rescale the different parts of the RHS between timesteps. In our example `A` and `B` might both arise from a multistep time discretisation and accordingly depend (not necessarily uniformly) on the variable timestep $\Delta t$. Further I may want to change the nondimensionalisation of our equation between time steps affecting the scaling of `C`.
Essentially I would want to be able to quickly evaluate
$$ \alpha A u + \beta B u + \gamma C u $$
for any given $\alpha, \beta, \gamma \in \mathbb{R}$ and i cannot simply do this via a call to `assign` because the scalings are not uniform and I do not want to do cascading `assign` calls.
In summary I would wish for functions `setConstantScaling` / `getConstantScaling` or something similar that are generated for the new Hyteg operators.
Thanks,
Andi
**Update:** Another example would be if you have generated an operator with the intent to use it for the left hand side and later on decide that you want to make the respective term explicit. A scaling then allows you to just scale the existing implementation with $-1$ and apply it on the right hand side.
**Update 2:** Adding a `scalar_constant_coefficient` in addition to the readily available `scalar_space_dependent_coefficient` that can afterwards be set in the constructor of the operator and changed via get/set functions would be a stand-in and a possible replacement for the feature requested above.
I also want to mention my merge request [!703](https://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/703) that implements an interface named `ScalableOperator` and allows for the "old-school" constant and elementwise operators to be scaled on-the-fly. It would be cool if the operators generated by the HFG could employ this interface.
issue