#! /bin/csh
#
set N = 10
if ($#argv > 0) then
    if ("$1" == "-help") then
	echo "$0 run tests of the solvers"
	exit 0;
    endif
    set N = $1
    shift
endif
#
foreach svmethod ( osm )
    # -itmethod lsqr only works for nopre for now
    foreach itmethod ( bcgs tfqmr )
	# A switch for the special cases:
	switch ($svmethod)

	case bdd:
	case osm:
	foreach decomp ( "" -2d )
  	    # lu (nd) inner method
            example3 -n $N -sv $svmethod -noheader -itmethod $itmethod \
	             $decomp -title "$svmethod $itmethod $decomp" $*
#	    # Inner iterations are not working yet...
#	    # Use -1 for iterate to convergence
#	    foreach maxit (1 2 3)
#	        foreach svinner ( jacobi ssor ilu bdd osm nopre )
#		    foreach itinner ( richardson gmres tcqmr bcgs cgs tfqmr )
#	               example3 -n $N -sv $svmethod -noheader \
#                               -itmethod $itmethod \
#			        -maxit $maxit -sv $svinner -itmethod $itinner \
#        -title "$svmethod $itmethod inner $svinner $itinner $maxit $decomp" $*
#                   end
#   		end
#	    end
	end

    end
end
