// I'm assuming CFLCoats is a tensorField, didn't test with it being volTensorField but I imagine .ref() would then work :)
// gMax returns a tensor of component-wise maximum values for CFLCoats in all cells
// cmptMax then returns maximal algebraic value (not in magnitude) in the tensor
// which should represent the global max in all tensor directions.
CFLUse = cmptMax(gMax(CFLCoats));
I believe we need to divide on
mesh.V()
only once here:https://github.com/phorgue/porousMultiphaseFoam/blob/bd371c936d05cffd640845e3329b0c5639a753cc/solvers/anisoImpesFoam/CoatsNo.H#L18-L25
This should be done in this order (With line 18 postponed after capillarity is taken into account)
Let me if I'm missing anything...
Also, from what I understand, the lines https://github.com/phorgue/porousMultiphaseFoam/blob/bd371c936d05cffd640845e3329b0c5639a753cc/solvers/anisoImpesFoam/CoatsNo.H#L28-L40 are meant to find maximal CFL value in all tensor directions. Yeah, this can be retrieved with