BUG: using adjointRotatingWallVelocity causes the computation of sensitivities to crash
Summary
If a case contains both adjointRotatingWallVelocity and adjointWallVelocity boundary conditions and sensitivity derivatives are computed over both these kind of patches, the computation of the sensitivities will crash due to an unallocated tmp. Cases with only adjointRotatingWallVelocity or adjointWallVelocity are not problematic.
What is the current bug behaviour?
The bug manifest in incompressibleAdjointSolver::accumulateBCSensitivityIntegrand
If no patch with an adjointRotatingWallVelocity boundary condition exists, the function exits immediately, causing no issue. If there are only patches with adjointRotatingWallVelocity boundary conditions in the sensitivity-related patches, all of them return a valid tmp<tensorField> from Uab.dxdbMult(). A combination of both boundary condition types in the sensitivity-related patches results in unallocated tmps.
Possible fixes
Safeguard the computation of bcDxDbMult by checking the validity of the tmp<tensorField> returned by adjointWallVelocity::dxdbMult()