[cig-commits] [commit] baagaard/update-autoconf: Remove obsolete mesh generation test files. (692eaf2)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon Aug 18 15:20:02 PDT 2014
Repository : https://github.com/geodynamics/pylith
On branch : baagaard/update-autoconf
Link : https://github.com/geodynamics/pylith/compare/87981e97bb95173ecc046a3e58ce22aba1161c34...87db39ca000b0547b70483775c3e48f37fec1ac6
>---------------------------------------------------------------
commit 692eaf2567ed882d33aba393e8929f024400087f
Author: Brad Aagaard <baagaard at usgs.gov>
Date: Mon Aug 18 14:45:41 2014 -0700
Remove obsolete mesh generation test files.
>---------------------------------------------------------------
692eaf2567ed882d33aba393e8929f024400087f
unittests/pytests/topology/TestMeshGenSimple.py | 82 -------------------------
unittests/pytests/topology/testgensimple.py | 75 ----------------------
2 files changed, 157 deletions(-)
diff --git a/unittests/pytests/topology/TestMeshGenSimple.py b/unittests/pytests/topology/TestMeshGenSimple.py
deleted file mode 100644
index 19df4a5..0000000
--- a/unittests/pytests/topology/TestMeshGenSimple.py
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard, U.S. Geological Survey
-# Charles A. Williams, GNS Science
-# Matthew G. Knepley, University of Chicago
-#
-# This code was developed as part of the Computational Infrastructure
-# for Geodynamics (http://geodynamics.org).
-#
-# Copyright (c) 2010-2014 University of California, Davis
-#
-# See COPYING for license information.
-#
-# ======================================================================
-#
-
-## @file unittests/pytests/topology/TestMeshGenSimple.py
-
-## @brief Unit testing of MeshGenSimple object.
-
-import unittest
-
-from pylith.topology.MeshGenSimple import MeshGenSimple
-
-# ----------------------------------------------------------------------
-class TestMeshGenSimple(unittest.TestCase):
- """
- Unit testing of MeshGenSimple object.
- """
-
- def test_constructor(self):
- """
- Test constructor.
- """
- generator = MeshGenSimple()
- return
-
-
- def test_distribute(self):
- """
- Test distribute()
- """
- generator = MeshGenSimple()
- generator.interpolate = True
- generator.setBoundary(generator.createCubeBoundary())
- mesh = generator.create()
-
- from pylith.meshio.OutputManager import OutputManager
- io = OutputManager()
- io._configure()
- io.writer._configure()
- io.writer.filename = 'mesh.vtk'
- from spatialdata.geocoords.CSCart import CSCart
- io.coordsys = CSCart()
- mesh.coordsys = CSCart()
- self.mesh = mesh
-
- from pyre.units.time import s
- io.preinitialize(self)
- io.initialize()
- io.writeInfo()
-
- from pylith.topology.Distributor import Distributor
- distributor = Distributor()
- distributor.partitioner = "chaco"
- newMesh = distributor.distribute(mesh)
- self.mesh = newMesh
- io.writer.filename = 'newMesh.vtk'
- io.writeInfo()
- return
-
-
- def getDataMesh(self):
- """
- Get mesh.
- """
- return (self.mesh, None, None)
-
-
-# End of file
diff --git a/unittests/pytests/topology/testgensimple.py b/unittests/pytests/topology/testgensimple.py
deleted file mode 100644
index a177e2f..0000000
--- a/unittests/pytests/topology/testgensimple.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard, U.S. Geological Survey
-# Charles A. Williams, GNS Science
-# Matthew G. Knepley, University of Chicago
-#
-# This code was developed as part of the Computational Infrastructure
-# for Geodynamics (http://geodynamics.org).
-#
-# Copyright (c) 2010-2014 University of California, Davis
-#
-# See COPYING for license information.
-#
-# ======================================================================
-#
-
-## @file unittests/topology/testdriver.py
-
-## @brief Python application for testing topology code.
-
-from pyre.applications.Script import Script
-
-import unittest
-
-class TestApp(Script):
- """
- Test application.
- """
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="testapp"):
- """
- Constructor.
- """
- Script.__init__(self, name)
- return
-
-
- def main(self):
- """
- Run the application.
- """
- from pylith.utils.PetscManager import PetscManager
- manager = PetscManager()
- manager.initialize()
- unittest.TextTestRunner(verbosity=2).run(self._suite())
- manager.finalize()
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _suite(self):
- """
- Setup the test suite.
- """
-
- suite = unittest.TestSuite()
-
- from TestMeshGenSimple import TestMeshGenSimple
- suite.addTest(unittest.makeSuite(TestMeshGenSimple))
-
- return suite
-
-
-# ----------------------------------------------------------------------
-if __name__ == '__main__':
- app = TestApp()
- app.run()
-
-
-# End of file
More information about the CIG-COMMITS
mailing list