Commit f0d75f5e authored by Ron Rahaman's avatar Ron Rahaman
Browse files

Tweaking .usr file

parent fbd62346
......@@ -11,6 +11,8 @@ AC_INIT([Nek5000], [1.0], [nek5000-users@lists.mcs.anl.gov])
# COMMAND-LINE OPTS
###############################################################################
AC_ARG_VAR([CASENAME], [the Nek5000 case name (i.e., the name of the .usr and .rea files)])
AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--disable-debug], [compile without debug flags (-g) @<:@default: enabled@:>@])],
[debug="$enableval"], [debug="yes"])
......@@ -336,6 +338,90 @@ if test $? -ne 0; then
fi
fi
###############################################################################
# TWEAK .usr file
###############################################################################
AC_CHECK_FILE([$CASENAME.usr], ,
AC_MSG_ERROR([could not find $CASENAME.usr in current directory. Ensure that \$CASENAME is correctly set.])
)
AC_MSG_NOTICE([tweaking $CASENAME.usr])
rm -f $CASENAME.f
cp -p $CASENAME.usr $CASENAME.f
cat $CASENAME.f | grep -i "subroutine.*usrsetvert" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
subroutine usrsetvert(glo_num,nel,nx,ny,nz) ! to modify glo_num
integer*8 glo_num(1)
return
end
_ACEOF
fi
if test "x$cmt" = "xyes"; then
cat $CASENAME.f | grep -i "subroutine.*cmt_switch" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
subroutine cmt_switch ! to set IFCMT logical flag
include 'SIZE'
include 'INPUT'
IFCMT=.true.
return
end
_ACEOF
fi
fi
cat $CASENAME.f | grep -i "subroutine.*usrflt" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
subroutine usrflt(rmult) ! user defined filter
include 'SIZE'
real rmult(lx1)
call rone(rmult,lx1)
return
end
_ACEOF
fi
cat $CASENAME.f | grep -i "subroutine.*userflux" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
subroutine userflux ! user defined flux
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
real fluxout(lx1*lz1)
return
end
_ACEOF
fi
cat $CASENAME.f | grep -i "subroutine.*userEOS" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
subroutine userEOS ! user defined EOS
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
return
end
_ACEOF
fi
###############################################################################
# ALL DONE!
###############################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment