Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
giraffe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nek5000
giraffe
Commits
7eb07262
Commit
7eb07262
authored
Jul 20, 2017
by
Ron Rahaman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed outdated "hello_nek" example
parent
45a7bd80
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
0 additions
and
3662 deletions
+0
-3662
examples/hello_nek/Makefile.moon
examples/hello_nek/Makefile.moon
+0
-41
examples/hello_nek/SESSION.NAME
examples/hello_nek/SESSION.NAME
+0
-2
examples/hello_nek/SIZE
examples/hello_nek/SIZE
+0
-118
examples/hello_nek/app.mk
examples/hello_nek/app.mk
+0
-163
examples/hello_nek/diffusion_pathological.i
examples/hello_nek/diffusion_pathological.i
+0
-55
examples/hello_nek/eddy_uv.map
examples/hello_nek/eddy_uv.map
+0
-257
examples/hello_nek/eddy_uv.rea
examples/hello_nek/eddy_uv.rea
+0
-1959
examples/hello_nek/eddy_uv.usr
examples/hello_nek/eddy_uv.usr
+0
-279
examples/hello_nek/ex01.i
examples/hello_nek/ex01.i
+0
-43
examples/hello_nek/gold/ex01_out.e
examples/hello_nek/gold/ex01_out.e
+0
-0
examples/hello_nek/include/README
examples/hello_nek/include/README
+0
-3
examples/hello_nek/include/base/Ex01Revision.h
examples/hello_nek/include/base/Ex01Revision.h
+0
-8
examples/hello_nek/include/base/ExampleApp.h
examples/hello_nek/include/base/ExampleApp.h
+0
-35
examples/hello_nek/include/base/NekInterface.h
examples/hello_nek/include/base/NekInterface.h
+0
-50
examples/hello_nek/makefile
examples/hello_nek/makefile
+0
-321
examples/hello_nek/makenek
examples/hello_nek/makenek
+0
-92
examples/hello_nek/makenek.mac
examples/hello_nek/makenek.mac
+0
-93
examples/hello_nek/mug.e
examples/hello_nek/mug.e
+0
-0
examples/hello_nek/nek.mk
examples/hello_nek/nek.mk
+0
-16
examples/hello_nek/square.e
examples/hello_nek/square.e
+0
-0
examples/hello_nek/src/base/ExampleApp.C
examples/hello_nek/src/base/ExampleApp.C
+0
-60
examples/hello_nek/src/main.C
examples/hello_nek/src/main.C
+0
-67
No files found.
examples/hello_nek/Makefile.moon
deleted
100644 → 0
View file @
45a7bd80
###############################################################################
################### MOOSE Application Standard Makefile #######################
###############################################################################
#
# Optional Environment variables
# MOOSE_DIR - Root directory of the MOOSE project
# FRAMEWORK_DIR - Location of the MOOSE framework
#
###############################################################################
EXAMPLE_DIR
?=
$(
shell
dirname
`
pwd
`
)
MOOSE_DIR
?=
$(
shell
dirname
$(EXAMPLE_DIR)
)
/src/moose
FRAMEWORK_DIR
?=
$(MOOSE_DIR)
/framework
###############################################################################
TEST
:=
test_ignore
# framework
include
$(FRAMEWORK_DIR)/build.mk
include
$(FRAMEWORK_DIR)/moose.mk
APPLICATION_NAME
:=
ex01
# dep apps
APPLICATION_DIR
:=
$(
shell
pwd
)
APPLICATION_NAME
:=
ex01
BUILD_EXEC
:=
yes
DEP_APPS
:=
$(
shell
$(FRAMEWORK_DIR)
/scripts/find_dep_apps.py
$(APPLICATION_NAME)
)
include
nek.mk
include
app.mk
include
../test.mk
# Include dependency files for this example
ex_srcfiles
:=
$(
shell
find
$(APPLICATION_DIR)
-name
"*.C"
)
ex_deps
:=
$(
patsubst
%.C, %.
$
(
obj-suffix
)
.d,
$(ex_srcfiles)
)
-include
$(ex_deps)
###############################################################################
# Additional special case targets should be added here
test
:
all
$(
call
TEST_exodiff,ex01.i,ex01_out.e
)
examples/hello_nek/SESSION.NAME
deleted
100644 → 0
View file @
45a7bd80
eddy_uv
/Users/rahaman/repos/moon/examples/hello_nek
examples/hello_nek/SIZE
deleted
100644 → 0
View file @
45a7bd80
C Dimension file to be included
C
C HCUBE array dimensions
C
parameter (ldim=2)
parameter (lx1=8,ly1=lx1,lz1=1,lelt=300,lelv=lelt)
parameter (lxd=12,lyd=lxd,lzd=1)
parameter (lelx=20,lely=20,lelz=1)
parameter (lzl=3 + 2*(ldim-3))
parameter (lx2=lx1-2)
parameter (ly2=ly1-2)
parameter (lz2=lz1 )
parameter (lx3=lx1)
parameter (ly3=ly1)
parameter (lz3=lz1)
parameter (lp = 512)
parameter (lelg = 4100)
c
c parameter (lpelv=lelv,lpelt=lelt,lpert=3) ! perturbation
c parameter (lpx1=lx1,lpy1=ly1,lpz1=lz1) ! array sizes
c parameter (lpx2=lx2,lpy2=ly2,lpz2=lz2)
c
parameter (lpelv=1,lpelt=1,lpert=1) ! perturbation
parameter (lpx1=1,lpy1=1,lpz1=1) ! array sizes
parameter (lpx2=1,lpy2=1,lpz2=1)
c
c parameter (lbelv=lelv,lbelt=lelt) ! MHD
c parameter (lbx1=lx1,lby1=ly1,lbz1=lz1) ! array sizes
c parameter (lbx2=lx2,lby2=ly2,lbz2=lz2)
c
parameter (lbelv=1,lbelt=1) ! MHD
parameter (lbx1=1,lby1=1,lbz1=1) ! array sizes
parameter (lbx2=1,lby2=1,lbz2=1)
C LX1M=LX1 when there are moving meshes; =1 otherwise
parameter (lx1m=1,ly1m=1,lz1m=1)
parameter (ldimt= 2) ! 2 passive scalars + T
parameter (ldimt1=ldimt+1)
parameter (ldimt3=ldimt+3)
c
c Note: In the new code, LELGEC should be about sqrt(LELG)
c
PARAMETER (LELGEC = 1)
PARAMETER (LXYZ2 = 1)
PARAMETER (LXZ21 = 1)
PARAMETER (LMAXV=LX1*LY1*LZ1*LELV)
PARAMETER (LMAXT=LX1*LY1*LZ1*LELT)
PARAMETER (LMAXP=LX2*LY2*LZ2*LELV)
PARAMETER (LXZ=LX1*LZ1)
PARAMETER (LORDER=3)
PARAMETER (MAXOBJ=4,MAXMBR=LELT*6)
PARAMETER (lhis=100) ! # of pts a proc reads from hpts.in
! Note: lhis*np > npoints in hpts.in
C
C Common Block Dimensions
C
PARAMETER (LCTMP0 =2*LX1*LY1*LZ1*LELT)
PARAMETER (LCTMP1 =4*LX1*LY1*LZ1*LELT)
C
C The parameter LVEC controls whether an additional 42 field arrays
C are required for Steady State Solutions. If you are not using
C Steady State, it is recommended that LVEC=1.
C
PARAMETER (LVEC=1)
C
C Uzawa projection array dimensions
C
parameter (mxprev = 20)
parameter (lgmres = 30)
C
C Split projection array dimensions
C
parameter(lmvec = 1)
parameter(lsvec = 1)
parameter(lstore=lmvec*lsvec)
c
c NONCONFORMING STUFF
c
parameter (maxmor = lelt)
C
C Array dimensions
C
COMMON/DIMN/NELV,NELT,NX1,NY1,NZ1,NX2,NY2,NZ2
$,NX3,NY3,NZ3,NDIM,NFIELD,NPERT,NID
$,NXD,NYD,NZD
c automatically added by makenek
parameter(lxo = lx1) ! max output grid size (lxo>=lx1)
c automatically added by makenek
parameter(lpart = 1 ) ! max number of particles
c automatically added by makenek
integer ax1,ay1,az1,ax2,ay2,az2
parameter (ax1=lx1,ay1=ly1,az1=lz1,ax2=lx2,ay2=ly2,az2=lz2) ! running averages
c automatically added by makenek
parameter (lxs=1,lys=lxs,lzs=(lxs-1)*(ldim-2)+1) !New Pressure Preconditioner
c automatically added by makenek
parameter (lfdm=0) ! == 1 for fast diagonalization method
c automatically added by makenek
common/IOFLAG/nio ! for logfile verbosity control
c automatically added by makenek
integer toteq
parameter(toteq = 1 ) ! Number of conserved variables
c IFCMT=FALSE then toteq=1
c automatically added by makenek
integer lelcmt
parameter(lelcmt = 1 ) ! # of cmt elements
c IFCMT=FALSE then lelcmt=1
examples/hello_nek/app.mk
deleted
100644 → 0
View file @
45a7bd80
# This file contains common MOOSE application settings
# Note: MOOSE applications are assumed to reside in peer directories relative to MOOSE and its modules.
# This can be overridden by using the MOOSE_DIR environment variable
# list of application-wide excluded source files
excluded_srcfiles
:=
#
# Save off parameters for possible app.mk recursion
#
STACK
?=
stack
STACK
:=
$(STACK)
.X
$APPLICATION_DIR$(STACK)
:=
$(APPLICATION_DIR)
$APPLICATION_NAME$(STACK)
:=
$(APPLICATION_NAME)
$DEPEND_MODULES$(STACK)
:=
$(DEPEND_MODULES)
$BUILD_EXEC$(STACK)
:=
$(BUILD_EXEC)
$DEP_APPS$(STACK)
:=
$(DEP_APPS)
-include
$(APPLICATION_DIR)/$(APPLICATION_NAME).mk
#
# Restore parameters
#
APPLICATION_DIR
:=
$
(
$APPLICATION_DIR$(STACK)
)
APPLICATION_NAME
:=
$
(
$APPLICATION_NAME$(STACK)
)
DEPEND_MODULES
:=
$
(
$DEPEND_MODULES$(STACK)
)
BUILD_EXEC
:=
$
(
$BUILD_EXEC$(STACK)
)
DEP_APPS
:=
$
(
$DEP_APPS$(STACK)
)
STACK
:=
$(
basename
$(STACK)
)
##############################################################################
######################### Application Variables ##############################
##############################################################################
#
# source files
SRC_DIRS
:=
$(APPLICATION_DIR)
/src
PLUGIN_DIR
:=
$(APPLICATION_DIR)
/plugins
excluded_srcfiles
+=
main.C
find_excludes
:=
$(
foreach
i,
$(excluded_srcfiles)
,
-not
-name
$(i)
)
srcfiles
:=
$(
shell
find
$(SRC_DIRS)
-name
"*.C"
$(find_excludes)
)
csrcfiles
:=
$(
shell
find
$(SRC_DIRS)
-name
"*.c"
)
fsrcfiles
:=
$(
shell
find
$(SRC_DIRS)
-name
"*.f"
)
f90srcfiles
:=
$(
shell
find
$(SRC_DIRS)
-name
"*.f90"
)
# object files
objects
:=
$(
patsubst
%.C, %.
$
(
obj-suffix
)
,
$(srcfiles)
)
cobjects
:=
$(
patsubst
%.c, %.
$
(
obj-suffix
)
,
$(csrcfiles)
)
fobjects
:=
$(
patsubst
%.f, %.
$
(
obj-suffix
)
,
$(fsrcfiles)
)
f90objects
:=
$(
patsubst
%.f90, %.
$
(
obj-suffix
)
,
$(f90srcfiles)
)
app_objects
:=
$(objects)
$(cobjects)
$(fobjects)
$(f90objects)
$(ADDITIONAL_APP_OBJECTS)
# plugin files
plugfiles
:=
$(
shell
find
$(PLUGIN_DIR)
-name
"*.C"
2>/dev/null
)
cplugfiles
:=
$(
shell
find
$(PLUGIN_DIR)
-name
"*.c"
2>/dev/null
)
fplugfiles
:=
$(
shell
find
$(PLUGIN_DIR)
-name
"*.f"
2>/dev/null
)
f90plugfiles
:=
$(
shell
find
$(PLUGIN_DIR)
-name
"*.f90"
2>/dev/null
)
# plugins
plugins
:=
$(
patsubst
%.C, %-
$(METHOD)
.plugin,
$(plugfiles)
)
plugins
+=
$(
patsubst
%.c, %-
$(METHOD)
.plugin,
$(cplugfiles)
)
plugins
+=
$(
patsubst
%.f, %-
$(METHOD)
.plugin,
$(fplugfiles)
)
plugins
+=
$(
patsubst
%.f90, %-
$(METHOD)
.plugin,
$(f90plugfiles)
)
# main
main_src
:=
$(APPLICATION_DIR)
/src/main.C
# Main must be located here!
main_object
:=
$(
patsubst
%.C, %.
$
(
obj-suffix
)
,
$(main_src)
)
# dependency files
app_deps
:=
$(
patsubst
%.C, %.
$
(
obj-suffix
)
.d,
$(srcfiles)
)
\
$(
patsubst
%.c, %.
$
(
obj-suffix
)
.d,
$(csrcfiles)
)
\
$(
patsubst
%.C, %.
$
(
obj-suffix
)
.d,
$(main_src)
)
\
$(ADDITIONAL_APP_DEPS)
depend_dirs
:=
$(
foreach
i,
$(DEPEND_MODULES)
,
$(MOOSE_DIR)
/modules/
$(i)
/include
)
depend_dirs
+=
$(APPLICATION_DIR)
/include
# header files
include_dirs
:=
$(
shell
find
$(depend_dirs)
-type
d |
grep
-v
"
\.
svn"
)
app_INCLUDE
:=
$(
foreach
i,
$(include_dirs)
,
-I
$(i)
)
$(ADDITIONAL_INCLUDES)
# clang static analyzer files
app_analyzer
:=
$(
patsubst
%.C, %.plist.
$
(
obj-suffix
)
,
$(srcfiles)
)
# library
app_LIB
:=
$(APPLICATION_DIR)
/lib/lib
$(APPLICATION_NAME)
-
$(METHOD)
.la
# application
app_EXEC
:=
$(APPLICATION_DIR)
/
$(APPLICATION_NAME)
-
$(METHOD)
# revision header
CAMEL_CASE_NAME
:=
$(
shell
echo
$(APPLICATION_NAME)
| perl
-pe
's/(?:^|_
)
([a-z]
)
/\u$$1/g'
)
app_BASE_DIR
?=
base/
app_HEADER
:=
$(APPLICATION_DIR)
/include/
$(app_BASE_DIR)$(CAMEL_CASE_NAME)
Revision.h
# depend modules
depend_libs
:=
$(
foreach
i,
$(DEPEND_MODULES)
,
$(MOOSE_DIR)
/modules/
$(i)
/lib/lib
$(i)
-
$(METHOD)
.la
)
##################################################################################################
# If we are NOT building a module, then make sure the dependency libs are updated to reflect
# all real dependencies
##################################################################################################
ifeq
(,$(findstring $(APPLICATION_NAME), $(MODULE_NAMES)))
depend_libs
:=
$(depend_libs)
$(app_LIBS)
endif
# Here we'll filter out MOOSE libs since we'll assume our application already has MOOSE compiled in
depend_libs
:=
$(
filter-out
$(moose_LIBS)
,
$(depend_libs)
)
# Create -L/-l versions of the depend libs
depend_libs_flags
:=
$(
foreach
i,
$(depend_libs)
,
-L
$(
dir
$(i)
)
-l
$(
shell
echo
$(
notdir
$(i)
)
| perl
-pe
's/^lib(.*?
)
\.la/$$1/'
))
# If building shared libs, make the plugins a dependency, otherwise don't.
ifeq
($(libmesh_shared),yes)
app_plugin_deps
:=
$(plugins)
else
app_plugin_deps
:=
endif
app_LIBS
:=
$(app_LIB)
$(app_LIBS)
app_LIBS_other
:=
$(
filter-out
$(app_LIB)
,
$(app_LIBS)
)
app_HEADERS
:=
$(app_HEADER)
$(app_HEADERS)
app_INCLUDES
+=
$(app_INCLUDE)
app_DIRS
+=
$(APPLICATION_DIR)
# WARNING: the += operator does NOT work here!
ADDITIONAL_CPPFLAGS
:=
$(ADDITIONAL_CPPFLAGS)
-D
$(
shell
echo
$(APPLICATION_NAME)
| perl
-pe
'y/a-z/A-Z/'
| perl
-pe
's/-//g'
)
_ENABLED
# dependencies
-include
$(app_deps)
# Rest the DEPEND_MODULES variable in case this file is sourced again
DEPEND_MODULES
:=
###############################################################################
# Build Rules:
#
###############################################################################
ifeq
($(BUILD_EXEC),yes)
all
::
$(app_EXEC)
endif
$(app_objects)
:
$(app_HEADER)
# Target-specific Variable Values (See GNU-make manual)
$(app_HEADER)
:
curr_dir := $(APPLICATION_DIR)
$(app_HEADER)
:
curr_app := $(APPLICATION_NAME)
$(app_HEADER)
:
@
echo
"MOOSE Generating Header "
$@
"..."
$(
shell
$(FRAMEWORK_DIR)
/scripts/get_repo_revision.py
$(curr_dir)
$@
$(curr_app)
)
# Target-specific Variable Values (See GNU-make manual)
$(app_LIB)
:
curr_objs := $(app_objects)
$(app_LIB)
:
curr_dir := $(APPLICATION_DIR)
$(app_LIB)
:
curr_deps := $(depend_libs)
$(app_LIB)
:
curr_libs := $(depend_libs_flags)
$(app_LIB)
:
$(app_objects) $(app_plugin_deps) $(app_HEADER) $(depend_libs)
@
echo
"Linking Library "
$@
"..."
@
$(libmesh_LIBTOOL)
--tag
=
CXX
$(LIBTOOLFLAGS)
--mode
=
link
--quiet
\
$(libmesh_CXX)
$(libmesh_CXXFLAGS)
-o
$@
$(curr_objs)
$(libmesh_LDFLAGS)
$(EXTERNAL_FLAGS)
-rpath
$(curr_dir)
/lib
$(curr_libs)
@
$(libmesh_LIBTOOL)
--mode
=
install
--quiet
install
-c
$@
$(curr_dir)
/lib
$(app_EXEC)
:
$(app_LIBS) $(mesh_library) $(main_object) $(nek_LIB) $(nek_OBJ)
@
echo
"Linking Executable "
$@
"..."
@
$(libmesh_LIBTOOL)
--tag
=
CXX
$(LIBTOOLFLAGS)
--mode
=
link
--quiet
$(libmesh_CXX)
$(libmesh_CXXFLAGS)
-o
$@
$(main_object)
$(nek_LIB)
$(nek_OBJ)
$(app_LIBS)
$(libmesh_LIBS)
$(libmesh_LDFLAGS)
$(EXTERNAL_FLAGS)
$(ADDITIONAL_LIBS)
# Clang static analyzer
sa
::
$(app_analyzer)
examples/hello_nek/diffusion_pathological.i
deleted
100644 → 0
View file @
45a7bd80
[
Mesh
]
file
=
square
.
e
uniform_refine
=
4
[]
#
Note
:
This
output
block
is
out
of
its
normal
place
(
should
be
at
the
bottom
)
[
Outputs
]
execute_on
=
'
timestep_end
'
exodus
=
true
[]
#
Note
:
The
executioner
is
out
of
its
normal
place
(
should
be
just
about
the
output
block
)
[
Executioner
]
type
=
Steady
solve_type
=
'
PJFNK
'
[]
[
Variables
]
active
=
'
diffused
'
#
Note
the
active
list
here
[
.
/
diffused
]
order
=
FIRST
family
=
LAGRANGE
[
..
/
]
#
This
variable
is
not
active
in
the
list
above
#
therefore
it
is
not
used
in
the
simulation
[
.
/
convected
]
order
=
FIRST
family
=
LAGRANGE
[
..
/
]
[]
[
Kernels
]
[
.
/
diff
]
type
=
Diffusion
variable
=
diffused
[
..
/
]
[]
#
This
example
applies
DirichletBCs
to
all
four
sides
of
our
square
domain
[
BCs
]
[
.
/
left
]
type
=
DirichletBC
variable
=
diffused
boundary
=
'1'
value
=
0
[
..
/
]
[
.
/
right
]
type
=
DirichletBC
variable
=
diffused
boundary
=
'2'
value
=
1
[
..
/
]
[]
examples/hello_nek/eddy_uv.map
deleted
100644 → 0
View file @
45a7bd80
This diff is collapsed.
Click to expand it.
examples/hello_nek/eddy_uv.rea
deleted
100644 → 0
View file @
45a7bd80
This source diff could not be displayed because it is too large. You can
view the blob
instead.
examples/hello_nek/eddy_uv.usr
deleted
100644 → 0
View file @
45a7bd80
c-----------------------------------------------------------------------
subroutine exact(uu,vv,xx,yy,n,time,visc,u0,v0)
c
c This routine creates initial conditions for an exact solution
c to the Navier-Stokes equations based on the paper of Walsh [1],
c with an additional translational velocity (u0,v0).
c
c The computational domain is [0,2pi]^2 with doubly-periodic
c boundary conditions.
c
c Walsh's solution consists of an array of vortices determined
c as a linear combinations of eigenfunctions of having form:
c
c cos(pi m x)cos(pi n y), cos(pi m x)sin(pi n y)
c sin(pi m x)cos(pi n y), sin(pi m x)sin(pi n y)
c
c and
c
c cos(pi k x)cos(pi l y), cos(pi k x)sin(pi l y)
c sin(pi k x)cos(pi l y), sin(pi k x)sin(pi l y)
c
c While there are constraints on admissible (m,n),(k,l)
c pairings, Walsh shows that there is a large class of
c possible pairings that give rise to very complex vortex
c patterns.
c
c Walsh's solution applies either to unsteady Stokes or
c unsteady Navier-Stokes. The solution is a non-translating
c decaying array of vortices that decays at the rate
c
c exp ( -4 pi^2 (m^2+n^2) visc time ),
c
c with (m^2+n^2) = (k^2+l^2). A nearly stationary state may
c be obtained by taking the viscosity to be extremely small,
c so the effective decay is negligible. This limit, however,
c leads to an unstable state, thus diminsishing the value of
c Walsh's solution as a high-Reynolds number test case.
c
c It is possible to extend Walsh's solution to a stable convectively-
c dominated case by simulating an array of vortices that translate
c at arbitrary speed by adding a constant to the initial velocity field.
c This approach provides a good test for convection-diffusion dynamics.
c
c The approach can also be extended to incompressible MHD with unit
c magnetic Prandtl number Pm.
c
c [1] Owen Walsh, "Eddy Solutions of the Navier-Stokes Equations,"
c in The Navier-Stokes Equations II - Theory and Numerical Methods,
c Proceedings, Oberwolfach 1991, J.G. Heywood, K. Masuda,
c R. Rautmann, S.A. Solonnikov, Eds., Springer-Verlag, pp. 306--309
c (1992).
c
c 2/23/02; 6/2/09; pff
c
c
include 'SIZE'
include 'INPUT'
c
real uu(n),vv(n),xx(n),yy(n)
c
real cpsi(2,5), a(2,5)
save cpsi , a
c data a / .4,.45 , .4,.2 , -.2,-.1 , .2,.05, -.09,-.1 / ! See eddy.m
c data cpsi / 0,65 , 16,63 , 25,60 , 33,56 , 39,52 / ! See squares.f
c data cpsi / 0,85 , 13,84 , 36,77 , 40,75 , 51,68 /
c This data from Walsh's Figure 1 [1]:
data a / -.2,-.2, .25,0., 0,0 , 0,0 , 0,0 /
data cpsi / 0, 5 , 3, 4 , 0,0 , 0,0 , 0,0 /
one = 1.
pi = 4.*atan(one)
aa = cpsi(2,1)**2
arg = -visc*time*aa ! domain is [0:2pi]
e = exp(arg)
c
c ux = psi_y, uy = -psi_x
c
do i=1,n
x = xx(i) - u0*time
y = yy(i) - v0*time
sx = sin(cpsi(2,1)*x)
cx = cos(cpsi(2,1)*x)
sy = sin(cpsi(2,1)*y)
cy = cos(cpsi(2,1)*y)
u = a(1,1)*cpsi(2,1)*cy
v = a(2,1)*cpsi(2,1)*sx
do k=2,5
s1x = sin(cpsi(1,k)*x)
c1x = cos(cpsi(1,k)*x)
s2x = sin(cpsi(2,k)*x)
c2x = cos(cpsi(2,k)*x)
s1y = sin(cpsi(1,k)*y)
c1y = cos(cpsi(1,k)*y)
s2y = sin(cpsi(2,k)*y)
c2y = cos(cpsi(2,k)*y)
c1 = cpsi(1,k)
c2 = cpsi(2,k)
if (k.eq.2) u = u + a(1,k)*s1x*c2y*c2
if (k.eq.2) v = v - a(1,k)*c1x*s2y*c1
if (k.eq.2) u = u - a(2,k)*s2x*c1y*c1
if (k.eq.2) v = v + a(2,k)*c2x*s1y*c2
if (k.eq.3) u = u - a(1,k)*s1x*c2y*c2
if (k.eq.3) v = v + a(1,k)*c1x*s2y*c1
if (k.eq.3) u = u - a(2,k)*c2x*c1y*c1
if (k.eq.3) v = v - a(2,k)*s2x*s1y*c2
if (k.eq.4) u = u + a(1,k)*c1x*c2y*c2
if (k.eq.4) v = v + a(1,k)*s1x*s2y*c1
if (k.eq.4) u = u + a(2,k)*c2x*c1y*c1
if (k.eq.4) v = v + a(2,k)*s2x*s1y*c2
if (k.eq.5) u = u - a(1,k)*s1x*c2y*c2
if (k.eq.5) v = v + a(1,k)*c1x*s2y*c1
if (k.eq.5) u = u - a(2,k)*s2x*c1y*c1
if (k.eq.5) v = v + a(2,k)*c2x*s1y*c2
enddo
uu(i) = u*e + u0
vv(i) = v*e + v0
enddo
return
end
c-----------------------------------------------------------------------
subroutine uservp (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
C
udiff =0.
utrans=0.
return
end
c-----------------------------------------------------------------------
subroutine userf (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
C
ffx = 0.0
ffy = 0.0
ffz = 0.0
return
end
c-----------------------------------------------------------------------
subroutine userq (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
C
qvol = 0.0
source = 0.0
return
end
c-----------------------------------------------------------------------
subroutine userchk
include 'SIZE'
include 'TOTAL'
c
common /exacu/ ue(lx1,ly1,lz1,lelt),ve(lx1,ly1,lz1,lelt)
common /exacd/ ud(lx1,ly1,lz1,lelt),vd(lx1,ly1,lz1,lelt)
ifield = 1 ! for outpost
n = nx1*ny1*nz1*nelv
visc = param(2)
u0 = param(96)
v0 = param(97)
call exact (ue,ve,xm1,ym1,n,time,visc,u0,v0)
if (istep.eq.0 ) call outpost(ue,ve,vx,pr,t,' ')
call sub3 (ud,ue,vx,n)
call sub3 (vd,ve,vy,n)
if (istep.eq.nsteps) call outpost(ud,vd,vx,pr,t,'err')
umx = glamax(vx,n)
vmx = glamax(vy,n)
uex = glamax(ue,n)
vex = glamax(ve,n)
udx = glamax(ud,n)
vdx = glamax(vd,n)
if (nid.eq.0) then
write(6,11) istep,time,udx,umx,uex,u0,' X err'
write(6,11) istep,time,vdx,vmx,vex,v0,' Y err'
11 format(i5,1p5e14.6,a7)
endif
if (istep.le.5) then ! Reset velocity to eliminate
call copy (vx,ue,n) ! start-up contributions to
call copy (vy,ve,n) ! temporal-accuracy behavior.
endif
return
end
c-----------------------------------------------------------------------
subroutine userbc (ix,iy,iz,iside,ieg)
c NOTE ::: This subroutine MAY NOT be called by every process
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
ux=0.0
uy=0.0
uz=0.0
temp=0.0
return
end
c-----------------------------------------------------------------------
subroutine useric (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
common /exacu/ ue(lx1,ly1,lz1,lelt),ve(lx1,ly1,lz1,lelt)
common /exacd/ ud(lx1,ly1,lz1,lelt),vd(lx1,ly1,lz1,lelt)
integer icalld
save icalld
data icalld /0/
n = nx1*ny1*nz1*nelv
if (icalld.eq.0) then
icalld = icalld + 1
time = 0.
u0 = param(96)
v0 = param(97)
call exact (ue,ve,xm1,ym1,n,time,visc,u0,v0)
endif
ie = gllel(ieg)
ux=ue(ix,iy,iz,ie)
uy=ve(ix,iy,iz,ie)
uz=0.0
temp=0
return
end
c-----------------------------------------------------------------------
subroutine usrdat
include 'SIZE'
include 'TOTAL'
integer e
one = 1.
twopi = 8.*atan(one)
do e=1,nelv ! Rescale mesh to [0,2pi]^2
do i=1,4 ! Assumes original domain in .rea file on [0,1]
xc(i,e) = twopi*xc(i,e)
yc(i,e) = twopi*yc(i,e)
enddo
enddo
c param(66) = 4
c param(67) = 4
return
end
c-----------------------------------------------------------------------
subroutine usrdat2
return
end
c-----------------------------------------------------------------------
subroutine usrdat3
return
end
c-----------------------------------------------------------------------
examples/hello_nek/ex01.i
deleted
100644 → 0
View file @
45a7bd80
[
Mesh
]
file
=
mug
.
e
[]
[
Variables
]
[
.
/
diffused
]
order
=
FIRST
family
=
LAGRANGE
[
..
/
]
[]
[
Kernels
]
[
.
/
diff
]
type
=
Diffusion
variable
=
diffused
[
..
/
]
[]
[
BCs
]
[
.
/
bottom
]
type
=
DirichletBC
variable
=
diffused
boundary
=
'
bottom
'
value
=
1
[
..
/
]
[
.
/
top
]
type
=
DirichletBC
variable
=
diffused
boundary
=
'
top
'
value
=
0
[
..
/
]
[]
[
Executioner
]
type
=
Steady
solve_type
=
'
PJFNK
'
[]
[
Outputs
]
execute_on
=
'
timestep_end
'
exodus
=
true
[]
examples/hello_nek/gold/ex01_out.e
deleted
100644 → 0
View file @
45a7bd80
File deleted
examples/hello_nek/include/README
deleted
100644 → 0
View file @
45a7bd80
This example has no header files. This directory
is just included for consistency with the other
examples.
\ No newline at end of file
examples/hello_nek/include/base/Ex01Revision.h
deleted
100644 → 0
View file @
45a7bd80
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
#ifndef EX01_REVISION_H
#define EX01_REVISION_H
#define EX01_REVISION "git commit 16c7fbf on 2016-09-28"
#endif // EX01_REVISION_H
examples/hello_nek/include/base/ExampleApp.h
deleted
100644 → 0
View file @
45a7bd80
/****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */