class TestFaultY(TestTri3): """ Test suite for testing sense of slip. """ def setUp(self): """ Setup for test. """ TestTri3.setUp(self) run_pylith(FaultYApp, GenDBFaultY, nprocs=7) self.mesh['nvertices'] += 17 self.outputRoot = "faulty" self.soln = SolnFaultY() return def calcStateVar(self, name, vertices, cells): """ Calculate state variable. """ ncells = self.mesh['ncells'] pts = numpy.zeros( (ncells, 3), dtype=numpy.float64) if name == "total_strain": stateVar = self.soln.strain(pts) elif name == "stress": stateVar = self.soln.stress(pts) else: raise ValueError("Unknown state variable '%s'." % name) return stateVar
class TestFaultY(TestTri3): """ Test suite for testing sense of slip. """ def setUp(self): """ Setup for test. """ TestTri3.setUp(self) run_pylith(FaultYApp, GenDBFaultY, nprocs=7) self.mesh['nvertices'] += 17 self.outputRoot = "faulty" self.soln = SolnFaultY() return def calcStateVar(self, name, vertices, cells): """ Calculate state variable. """ ncells = self.mesh['ncells'] pts = numpy.zeros((ncells, 3), dtype=numpy.float64) if name == "total_strain": stateVar = self.soln.strain(pts) elif name == "stress": stateVar = self.soln.stress(pts) else: raise ValueError("Unknown state variable '%s'." % name) return stateVar
def setUp(self): """ Setup for test. """ TestTri3.setUp(self) run_pylith(FaultYApp, GenDBFaultY, nprocs=7) self.mesh['nvertices'] += 17 self.outputRoot = "faulty" self.soln = SolnFaultY() return
def __init__(self): """ Constructor. """ from solution import SolnFaultY self.soln = SolnFaultY() self.filename = "faulty_disp.spatialdb" return
def setUp(self): """ Setup for test. """ TestTri3.setUp(self) run_pylith() self.mesh['nvertices'] += 17 self.outputRoot = "faulty" self.soln = AnalyticalSoln() return