Skip to content

Commit

Permalink
Merge branch 'baagaard/update-tests'
Browse files Browse the repository at this point in the history
* baagaard/update-tests:
  Small updates to developer doc.
  Remove obsolete plasticity test (tests/3d/plasticity/threehex8).
  Upgraded tests/2d/slipdir to full-scale test (tests_auto/2d/slipdir).
  Collapse tests/3d/plasticity/threehex8 into one directory.
  Remove obsolete tests.
  Switch to HDF5 output.
  Update nonplanar example.
  Switch from PyTables to h5py in plotting.
  Increase number of procs for several examples.
  • Loading branch information
baagaard-usgs committed Feb 19, 2015
2 parents bff5778 + 87b9722 commit 31f4648
Show file tree
Hide file tree
Showing 116 changed files with 1,663 additions and 4,605 deletions.
9 changes: 1 addition & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ AC_CONFIG_FILES([Makefile
tests_auto/2d/Makefile
tests_auto/2d/tri3/Makefile
tests_auto/2d/quad4/Makefile
tests_auto/2d/slipdir/Makefile
tests_auto/3d/Makefile
tests_auto/3d/tet4/Makefile
tests_auto/3d/hex8/Makefile
Expand All @@ -344,7 +345,6 @@ AC_CONFIG_FILES([Makefile
tests/2d/Makefile
tests/2d/maxwell/Makefile
tests/2d/powerlaw/Makefile
tests/2d/slipdir/Makefile
tests/2d/frictionslide/Makefile
tests/2d/plasticity/Makefile
tests/2d/plasticity/initialstress/Makefile
Expand All @@ -354,15 +354,8 @@ AC_CONFIG_FILES([Makefile
tests/3d/cyclicfriction/Makefile
tests/3d/cyclicfriction/output/Makefile
tests/3d/plasticity/Makefile
tests/3d/plasticity/threehex8/Makefile
tests/3d/plasticity/threehex8/config/Makefile
tests/3d/plasticity/threehex8/mesh/Makefile
tests/3d/plasticity/threehex8/results/Makefile
tests/3d/plasticity/threehex8/spatialdb/Makefile
tests/3d/plasticity/dynamic/Makefile
tests/3d/plasticity/initialstress/Makefile
tests/topology/Makefile
tests/refinefaulttip/Makefile
doc/Makefile
doc/developer/Makefile
doc/install/Makefile
Expand Down
11 changes: 5 additions & 6 deletions doc/developer/general
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ for EVERY method, member, and argument to a member function.
go in .cc files, and inline methods go in .icc files. Use an include
directive in header files for inline methods.

3. Files checked in to the repository trunk should at least compile.
3. ALL development should be done in developer branches. Merge to the
'next' branch for integration testing. Once testing is complete, merge
to master. See PETSc development documentation for how we use
branches.

4. Changes to the code that fix bugs in released code should be done
in the stable branch. Those changes are then merged into the trunk
(this is tricky, so please notify Brad and he will do it for you).

5. C++ and Python classes should have corresponding unit tests in
4. C++ and Python classes should have corresponding unit tests in
libtests and pytests. High-level functionality should be verified
using a full-scale test.

20 changes: 0 additions & 20 deletions doc/developer/howto_mergefromstable.txt

This file was deleted.

6 changes: 4 additions & 2 deletions examples/run_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def run_pylith(dir, examples, nprocs=1):
run_pylith(dir, examples, nprocs=2)
run_pylith(dir, examples, nprocs=3)
run_pylith(dir, examples, nprocs=4)
run_pylith(dir, examples, nprocs=5)
run_pylith(dir, examples, nprocs=6)


# ----------------------------------------------------------------------
Expand Down Expand Up @@ -149,7 +149,7 @@ def run_pylith(dir, examples, nprocs=1):
run_pylith(dir, examples, nprocs=1)
run_pylith(dir, examples, nprocs=2)
run_pylith(dir, examples, nprocs=4)
run_pylith(dir, examples, nprocs=5)
run_pylith(dir, examples, nprocs=6)


# ----------------------------------------------------------------------
Expand Down Expand Up @@ -194,6 +194,7 @@ def run_pylith(dir, examples, nprocs=1):
run_pylith(dir, examples, nprocs=1)
run_pylith(dir, examples, nprocs=2)
run_pylith(dir, examples, nprocs=4)
run_pylith(dir, examples, nprocs=6)

dir = "2d/greensfns/reverse"
examples = ("eqsim.cfg",
Expand All @@ -202,3 +203,4 @@ def run_pylith(dir, examples, nprocs=1):
run_pylith(dir, examples, nprocs=1)
run_pylith(dir, examples, nprocs=2)
run_pylith(dir, examples, nprocs=4)
run_pylith(dir, examples, nprocs=6)
1 change: 0 additions & 1 deletion tests/2d/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
SUBDIRS = \
maxwell \
powerlaw \
slipdir \
frictionslide \
plasticity

Expand Down
14 changes: 7 additions & 7 deletions tests/2d/frictionslide/plot_friction.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
raise ValueError("Unknown sim '%s'." % sim)

# ======================================================================
import tables
import h5py
import pylab
import numpy
from math import exp
Expand Down Expand Up @@ -72,12 +72,12 @@ def integrateStateVar(theta, v, t0):

# ----------------------------------------------------------------------

h5 = tables.openFile("output/ratestate_%s-fault.h5" % sim, "r")
time = h5.root.time[:].ravel()
slip = h5.root.vertex_fields.slip[:]
slipRate = h5.root.vertex_fields.slip_rate[:]
stateVar = h5.root.vertex_fields.state_variable[:]
traction = h5.root.vertex_fields.traction[:]
h5 = h5py.File("output/ratestate_%s-fault.h5" % sim, "r")
time = h5['time'][:].ravel()
slip = h5['vertex_fields/slip'][:]
slipRate = h5['vertex_fields/slip_rate'][:]
stateVar = h5['vertex_fields/state_variable'][:]
traction = h5['vertex_fields/traction'][:]
h5.close()

fig = pylab.Figure()
Expand Down
19 changes: 10 additions & 9 deletions tests/2d/nonplanar/bc.jou
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,25 @@ block 1 name "inner"
block 2 surface surf_outer
block 2 name "outer"

# ----------------------------------------------------------------------
# Create nodeset for fault interfaces
# ----------------------------------------------------------------------
group "fault" add node in curve 5
nodeset 20 group fault
nodeset 20 name "fault"

# ----------------------------------------------------------------------
# Create nodeset for boundaries
# ----------------------------------------------------------------------
group "bndry_south" add node in curve 6
group "bndry_south" add node in curve 7
group "bndry_south" remove node in group fault
nodeset 11 group bndry_south
nodeset 11 name "bndry_south"

group "bndry_north" add node in curve 9
group "bndry_north" add node in curve 8
group "bndry_north" remove node in group fault
nodeset 12 group bndry_north
nodeset 12 name "bndry_north"

Expand All @@ -51,16 +60,8 @@ group "bndry_east" add node in curve 2
nodeset 14 group bndry_east
nodeset 14 name "bndry_east"

# ----------------------------------------------------------------------
# Create nodeset for fault interfaces
# ----------------------------------------------------------------------
group "fault" add node in curve 5
group "fault" remove node in bndry_north
group "fault" remove node in bndry_south
nodeset 20 group fault
nodeset 20 name "fault"

# End of file




3 changes: 1 addition & 2 deletions tests/2d/nonplanar/geometry.jou
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ----------------------------------------------------------------------
# Set units to SI.
# ----------------------------------------------------------------------
# {Units('si')}
${Units('si')}
#
# ----------------------------------------------------------------------
# Reset geometry.
Expand Down Expand Up @@ -73,4 +73,3 @@ imprint all
merge all

# End of file

5 changes: 1 addition & 4 deletions tests/2d/nonplanar/mesh.jou
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ playback 'geometry.jou'
# ----------------------------------------------------------------------
surface all scheme trimesh
curve all scheme default
#{dx=600.0*m}
${dx=600.0*m}
surface all size {600*m}

# ----------------------------------------------------------------------
Expand All @@ -52,6 +52,3 @@ playback 'bc.jou'
export mesh "mesh.exo" dimension 2 overwrite

# End of file



2 changes: 1 addition & 1 deletion tests/2d/nonplanar/pylithapp.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ writer = pylith.meshio.DataWriterHDF5
writer.filename = output/nonplanar.h5

[pylithapp.timedependent.interfaces.fault.output]
vertex_info_fields=[traction_initial_value]
vertex_info_fields=[normal_dir,strike_dir,traction_initial_value]
vertex_data_fields=[slip,slip_rate,traction]
skip = 2
writer = pylith.meshio.DataWriterHDF5
Expand Down
38 changes: 0 additions & 38 deletions tests/2d/slipdir/Makefile.am

This file was deleted.

16 changes: 0 additions & 16 deletions tests/2d/slipdir/fault_x.cfg

This file was deleted.

Binary file removed tests/2d/slipdir/fault_x.exo
Binary file not shown.
44 changes: 0 additions & 44 deletions tests/2d/slipdir/fault_x.jou

This file was deleted.

23 changes: 0 additions & 23 deletions tests/2d/slipdir/fault_xy1.cfg

This file was deleted.

Binary file removed tests/2d/slipdir/fault_xy1.exo
Binary file not shown.
43 changes: 0 additions & 43 deletions tests/2d/slipdir/fault_xy1.jou

This file was deleted.

Loading

0 comments on commit 31f4648

Please sign in to comment.