class TestFaultX(TestTri3): """ Test suite for testing sense of slip. """ def setUp(self): """ Setup for test. """ TestTri3.setUp(self) run_pylith(FaultXApp, GenDBFaultX, nprocs=5) self.mesh['nvertices'] += 17 self.outputRoot = "faultx" self.soln = SolnFaultX() 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 TestFaultX(TestTri3): """ Test suite for testing sense of slip. """ def setUp(self): """ Setup for test. """ TestTri3.setUp(self) run_pylith(FaultXApp, GenDBFaultX, nprocs=5) self.mesh['nvertices'] += 17 self.outputRoot = "faultx" self.soln = SolnFaultX() 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(FaultXApp, GenDBFaultX, nprocs=5) self.mesh['nvertices'] += 17 self.outputRoot = "faultx" self.soln = SolnFaultX() return
def __init__(self): """ Constructor. """ from solution import SolnFaultX self.soln = SolnFaultX() self.filename = "faultx_disp.spatialdb" return
def setUp(self): """ Setup for test. """ TestTri3.setUp(self) run_pylith() self.mesh['nvertices'] += 17 self.outputRoot = "faultx" self.soln = AnalyticalSoln() return