Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nek5000
giraffe
Commits
f0d75f5e
Commit
f0d75f5e
authored
Dec 13, 2016
by
Ron Rahaman
Browse files
Tweaking .usr file
parent
fbd62346
Changes
1
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
f0d75f5e
...
...
@@ -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!
###############################################################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment