[cig-commits] r22368 - in short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs: . subduction
willic3 at geodynamics.org
willic3 at geodynamics.org
Tue Jun 18 20:23:03 PDT 2013
Author: willic3
Date: 2013-06-18 20:23:03 -0700 (Tue, 18 Jun 2013)
New Revision: 22368
Added:
short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/
short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.jou
short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.py
short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_points.txt
short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_points.txt
short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_points2.txt
short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.jou
short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.py
Log:
Started creating 3D subduction zone meshing example.
Still need to add topography, and I may need to steepen up the splay fault.
Added: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.jou
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.jou (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.jou 2013-06-19 03:23:03 UTC (rev 22368)
@@ -0,0 +1,18 @@
+reset
+# This is a simple Cubit journal file to create an ACIS
+# NURBS surface from a set of intersecting lines.
+#
+# ----------------------------------------------------------
+create curve spline location -1.58363499950e+05 -3.20000000000e+05 -8.00000000000e+04 location -1.17908469300e+05 -1.50319132170e+05 -8.00000000000e+04 location -1.05810542540e+05 2.30462400000e+01 -8.00000000000e+04 location -1.30815688970e+05 1.49415446810e+05 -8.00000000000e+04 location -1.51349458880e+05 3.20000000000e+05 -8.00000000000e+04
+create curve spline location -1.25972413610e+05 -3.20000000000e+05 -6.00000000000e+04 location -8.40872403370e+04 -1.48397022260e+05 -6.00000000000e+04 location -7.30543432450e+04 2.32368020000e+02 -6.00000000000e+04 location -9.80273109400e+04 1.50969512870e+05 -6.00000000000e+04 location -1.18727496310e+05 3.20000000000e+05 -6.00000000000e+04
+create curve spline location -8.85491752020e+04 -3.20000000000e+05 -4.00000000000e+04 location -4.64147352660e+04 -1.52122299930e+05 -4.00000000000e+04 location -3.48539917300e+04 -1.33192061300e+03 -4.00000000000e+04 location -5.98340254670e+04 1.50060862060e+05 -4.00000000000e+04 location -8.10060713990e+04 3.20000000000e+05 -4.00000000000e+04
+create curve spline location -3.62044908700e+04 -3.20000000000e+05 -2.00000000000e+04 location 8.19924670580e+03 -1.51709971110e+05 -2.00000000000e+04 location 1.81460826540e+04 -1.57171791700e+03 -2.00000000000e+04 location -6.57880928000e+03 1.50748498940e+05 -2.00000000000e+04 location -2.81882089580e+04 3.20000000000e+05 -2.00000000000e+04
+create curve spline location 3.40305924030e+04 -3.20000000000e+05 0.00000000000e+00 location 8.59842663430e+04 -1.50749829420e+05 0.00000000000e+00 location 1.54341363940e+05 7.40471194000e+02 0.00000000000e+00 location 1.49520669110e+05 1.50000686630e+05 0.00000000000e+00 location 7.60625677580e+04 3.20000000000e+05 0.00000000000e+00
+create curve spline location -1.58363499950e+05 -3.20000000000e+05 -8.00000000000e+04 location -1.25972413610e+05 -3.20000000000e+05 -6.00000000000e+04 location -8.85491752020e+04 -3.20000000000e+05 -4.00000000000e+04 location -3.62044908700e+04 -3.20000000000e+05 -2.00000000000e+04 location 3.40305924030e+04 -3.20000000000e+05 0.00000000000e+00
+create curve spline location -1.17908469300e+05 -1.50319132170e+05 -8.00000000000e+04 location -8.40872403370e+04 -1.48397022260e+05 -6.00000000000e+04 location -4.64147352660e+04 -1.52122299930e+05 -4.00000000000e+04 location 8.19924670580e+03 -1.51709971110e+05 -2.00000000000e+04 location 8.59842663430e+04 -1.50749829420e+05 0.00000000000e+00
+create curve spline location -1.05810542540e+05 2.30462400000e+01 -8.00000000000e+04 location -7.30543432450e+04 2.32368020000e+02 -6.00000000000e+04 location -3.48539917300e+04 -1.33192061300e+03 -4.00000000000e+04 location 1.81460826540e+04 -1.57171791700e+03 -2.00000000000e+04 location 1.54341363940e+05 7.40471194000e+02 0.00000000000e+00
+create curve spline location -1.30815688970e+05 1.49415446810e+05 -8.00000000000e+04 location -9.80273109400e+04 1.50969512870e+05 -6.00000000000e+04 location -5.98340254670e+04 1.50060862060e+05 -4.00000000000e+04 location -6.57880928000e+03 1.50748498940e+05 -2.00000000000e+04 location 1.49520669110e+05 1.50000686630e+05 0.00000000000e+00
+create curve spline location -1.51349458880e+05 3.20000000000e+05 -8.00000000000e+04 location -1.18727496310e+05 3.20000000000e+05 -6.00000000000e+04 location -8.10060713990e+04 3.20000000000e+05 -4.00000000000e+04 location -2.81882089580e+04 3.20000000000e+05 -2.00000000000e+04 location 7.60625677580e+04 3.20000000000e+05 0.00000000000e+00
+create surface net u curve 1 to 5 v curve 6 to 10
+delete curve all
+export Acis 'interface_surf.sat'
Added: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.py (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.py 2013-06-19 03:23:03 UTC (rev 22368)
@@ -0,0 +1,84 @@
+#!/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-2013 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+# PREREQUISITES: numpy
+
+# ======================================================================
+import numpy
+# import pdb
+# pdb.set_trace()
+
+# Define parameters.
+intFile = "interface_points.txt"
+numConts = 5
+pointsPerCont = 5
+journalFile = "interface_netsurf.jou"
+acisFile = "interface_surf.sat"
+
+# Journal file formatting, etc.
+separator = "# ----------------------------------------------------------\n"
+journalBeg = \
+ "reset\n" + \
+ "# This is a simple Cubit journal file to create an ACIS\n" + \
+ "# NURBS surface from a set of intersecting lines.\n" + \
+ "#\n" + separator
+lineBeg = "create curve spline"
+splineFmt = " location %15.11e %15.11e %15.11e"
+netFmt = "create surface net u curve %d to %d v curve %d to %d\n"
+delCmd = "delete curve all\n"
+expCmd = "export Acis '" + acisFile + "'\n"
+
+
+# Read coordinates and reshape them.
+intCoords = numpy.loadtxt(intFile, dtype=numpy.float64).reshape(
+ numConts, pointsPerCont, 3)
+
+j = open(journalFile, 'w')
+j.write(journalBeg)
+
+# Loop over contours (u-lines).
+for contour in range(numConts):
+ points = intCoords[contour,:,:]
+ j.write(lineBeg)
+ for pointNum in range(pointsPerCont):
+ point = points[pointNum,:]
+ j.write(splineFmt % (point[0], point[1], point[2]))
+
+ j.write("\n")
+
+# Loop over profiles (v-lines).
+for profile in range(pointsPerCont):
+ points = intCoords[:,profile,:]
+ j.write(lineBeg)
+ for pointNum in range(numConts):
+ point = points[pointNum,:]
+ j.write(splineFmt % (point[0], point[1], point[2]))
+
+ j.write("\n")
+
+# Create net surface.
+uline1 = 1
+uline2 = numConts
+vline1 = numConts + 1
+vline2 = vline1 + pointsPerCont - 1
+j.write(netFmt % (uline1, uline2, vline1, vline2))
+
+# Delete spline curves and export Acis file.
+j.write(delCmd)
+j.write(expCmd)
+j.close()
+
+# End of file
Property changes on: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_netsurf.py
___________________________________________________________________
Added: svn:executable
+ *
Added: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_points.txt
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_points.txt (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/interface_points.txt 2013-06-19 03:23:03 UTC (rev 22368)
@@ -0,0 +1,25 @@
+-158363.49995 -320000.00000 -80000.000000
+-117908.46930 -150319.13217 -80000.000000
+-105810.54254 23.046240000 -80000.000000
+-130815.68897 149415.44681 -80000.000000
+-151349.45888 320000.00000 -80000.000000
+-125972.41361 -320000.00000 -60000.000000
+-84087.240337 -148397.02226 -60000.000000
+-73054.343245 232.36802000 -60000.000000
+-98027.310940 150969.51287 -60000.000000
+-118727.49631 320000.00000 -60000.000000
+-88549.175202 -320000.00000 -40000.000000
+-46414.735266 -152122.29993 -40000.000000
+-34853.991730 -1331.9206130 -40000.000000
+-59834.025467 150060.86206 -40000.000000
+-81006.071399 320000.00000 -40000.000000
+-36204.490870 -320000.00000 -20000.000000
+8199.2467058 -151709.97111 -20000.000000
+18146.082654 -1571.7179170 -20000.000000
+-6578.8092800 150748.49894 -20000.000000
+-28188.208958 320000.00000 -20000.000000
+34030.592403 -320000.00000 0.0000000000
+85984.266343 -150749.82942 0.0000000000
+154341.36394 740.47119400 0.0000000000
+149520.66911 150000.68663 0.0000000000
+76062.567758 320000.00000 0.0000000000
Added: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_points.txt
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_points.txt (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_points.txt 2013-06-19 03:23:03 UTC (rev 22368)
@@ -0,0 +1,20 @@
+-50000.000000 -320000.00000 -30000.000000
+-25000.000000 -320000.00000 -20000.000000
+0.0000000000 -320000.00000 -5000.0000000
+25000.000000 -320000.00000 15000.000000
+0.0000000000 -150000.00000 -30000.000000
+25000.000000 -150000.00000 -20000.000000
+50000.000000 -150000.00000 -5000.0000000
+75000.000000 -150000.00000 15000.000000
+25000.000000 0.0000000000 -30000.000000
+50000.000000 0.0000000000 -20000.000000
+75000.000000 0.0000000000 -5000.0000000
+100000.00000 0.0000000000 15000.000000
+0.0000000000 150000.00000 -30000.000000
+25000.000000 150000.00000 -20000.000000
+50000.000000 150000.00000 -5000.0000000
+75000.000000 150000.00000 15000.000000
+-25000.000000 320000.00000 -30000.000000
+0.0000000000 320000.00000 -20000.000000
+25000.000000 320000.00000 -5000.0000000
+50000.000000 320000.00000 15000.000000
Added: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_points2.txt
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_points2.txt (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_points2.txt 2013-06-19 03:23:03 UTC (rev 22368)
@@ -0,0 +1,20 @@
+-50000.000000 -320000.00000 -30000.000000
+-25000.000000 -320000.00000 -20000.000000
+0.0000000000 -320000.00000 0.0000000
+25000.000000 -320000.00000 25000.000000
+0.0000000000 -150000.00000 -30000.000000
+25000.000000 -150000.00000 -20000.000000
+50000.000000 -150000.00000 0.0000000
+75000.000000 -150000.00000 25000.000000
+25000.000000 0.0000000000 -30000.000000
+50000.000000 0.0000000000 -20000.000000
+75000.000000 0.0000000000 0.0000000
+100000.00000 0.0000000000 25000.000000
+0.0000000000 150000.00000 -30000.000000
+25000.000000 150000.00000 -20000.000000
+50000.000000 150000.00000 0.0000000
+75000.000000 150000.00000 25000.000000
+-25000.000000 320000.00000 -30000.000000
+0.0000000000 320000.00000 -20000.000000
+25000.000000 320000.00000 0.0000000
+50000.000000 320000.00000 25000.000000
Added: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.jou
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.jou (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.jou 2013-06-19 03:23:03 UTC (rev 22368)
@@ -0,0 +1,13 @@
+reset
+# This is a simple Cubit journal file to create an ACIS
+# NURBS surface from a set of profiles.
+#
+# ----------------------------------------------------------
+create curve spline location -5.00000000000e+04 -3.20000000000e+05 -3.00000000000e+04 location -2.50000000000e+04 -3.20000000000e+05 -2.00000000000e+04 location 0.00000000000e+00 -3.20000000000e+05 0.00000000000e+00 location 2.50000000000e+04 -3.20000000000e+05 2.50000000000e+04
+create curve spline location 0.00000000000e+00 -1.50000000000e+05 -3.00000000000e+04 location 2.50000000000e+04 -1.50000000000e+05 -2.00000000000e+04 location 5.00000000000e+04 -1.50000000000e+05 0.00000000000e+00 location 7.50000000000e+04 -1.50000000000e+05 2.50000000000e+04
+create curve spline location 2.50000000000e+04 0.00000000000e+00 -3.00000000000e+04 location 5.00000000000e+04 0.00000000000e+00 -2.00000000000e+04 location 7.50000000000e+04 0.00000000000e+00 0.00000000000e+00 location 1.00000000000e+05 0.00000000000e+00 2.50000000000e+04
+create curve spline location 0.00000000000e+00 1.50000000000e+05 -3.00000000000e+04 location 2.50000000000e+04 1.50000000000e+05 -2.00000000000e+04 location 5.00000000000e+04 1.50000000000e+05 0.00000000000e+00 location 7.50000000000e+04 1.50000000000e+05 2.50000000000e+04
+create curve spline location -2.50000000000e+04 3.20000000000e+05 -3.00000000000e+04 location 0.00000000000e+00 3.20000000000e+05 -2.00000000000e+04 location 2.50000000000e+04 3.20000000000e+05 0.00000000000e+00 location 5.00000000000e+04 3.20000000000e+05 2.50000000000e+04
+create surface skin curve all
+delete curve all
+export Acis 'splay_surf.sat'
Added: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.py (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.py 2013-06-19 03:23:03 UTC (rev 22368)
@@ -0,0 +1,70 @@
+#!/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-2013 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+# PREREQUISITES: numpy
+
+# ======================================================================
+import numpy
+# import pdb
+# pdb.set_trace()
+
+# Define parameters.
+splayFile = "splay_points2.txt"
+numProfs = 5
+pointsPerProf = 4
+journalFile = "splay_skinsurf.jou"
+acisFile = "splay_surf.sat"
+
+# Journal file formatting, etc.
+separator = "# ----------------------------------------------------------\n"
+journalBeg = \
+ "reset\n" + \
+ "# This is a simple Cubit journal file to create an ACIS\n" + \
+ "# NURBS surface from a set of profiles.\n" + \
+ "#\n" + separator
+lineBeg = "create curve spline"
+splineFmt = " location %15.11e %15.11e %15.11e"
+skinCmd = "create surface skin curve all\n"
+delCmd = "delete curve all\n"
+expCmd = "export Acis '" + acisFile + "'\n"
+
+
+# Read coordinates and reshape them.
+splayCoords = numpy.loadtxt(splayFile, dtype=numpy.float64).reshape(
+ numProfs, pointsPerProf, 3)
+
+j = open(journalFile, 'w')
+j.write(journalBeg)
+
+# Loop over profiles.
+for profile in range(numProfs):
+ points = splayCoords[profile,:,:]
+ j.write(lineBeg)
+ for pointNum in range(pointsPerProf):
+ point = points[pointNum,:]
+ j.write(splineFmt % (point[0], point[1], point[2]))
+
+ j.write("\n")
+
+# Create skin surface.
+j.write(skinCmd)
+
+# Delete spline curves and export Acis file.
+j.write(delCmd)
+j.write(expCmd)
+j.close()
+
+# End of file
Property changes on: short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/subduction/splay_skinsurf.py
___________________________________________________________________
Added: svn:executable
+ *
More information about the CIG-COMMITS
mailing list