anchor.diff:      integer :: grav_dirn,no,depvar,KOUNT,nz,ne,SOLVER_FLAG,ne0,ne1,nj
       real(dp) :: MIN_ERR,N_MIN_ERR,elasticity_parameters(3),mechanics_parameters(2),grav_factor,P1
       real(dp) :: P2,Q01,Rin,Rout,x_cap,y_cap,z_cap,Ppl,LPM_R,Lin,Lout
  +    integer :: update_flow_nzz_row
   
       sub_name = 'evaluate_prq'
       call enter_exit(sub_name,1)
  
positive.code:         endif
        else!Need to update just the resistance values in the solution matrix
          do ne=1,num_elems !update for all ne
            nz=update_resistance_entries(ne)
            SparseVal(nz)=-elem_field(ne_resist,ne) !Just updating resistance
          enddo
        endif!first or subsequent iteration
  !! ----CALL SOLVER----
        call pmgmres_ilu_cr(MatrixSize, NonZeros, SparseRow, SparseCol, SparseVal, &
  
negative.code: 
      use diagnostics, only: enter_exit
  
      character(len=60) :: bc_type
      real(dp), intent(in) :: density
      real(dp), intent(in) :: grav_vect(3)
      integer, intent(in) :: mesh_dof
  