anchor.diff:    enddo 
       NonZeros=nzz-1
       MatrixSize=nzz_row-1
  -
       call enter_exit(sub_name,2)
     end subroutine calc_sparse_size
   
  
positive.code: !! Define boundary conditions
      !first call to define inlet boundary conditions
      call boundary_conditions(ADD,FIX,bc_type,grav_vect,density,inletbc,outletbc,&
        depvar_at_node,depvar_at_elem,prq_solution,mesh_dof)
      !second call if simple tree need to define pressure bcs at all terminal branches
      if(mesh_type.eq.'simple_tree')then
          ADD=.TRUE.
          call boundary_conditions(ADD,FIX,bc_type,grav_vect,density,inletbc,outletbc,&
              depvar_at_node,depvar_at_elem,prq_solution,mesh_dof)   
      endif
  
   
  
negative.code:         enddo
        endif!first or subsequent iteration
  !! ----CALL SOLVER----
        call pmgmres_ilu_cr(MatrixSize, NonZeros, SparseRow, SparseCol, SparseVal, &
           solver_solution, RHS, 500, 500,1.d-5,1.d-4,SOLVER_FLAG)
         if(SOLVER_FLAG == 0)then 
  