[cig-commits] r21840 - in short/3D/PyLith/trunk: applications modulesrc/meshio pylith pylith/apps pylith/meshio

brad at geodynamics.org brad at geodynamics.org
Fri Apr 12 10:43:55 PDT 2013


Author: brad
Date: 2013-04-12 10:43:55 -0700 (Fri, 12 Apr 2013)
New Revision: 21840

Removed:
   short/3D/PyLith/trunk/applications/pylith_prepmesh.in
   short/3D/PyLith/trunk/modulesrc/meshio/MeshIOSieve.i
   short/3D/PyLith/trunk/pylith/apps/PrepMeshApp.py
   short/3D/PyLith/trunk/pylith/meshio/MeshIOSieve.py
Modified:
   short/3D/PyLith/trunk/applications/Makefile.am
   short/3D/PyLith/trunk/modulesrc/meshio/Makefile.am
   short/3D/PyLith/trunk/pylith/Makefile.am
Log:
Removed MeshIOSieve stuff, since this was never fully implemented or tested.

Modified: short/3D/PyLith/trunk/applications/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/applications/Makefile.am	2013-04-12 17:40:44 UTC (rev 21839)
+++ short/3D/PyLith/trunk/applications/Makefile.am	2013-04-12 17:43:55 UTC (rev 21840)
@@ -22,8 +22,7 @@
 noinstINTERPRETER = $(PYTHON)
 
 bin_SCRIPTS = \
-	pylith \
-	pylith_prepmesh
+	pylith
 
 do_build = sed -e s%[@]INTERPRETER[@]%$(noinstINTERPRETER)%g -e s%[@]PYTHONPATH[@]%$(noinstPYTHONPATH)%g
 do_install = sed -e s%[@]INTERPRETER[@]%$(INTERPRETER)%g -e s%[@]PYTHONPATH[@]%$(PYTHONPATH)%g
@@ -32,10 +31,6 @@
 	$(do_build) <  $(srcdir)/pylith.in > $@ || (rm -f $@ && exit 1)
 	chmod +x $@
 
-pylith_prepmesh:  $(srcdir)/pylith_prepmesh.in Makefile
-	$(do_build) <  $(srcdir)/pylith_prepmesh.in > $@ || (rm -f $@ && exit 1)
-	chmod +x $@
-
 install-binSCRIPTS: $(bin_SCRIPTS)
 	@$(NORMAL_INSTALL)
 	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@@ -51,8 +46,7 @@
 	done
 
 EXTRA_DIST = \
-	pylith.in \
-	pylith_prepmesh.in
+	pylith.in
 
 CLEANFILES = $(bin_SCRIPTS)
 

Deleted: short/3D/PyLith/trunk/applications/pylith_prepmesh.in
===================================================================
--- short/3D/PyLith/trunk/applications/pylith_prepmesh.in	2013-04-12 17:40:44 UTC (rev 21839)
+++ short/3D/PyLith/trunk/applications/pylith_prepmesh.in	2013-04-12 17:43:55 UTC (rev 21840)
@@ -1,42 +0,0 @@
-#!@INTERPRETER@
-# -*- 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-2012 University of California, Davis
-#
-# See COPYING for license information.
-#
-# ----------------------------------------------------------------------
-#
-
-## @file applications/pylith_prepmesh
-## @brief Python PyLith application driver
-
-__requires__ = "PyLith"
-
-if __name__ == "__main__":
-
-    # re-create the PYTHONPATH at 'configure' time
-    import os.path, sys, site
-    path = '@PYTHONPATH@'.split(':')
-    path.reverse()
-    for directory in path:
-        if directory:
-            directory = os.path.abspath(directory)
-            sys.path.insert(1, directory)
-            site.addsitedir(directory)
-
-    from pylith.apps.PrepMeshApp import PrepMeshApp
-    from pyre.applications import start
-    start(applicationClass=PrepMeshApp)
-
-
-# End of file 

Modified: short/3D/PyLith/trunk/modulesrc/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/Makefile.am	2013-04-12 17:40:44 UTC (rev 21839)
+++ short/3D/PyLith/trunk/modulesrc/meshio/Makefile.am	2013-04-12 17:43:55 UTC (rev 21840)
@@ -29,7 +29,6 @@
 	MeshIOAscii.i \
 	MeshIOLagrit.i \
 	MeshIOCubit.i \
-	MeshIOSieve.i \
 	VertexFilter.i \
 	VertexFilterVecNorm.i \
 	CellFilter.i \

Deleted: short/3D/PyLith/trunk/modulesrc/meshio/MeshIOSieve.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/MeshIOSieve.i	2013-04-12 17:40:44 UTC (rev 21839)
+++ short/3D/PyLith/trunk/modulesrc/meshio/MeshIOSieve.i	2013-04-12 17:43:55 UTC (rev 21840)
@@ -1,70 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// 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-2012 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-/**
- * @file modulesrc/meshio/MeshIOSieve.i
- *
- * @brief Python interface to C++ MeshIOSieve object.
- */
-
-namespace pylith {
-  namespace meshio {
-
-    class MeshIOSieve : public MeshIO
-    { // MeshIOSieve
-
-      // PUBLIC METHODS /////////////////////////////////////////////////
-    public :
-
-      /// Constructor
-      MeshIOSieve(void);
-
-      /// Destructor
-      ~MeshIOSieve(void);
-
-      /// Deallocate PETSc and local data structures.
-      void deallocate(void);
-  
-      /** Set filename for Sieve mesh file.
-       *
-       * @param filename Name of file
-       */
-      void filename(const char* name);
-      
-      /** Get filename of Sieve mesh file.
-       *
-       * @returns Name of file
-       */
-      const char* filename(void) const;
-
-      // PROTECTED METHODS //////////////////////////////////////////////
-    protected :
-
-      /// Write mesh
-      void _write(void) const;
-      
-      /// Read mesh
-      void _read(void);
-
-    }; // MeshIOSieve
-
-  } // meshio
-} // pylith
-
-
-// End of file 

Modified: short/3D/PyLith/trunk/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/pylith/Makefile.am	2013-04-12 17:40:44 UTC (rev 21839)
+++ short/3D/PyLith/trunk/pylith/Makefile.am	2013-04-12 17:43:55 UTC (rev 21840)
@@ -22,7 +22,6 @@
 	apps/PyLithApp.py \
 	apps/PetscApplication.py \
 	apps/EqInfoApp.py \
-	apps/PrepMeshApp.py \
 	bc/__init__.py \
 	bc/AbsorbingDampers.py \
 	bc/BoundaryCondition.py \
@@ -104,7 +103,6 @@
 	meshio/MeshIOObj.py \
 	meshio/MeshIOAscii.py \
 	meshio/MeshIOLagrit.py \
-	meshio/MeshIOSieve.py \
 	meshio/OutputDirichlet.py \
 	meshio/OutputManager.py \
 	meshio/OutputManagerMesh.py \

Deleted: short/3D/PyLith/trunk/pylith/apps/PrepMeshApp.py
===================================================================
--- short/3D/PyLith/trunk/pylith/apps/PrepMeshApp.py	2013-04-12 17:40:44 UTC (rev 21839)
+++ short/3D/PyLith/trunk/pylith/apps/PrepMeshApp.py	2013-04-12 17:43:55 UTC (rev 21840)
@@ -1,158 +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-2012 University of California, Davis
-#
-# See COPYING for license information.
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/apps/PrepMeshApp.py
-##
-## @brief Python pre-processing application to adjust topology of a
-## mesh and partition it before running PyLith. This alleviates the
-## need to redo these steps for every simulation when reusing the same
-## faults.
-##
-## WARNING: This preprocessing application MUST be rerun if you change
-## which faults are used in a problem.
-
-from PetscApplication import PetscApplication
-
-def faultFactory(name):
-  """
-  Factory for fault items.
-  """
-  from pyre.inventory import facility
-  from pylith.faults.FaultCohesiveKin import FaultCohesiveKin
-  return facility(name, family="fault", factory=FaultCohesiveKin)
-
-
-# PrepMeshApp class
-class PrepMeshApp(PetscApplication):
-  """
-  Python PrepMeshApp application.
-  """
-  
-  # INVENTORY //////////////////////////////////////////////////////////
-
-  ## \b Properties
-  ## @li None
-  ##
-  ## \b Facilities
-  ## @li \b mesher Generates or imports the computational mesh.
-  ## @li \b writer Writer for processed mesh.
-  ## @li \b interfaces Interior surfaces with constraints or
-  ##   constitutive models.
-
-  import pyre.inventory
-  from pylith.utils.EmptyBin import EmptyBin
-
-  from pylith.topology.MeshImporter import MeshImporter
-  mesher = pyre.inventory.facility("mesh_generator", family="mesh_generator",
-                                   factory=MeshImporter)
-  mesher.meta['tip'] = "Generates or imports the computational mesh."
-
-  from pylith.meshio.MeshIOSieve import MeshIOSieve
-  writer = pyre.inventory.facility("writer", family="mesh_io",
-                                   factory=MeshIOSieve)
-  writer.meta['tip'] = "Writer for processed mesh."
-
-  interfaces = pyre.inventory.facilityArray("interfaces",
-                                            itemFactory=faultFactory,
-                                            factory=EmptyBin)
-  interfaces.meta['tip'] = "Interior surfaces with constraints or " \
-                           "constitutive models."
-
-  from pylith.perf.MemoryLogger import MemoryLogger
-  perfLogger = pyre.inventory.facility("perf_logger", family="perf_logger",
-                                       factory=MemoryLogger)
-  perfLogger.meta['tip'] = "Performance and memory logging."
-
-
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="prepmeshapp"):
-    """
-    Constructor.
-    """
-    PetscApplication.__init__(self, name)
-    self._loggingPrefix = "PrepMeshApp "
-    return
-
-
-  def main(self, *args, **kwds):
-    """
-    Run the application.
-    """
-    from pylith.utils.profiling import resourceUsageString
-    
-    self._debug.log(resourceUsageString())
-
-    self._setupLogging()
-
-    # Create mesh (adjust to account for interfaces (faults) if necessary)
-    self._eventLogger.stagePush("Meshing")
-    interfaces = None
-    if "interfaces" in dir(self.problem):
-      interfaces = self.problem.interfaces.components()
-    mesh = self.mesher.create(self.problem.normalizer, interfaces)
-    del interfaces
-    del self.mesher
-    self._debug.log(resourceUsageString())
-    self._eventLogger.stagePop()
-
-    self._eventLogger.stagePush("Output")
-    writer.write(mesh)
-    self._eventLogger.stagePop()
-
-
-    # Cleanup
-    self.perfLogger.logMesh('Mesh', mesh)
-    self.compilePerformanceLog()
-    if self.perfLogger.verbose:
-      self.perfLogger.show()
-
-    del mesh
-    del self.problem
-    return
-  
-
-  # PRIVATE METHODS ////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Setup members using inventory.
-    """
-    PetscApplication._configure(self)
-    self.mesher = self.inventory.mesher
-    self.problem = self.inventory.problem
-    self.perfLogger = self.inventory.perfLogger
-
-    import journal
-    self._debug = journal.debug(self.name)
-    return
-
-  def _setupLogging(self):
-    """
-    Setup event logging.
-    """
-    from pylith.utils.EventLogger import EventLogger
-    logger = EventLogger()
-    logger.className("PyLith")
-    logger.initialize()
-
-    self._eventLogger = logger
-    return
-  
-
-# End of file 

Deleted: short/3D/PyLith/trunk/pylith/meshio/MeshIOSieve.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/MeshIOSieve.py	2013-04-12 17:40:44 UTC (rev 21839)
+++ short/3D/PyLith/trunk/pylith/meshio/MeshIOSieve.py	2013-04-12 17:43:55 UTC (rev 21840)
@@ -1,104 +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-2012 University of California, Davis
-#
-# See COPYING for license information.
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pyre/meshio/MeshIOSieve.py
-##
-## @brief Python object for reading/writing a partitioned
-## finite-element mesh associated with the PETSc Sieve representation.
-##
-## Factory: mesh_io
-
-from MeshIOObj import MeshIOObj
-from meshio import MeshIOSieve as ModuleMeshIOSieve
-
-# MeshIOSieve class
-class MeshIOSieve(MeshIOObj, ModuleMeshIOSieve):
-  """
-  Python object for reading/writing finite-element mesh from simple
-  ASCII file.
-
-  Factory: mesh_io
-  """
-
-  # INVENTORY //////////////////////////////////////////////////////////
-
-  class Inventory(MeshIOObj.Inventory):
-    """
-    Python object for managing MeshIOSieve facilities and properties.
-    """
-
-    ## @class Inventory
-    ## Python object for managing MeshIOSieve facilities and properties.
-    ##
-    ## \b Properties
-    ## @li \b filename Name of mesh file
-    ##
-    ## \b Facilities
-    ## @li coordsys Coordinate system associated with mesh.
-
-    import pyre.inventory
-
-    filename = pyre.inventory.str("filename", default="")
-    filename.meta['tip'] = "Name of mesh file"
-
-    from spatialdata.geocoords.CSCart import CSCart
-    coordsys = pyre.inventory.facility("coordsys", family="coordsys",
-                                       factory=CSCart)
-    coordsys.meta['tip'] = "Coordinate system associated with mesh."
-  
-
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="meshiosieve"):
-    """
-    Constructor.
-    """
-    MeshIOObj.__init__(self, name)
-    return
-
-
-  # PRIVATE METHODS ////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Set members based using inventory.
-    """
-    MeshIOObj._configure(self)
-    self.coordsys = self.inventory.coordsys
-    self.filename(self.inventory.filename)
-    return
-
-
-  def _createModuleObj(self):
-    """
-    Create C++ MeshIOSieve object.
-    """
-    ModuleMeshIOSieve.__init__(self)
-    return
-  
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def mesh_io():
-  """
-  Factory associated with MeshIOSieve.
-  """
-  return MeshIOSieve()
-
-
-# End of file 



More information about the CIG-COMMITS mailing list