I am a bit unclear about the requirement of stress formulation (SF) for cyclic boundary conditions (BC).
For cyclic BC, we need the opdssum subroutine, which essentially performs direct stiffness summation (vec_dssum) with the necessary rotations (rotate_cyc).
When SF is enabled, the ophinv routine from plan4 chooses one of two Helmholtz solvers:
If ifstrs is set (SF enabled):
It calls hmhzsf, which uses the coupled CG solver cggosf.
This solver calls opdssum at the required points, so cyclic BC works correctly.
If SF is not enabled:
It calls hsolve, which solves velocity components separately in the x, y, and z directions.
Since this is component-wise, opdssum cannot be used—only dssum is called.
From this, my understanding is that SF is not inherently required for cyclic BC—it simply forces the use of the coupled CG solver, which is what ensures the correct direct stiffness summation.
If we could select the coupled solver without enabling SF, cyclic BC should still work.
So my questions are:
Is this reasoning correct?
If so, how can we choose the coupled solver independently of SF?