-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'geodynamics:main' into point_source
- Loading branch information
Showing
21 changed files
with
734 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ SUBDIRS = \ | |
nofaults-3d \ | ||
faults-2d \ | ||
faults-3d \ | ||
faults-3d-buried \ | ||
greensfns-2d | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/fullscale/linearelasticity/faults-2d/zeroslipfn.timedb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#TIME HISTORY ascii | ||
TimeHistory { | ||
num-points = 5 | ||
time-units = year | ||
} | ||
0.0 0.0 | ||
1.0 0.0 | ||
4.0 0.0 | ||
8.0 0.0 | ||
10.0 0.0 |
46 changes: 46 additions & 0 deletions
46
tests/fullscale/linearelasticity/faults-3d-buried/Makefile.am
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- Makefile -*- | ||
# | ||
# ---------------------------------------------------------------------- | ||
# | ||
# Brad T. Aagaard, U.S. Geological Survey | ||
# Charles A. Williams, GNS Science | ||
# Matthew G. Knepley, University at Buffalo | ||
# | ||
# This code was developed as part of the Computational Infrastructure | ||
# for Geodynamics (http://geodynamics.org). | ||
# | ||
# Copyright (c) 2010-2022 University of California, Davis | ||
# | ||
# See LICENSE.md for license information. | ||
# | ||
# ---------------------------------------------------------------------- | ||
|
||
TESTS = test_pylith.py | ||
|
||
dist_check_SCRIPTS = test_pylith.py | ||
|
||
dist_noinst_PYTHON = \ | ||
generate_gmsh.py \ | ||
meshes.py \ | ||
TestUniformSlip.py \ | ||
uniformslip_soln.py | ||
|
||
dist_noinst_DATA = \ | ||
mesh_tet.msh \ | ||
pylithapp.cfg \ | ||
uniformslip.cfg | ||
|
||
|
||
noinst_TMP = | ||
|
||
|
||
export_datadir = $(abs_builddir) | ||
include $(top_srcdir)/tests/data.am | ||
|
||
clean-local: clean-local-tmp clean-data | ||
.PHONY: clean-local-tmp | ||
clean-local-tmp: | ||
$(RM) $(RM_FLAGS) -r output __pycache__ | ||
|
||
|
||
# End of file |
93 changes: 93 additions & 0 deletions
93
tests/fullscale/linearelasticity/faults-3d-buried/TestUniformSlip.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#!/usr/bin/env nemesis | ||
# | ||
# ---------------------------------------------------------------------- | ||
# | ||
# Brad T. Aagaard, U.S. Geological Survey | ||
# Charles A. Williams, GNS Science | ||
# Matthew G. Knepley, University at Buffalo | ||
# | ||
# This code was developed as part of the Computational Infrastructure | ||
# for Geodynamics (http://geodynamics.org). | ||
# | ||
# Copyright (c) 2010-2022 University of California, Davis | ||
# | ||
# See LICENSE.md for license information. | ||
# | ||
# ---------------------------------------------------------------------- | ||
|
||
import unittest | ||
|
||
from pylith.testing.FullTestApp import (FullTestCase, Check) | ||
|
||
import meshes | ||
import uniformslip_soln | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------- | ||
class TestCase(FullTestCase): | ||
|
||
def setUp(self): | ||
defaults = { | ||
"filename": "output/{name}-{mesh_entity}.h5", | ||
"exact_soln": uniformslip_soln.AnalyticalSoln(), | ||
"mesh": self.mesh, | ||
} | ||
self.checks = [ | ||
Check( | ||
mesh_entities=["domain"], | ||
vertex_fields=[], | ||
defaults=defaults, | ||
), | ||
Check( | ||
mesh_entities=["mat_elastic"], | ||
filename="output/{name}-{mesh_entity}_info.h5", | ||
cell_fields = ["density", "bulk_modulus", "shear_modulus"], | ||
defaults=defaults, | ||
), | ||
Check( | ||
mesh_entities=["bc_xneg", "bc_xpos", "bc_yneg", "bc_ypos", "bc_zneg"], | ||
filename="output/{name}-{mesh_entity}_info.h5", | ||
vertex_fields=["initial_amplitude"], | ||
defaults=defaults, | ||
), | ||
Check( | ||
mesh_entities=["fault"], | ||
vertex_fields=["slip"], | ||
defaults=defaults, | ||
), | ||
] | ||
|
||
def run_pylith(self, testName, args, nprocs=1): | ||
FullTestCase.run_pylith(self, testName, args, nprocs=nprocs) | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------- | ||
class TestTetGmsh(TestCase): | ||
|
||
def setUp(self): | ||
self.name = "uniformslip" | ||
self.mesh = meshes.TetGmsh() | ||
super().setUp() | ||
|
||
TestCase.run_pylith(self, self.name, ["uniformslip.cfg"], nprocs=1) | ||
return | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------- | ||
def test_cases(): | ||
return [ | ||
TestTetGmsh, | ||
] | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------- | ||
if __name__ == '__main__': | ||
FullTestCase.parse_args() | ||
|
||
suite = unittest.TestSuite() | ||
for test in test_cases(): | ||
suite.addTest(unittest.makeSuite(test)) | ||
unittest.TextTestRunner(verbosity=2).run(suite) | ||
|
||
|
||
# End of file |
Oops, something went wrong.