New tests for SetNeighborBox when connecting a part to itself.
This commit is contained in:
parent
a069774a66
commit
315d7fbeb5
29
test/TEST_sstruct/periodic.jobs
Executable file
29
test/TEST_sstruct/periodic.jobs
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/ksh
|
||||
#BHEADER***********************************************************************
|
||||
# (c) 1998 The Regents of the University of California
|
||||
#
|
||||
# See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
|
||||
# notice, contact person, and disclaimer.
|
||||
#
|
||||
# $Revision$
|
||||
#EHEADER***********************************************************************
|
||||
|
||||
#=============================================================================
|
||||
# Check SetNeighborBox for periodic problems (2D)
|
||||
#=============================================================================
|
||||
|
||||
mpirun -np 1 ./sstruct -in sstruct.in.periodic.2D -r 20 20 1 \
|
||||
-solver 11 > periodic.out.20
|
||||
mpirun -np 2 ./sstruct -in sstruct.in.periodic.2D -r 20 10 1 -P 1 2 1 \
|
||||
-solver 11 > periodic.out.21
|
||||
|
||||
#=============================================================================
|
||||
# Check SetNeighborBox for periodic problems (3D)
|
||||
#=============================================================================
|
||||
|
||||
mpirun -np 1 ./sstruct -in sstruct.in.periodic -r 20 20 20 \
|
||||
-solver 11 > periodic.out.30
|
||||
mpirun -np 2 ./sstruct -in sstruct.in.periodic -r 20 20 10 -P 1 1 2 \
|
||||
-solver 11 > periodic.out.31
|
||||
|
||||
|
||||
32
test/TEST_sstruct/periodic.sh
Executable file
32
test/TEST_sstruct/periodic.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/ksh
|
||||
#BHEADER***********************************************************************
|
||||
# (c) 1998 The Regents of the University of California
|
||||
#
|
||||
# See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
|
||||
# notice, contact person, and disclaimer.
|
||||
#
|
||||
# $Revision$
|
||||
#EHEADER***********************************************************************
|
||||
|
||||
#=============================================================================
|
||||
# Check SetNeighborBox for periodic problems (2D)
|
||||
#=============================================================================
|
||||
|
||||
tail -3 periodic.out.20 > periodic.testdata
|
||||
|
||||
tail -3 periodic.out.21 > periodic.testdata.temp
|
||||
diff periodic.testdata periodic.testdata.temp >&2
|
||||
|
||||
#=============================================================================
|
||||
# Check SetNeighborBox for periodic problems (2D)
|
||||
#=============================================================================
|
||||
|
||||
tail -3 periodic.out.30 > periodic.testdata
|
||||
|
||||
tail -3 periodic.out.31 > periodic.testdata.temp
|
||||
diff periodic.testdata periodic.testdata.temp >&2
|
||||
|
||||
#=============================================================================
|
||||
#=============================================================================
|
||||
|
||||
rm -f periodic.testdata periodic.testdata.temp
|
||||
86
test/TEST_sstruct/sstruct.in.periodic
Normal file
86
test/TEST_sstruct/sstruct.in.periodic
Normal file
@ -0,0 +1,86 @@
|
||||
|
||||
###########################################################
|
||||
|
||||
# GridCreate: ndim nparts
|
||||
GridCreate: 3 1
|
||||
|
||||
# GridSetExtents: part ilower(ndim) iupper(ndim)
|
||||
GridSetExtents: 0 (1- 1- 1-) (2+ 2+ 2+)
|
||||
|
||||
# GridSetVariables: part nvars vartypes[nvars]
|
||||
# CELL = 0
|
||||
# NODE = 1
|
||||
# XFACE = 2
|
||||
# YFACE = 3
|
||||
# ZFACE = 4
|
||||
# XEDGE = 5
|
||||
# YEDGE = 6
|
||||
# ZEDGE = 7
|
||||
GridSetVariables: 0 1 [0]
|
||||
|
||||
# GridAddVariables: part index(ndim) vartype
|
||||
|
||||
# GridSetNeighborBox: part ilower(ndim) iupper(ndim) \
|
||||
# nbor_part nbor_ilower(ndim) nbor_iupper(ndim) \
|
||||
# index_map[ndim]
|
||||
GridSetNeighborBox: 0 (1- 1- 3-) (2+ 2+ 3-) 0 (1- 1- 1-) (2+ 2+ 1-) [0 1 2]
|
||||
GridSetNeighborBox: 0 (1- 1- 0+) (2+ 2+ 0+) 0 (1- 1- 2+) (2+ 2+ 2+) [0 1 2]
|
||||
|
||||
# GridSetPeriodic: part periodic[ndim]
|
||||
|
||||
###########################################################
|
||||
|
||||
# StencilCreate: nstencils sizes[nstencils]
|
||||
StencilCreate: 1 [7]
|
||||
|
||||
# StencilSetEntry: stencil_num entry offset[ndim] var value
|
||||
StencilSetEntry: 0 0 [ 0 0 0] 0 6.0
|
||||
StencilSetEntry: 0 1 [-1 0 0] 0 -1.0
|
||||
StencilSetEntry: 0 2 [ 1 0 0] 0 -1.0
|
||||
StencilSetEntry: 0 3 [ 0 -1 0] 0 -1.0
|
||||
StencilSetEntry: 0 4 [ 0 1 0] 0 -1.0
|
||||
StencilSetEntry: 0 5 [ 0 0 -1] 0 -1.0
|
||||
StencilSetEntry: 0 6 [ 0 0 1] 0 -1.0
|
||||
|
||||
###########################################################
|
||||
|
||||
# GraphSetStencil: part var stencil_num
|
||||
GraphSetStencil: 0 0 0
|
||||
|
||||
# GraphAddEntries: \
|
||||
# part ilower(ndim) iupper(ndim) stride[ndim] var \
|
||||
# to_part to_ilower(ndim) to_iupper(ndim) to_stride[ndim] to_var \
|
||||
# index_map[ndim] entry value
|
||||
|
||||
###########################################################
|
||||
|
||||
# MatrixCreate:
|
||||
|
||||
# MatrixSetSymmetric: part var to_var symmetric
|
||||
MatrixSetSymmetric: -1 -1 -1 1
|
||||
|
||||
# MatrixSetNSSymmetric: symmetric
|
||||
|
||||
# MatrixSetValues: \
|
||||
# part ilower(ndim) iupper(ndim) stride[ndim] var entry value
|
||||
MatrixSetValues: 0 (1- 1- 1-) (1- 2+ 2+) [1 1 1] 0 1 0.0
|
||||
MatrixSetValues: 0 (2+ 1- 1-) (2+ 2+ 2+) [1 1 1] 0 2 0.0
|
||||
MatrixSetValues: 0 (1- 1- 1-) (2+ 1- 2+) [1 1 1] 0 3 0.0
|
||||
MatrixSetValues: 0 (1- 2+ 1-) (2+ 2+ 2+) [1 1 1] 0 4 0.0
|
||||
#MatrixSetValues: 0 (1- 1- 1-) (2+ 2+ 1-) [1 1 1] 0 5 0.0
|
||||
#MatrixSetValues: 0 (1- 1- 2+) (2+ 2+ 2+) [1 1 1] 0 6 0.0
|
||||
|
||||
###########################################################
|
||||
|
||||
# VectorCreate:
|
||||
|
||||
###########################################################
|
||||
|
||||
# ProcessPoolCreate: num_pools
|
||||
ProcessPoolCreate: 1
|
||||
|
||||
# ProcessPoolSetPart: pool part
|
||||
ProcessPoolSetPart: 0 0
|
||||
|
||||
###########################################################
|
||||
|
||||
82
test/TEST_sstruct/sstruct.in.periodic.2D
Normal file
82
test/TEST_sstruct/sstruct.in.periodic.2D
Normal file
@ -0,0 +1,82 @@
|
||||
|
||||
###########################################################
|
||||
|
||||
# GridCreate: ndim nparts
|
||||
GridCreate: 2 1
|
||||
|
||||
# GridSetExtents: part ilower(ndim) iupper(ndim)
|
||||
GridSetExtents: 0 (1- 1-) (2+ 2+)
|
||||
|
||||
# GridSetVariables: part nvars vartypes[nvars]
|
||||
# CELL = 0
|
||||
# NODE = 1
|
||||
# XFACE = 2
|
||||
# YFACE = 3
|
||||
# ZFACE = 4
|
||||
# XEDGE = 5
|
||||
# YEDGE = 6
|
||||
# ZEDGE = 7
|
||||
GridSetVariables: 0 1 [0]
|
||||
|
||||
# GridAddVariables: part index(ndim) vartype
|
||||
|
||||
# GridSetNeighborBox: part ilower(ndim) iupper(ndim) \
|
||||
# nbor_part nbor_ilower(ndim) nbor_iupper(ndim) \
|
||||
# index_map[ndim]
|
||||
GridSetNeighborBox: 0 (1- 3-) (2+ 3-) 0 (1- 1-) (2+ 1-) [0 1]
|
||||
GridSetNeighborBox: 0 (1- 0+) (2+ 0+) 0 (1- 2+) (2+ 2+) [0 1]
|
||||
|
||||
# GridSetPeriodic: part periodic[ndim]
|
||||
|
||||
###########################################################
|
||||
|
||||
# StencilCreate: nstencils sizes[nstencils]
|
||||
StencilCreate: 1 [5]
|
||||
|
||||
# StencilSetEntry: stencil_num entry offset[ndim] var value
|
||||
StencilSetEntry: 0 0 [ 0 0] 0 4.0
|
||||
StencilSetEntry: 0 1 [-1 0] 0 -1.0
|
||||
StencilSetEntry: 0 2 [ 1 0] 0 -1.0
|
||||
StencilSetEntry: 0 3 [ 0 -1] 0 -1.0
|
||||
StencilSetEntry: 0 4 [ 0 1] 0 -1.0
|
||||
|
||||
###########################################################
|
||||
|
||||
# GraphSetStencil: part var stencil_num
|
||||
GraphSetStencil: 0 0 0
|
||||
|
||||
# GraphAddEntries: \
|
||||
# part ilower(ndim) iupper(ndim) stride[ndim] var \
|
||||
# to_part to_ilower(ndim) to_iupper(ndim) to_stride[ndim] to_var \
|
||||
# index_map[ndim] entry value
|
||||
|
||||
###########################################################
|
||||
|
||||
# MatrixCreate:
|
||||
|
||||
# MatrixSetSymmetric: part var to_var symmetric
|
||||
MatrixSetSymmetric: -1 -1 -1 1
|
||||
|
||||
# MatrixSetNSSymmetric: symmetric
|
||||
|
||||
# MatrixSetValues: \
|
||||
# part ilower(ndim) iupper(ndim) stride[ndim] var entry value
|
||||
MatrixSetValues: 0 (1- 1-) (1- 2+) [1 1] 0 1 0.0
|
||||
MatrixSetValues: 0 (2+ 1-) (2+ 2+) [1 1] 0 2 0.0
|
||||
#MatrixSetValues: 0 (1- 1-) (2+ 1-) [1 1] 0 3 0.0
|
||||
#MatrixSetValues: 0 (1- 2+) (2+ 2+) [1 1] 0 4 0.0
|
||||
|
||||
###########################################################
|
||||
|
||||
# VectorCreate:
|
||||
|
||||
###########################################################
|
||||
|
||||
# ProcessPoolCreate: num_pools
|
||||
ProcessPoolCreate: 1
|
||||
|
||||
# ProcessPoolSetPart: pool part
|
||||
ProcessPoolSetPart: 0 0
|
||||
|
||||
###########################################################
|
||||
|
||||
Loading…
Reference in New Issue
Block a user