[cig-commits] r12870 - in seismo/3D: . GEOCUBIT

emanuele at geodynamics.org emanuele at geodynamics.org
Fri Sep 12 07:48:11 PDT 2008


Author: emanuele
Date: 2008-09-12 07:48:10 -0700 (Fri, 12 Sep 2008)
New Revision: 12870

Added:
   seismo/3D/GEOCUBIT/
   seismo/3D/GEOCUBIT/GEOCUBIT.py
Log:
geocubit

Added: seismo/3D/GEOCUBIT/GEOCUBIT.py
===================================================================
--- seismo/3D/GEOCUBIT/GEOCUBIT.py	                        (rev 0)
+++ seismo/3D/GEOCUBIT/GEOCUBIT.py	2008-09-12 14:48:10 UTC (rev 12870)
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+"""
+GEOCUBIT.py
+this file is part of GEOCUBIT
+
+Created by Emanuele Casarotti 
+Copyright (c) 2008 Istituto Nazionale di Geofisica e Vulcanologia 
+
+!---------------------------------------------------------------------------
+! GEOCUBIT is free software: you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation, either version 3 of the License, or
+! (at your option) any later version.
+!
+! GEOCUBIT is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with GEOCUBIT.  If not, see <http://www.gnu.org/licenses/>.
+!
+!---------------------------------------------------------------------------
+"""
+#open the mpi environment
+try:
+    import mpi
+    iproc=mpi.rank
+    numproc=mpi.size
+    print iproc,'/',numproc
+    mpiflag=True
+except:
+    numproc=0
+    mpiflag=False
+
+
+#import the menu option
+import op.menu as menu
+
+if not mpiflag: iproc=menu.id_proc
+
+if iproc == 0 or menu.single:
+   print 'script -> ',menu.script
+   print 'mesh   -> ',menu.mesh
+   print 'basin  -> ',menu.basin
+   print 'surface-> ',menu.surface
+   print 'id_proc-> ',iproc
+   
+if __name__ == '__main__':
+    if menu.script:
+        from jou_maker import jou_maker
+        jou_maker()
+    elif menu.mesh:
+        from meshfem3D_cubit import mesher
+        mesher()
+    elif menu.surface:
+        from surface import surface
+        surface()
+    elif menu.basin:
+        from basin import basin
+        basin(iproc)


Property changes on: seismo/3D/GEOCUBIT/GEOCUBIT.py
___________________________________________________________________
Name: svn:executable
   + 



More information about the cig-commits mailing list