facGrad not compatible with cache of gradient
Summary
fac::grad manipulates result from fa::gradScheme. If this is a cached result it tries to modify the cached value.
Steps to reproduce
tutorial finiteArea/liquidFilmFoam/cylinder
with
cache
{
grad(h);
grad(Us);
}
Example case
See above
What is the current bug behaviour?
Attempted non-const access to const-ref:
--> FOAM FATAL ERROR: (openfoam-2309)
Attempted non-const reference to const object: tmp<N4Foam14GeometricFieldINS_6VectorIdEENS_12faPatchFieldENS_8areaMeshEEE>
What is the expected correct behavior?
Relevant logs and/or images
See above
Environment information
- OpenFOAM version : v2309
Possible fixes
Move caching up to this level?
Edited by Mark OLESEN