[cig-commits] [commit] baagaard/fix-meshing-examples-trelis: Fixed meshing for examples/2d/greensfns/reverse. No object ids used. (de19572)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Sat Jun 21 21:08:47 PDT 2014


Repository : https://github.com/geodynamics/pylith

On branch  : baagaard/fix-meshing-examples-trelis
Link       : https://github.com/geodynamics/pylith/compare/a533b7416741daff57259151b4d132074eaa5865...de1957210f7b1aa71d1a934ca51ff930f0384f25

>---------------------------------------------------------------

commit de1957210f7b1aa71d1a934ca51ff930f0384f25
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Sat Jun 21 21:08:42 2014 -0700

    Fixed meshing for examples/2d/greensfns/reverse. No object ids used.


>---------------------------------------------------------------

de1957210f7b1aa71d1a934ca51ff930f0384f25
 examples/2d/greensfns/reverse/createbc.jou  | 13 +++---
 examples/2d/greensfns/reverse/geometry.jou  | 71 +++++++++++++++++++++++++----
 examples/2d/greensfns/reverse/gradient.jou  | 35 +++++++-------
 examples/2d/greensfns/reverse/mesh_tri3.jou |  1 +
 4 files changed, 86 insertions(+), 34 deletions(-)

diff --git a/examples/2d/greensfns/reverse/createbc.jou b/examples/2d/greensfns/reverse/createbc.jou
index d92b049..7b4ace6 100644
--- a/examples/2d/greensfns/reverse/createbc.jou
+++ b/examples/2d/greensfns/reverse/createbc.jou
@@ -1,7 +1,7 @@
 # ----------------------------------------------------------------------
 # Create blocks for materials
 # ----------------------------------------------------------------------
-block 1 surface 8 9
+block 1 surface all
 block 1 name "elastic"
 
 # ----------------------------------------------------------------------
@@ -14,36 +14,37 @@ nodeset 10 name "fault"
 # ----------------------------------------------------------------------
 # Create nodeset for fault edge
 # ----------------------------------------------------------------------
-group "fault_edge" add node in vertex 15
+group "fault_edge" add node in vertex vertex_fault_bot
 nodeset 11 group fault_edge
 nodeset 11 name "fault_edge"
 
 # ----------------------------------------------------------------------
 # Create nodeset for +x face
 # ----------------------------------------------------------------------
-group "face_xpos" add node in curve 14
+group "face_xpos" add node in curve edge_xpos
 nodeset 20 group face_xpos
 nodeset 20 name "face_xpos"
 
 # ----------------------------------------------------------------------
 # Create nodeset for -x face
 # ----------------------------------------------------------------------
-group "face_xneg" add node in curve 16
+group "face_xneg" add node in curve edge_xneg
 nodeset 21 group face_xneg
 nodeset 21 name "face_xneg"
 
 # ----------------------------------------------------------------------
 # Create nodeset for +y face
 # ----------------------------------------------------------------------
-group "face_ypos" add node in curve 19 20
+group "face_ypos" add node in curve ground_fw ground_hw
 nodeset 22 group face_ypos
 nodeset 22 name "face_ypos"
 
 # ----------------------------------------------------------------------
 # Create nodeset for -y face
 # ----------------------------------------------------------------------
-group "face_yneg" add node in curve 18 21
+group "face_yneg" add node in curve edge_yneg_fw edge_yneg_hw
 nodeset 23 group face_yneg
 nodeset 23 name "face_yneg"
 
 
+
diff --git a/examples/2d/greensfns/reverse/geometry.jou b/examples/2d/greensfns/reverse/geometry.jou
index 254a2fb..7f16236 100644
--- a/examples/2d/greensfns/reverse/geometry.jou
+++ b/examples/2d/greensfns/reverse/geometry.jou
@@ -29,6 +29,7 @@ reset
 
 # Make sure undo is off to prevent errors in stitching volumes.
 undo off
+journal idless on
 
 # ----------------------------------------------------------------------
 # Create block
@@ -47,23 +48,75 @@ undo off
 #{xoffset=0.5*faultWidth*cosd(faultDipAngle)}
 
 brick x {blockWidth} y {blockHeight} z {blockLength}
-volume 1 move x {-xoffset} y {-blockHeight/2.0} z 0.0
+#{idV=Id("volume")}
+volume {idV} move x {-xoffset} y {-blockHeight/2.0} z 0.0
 
-create midsurface volume 1 surface 1 2
-delete volume 1
+# create midsurface volume {idV} surface 1 2
+surface ( at -10606.6 -40000 5000 ordinal 1 ) name "surf_front"
+surface ( at -10606.6 -40000 -5000 ordinal 1 ) name "surf_back"
+create midsurface volume {idV} surface surf_front surf_back
+#{idS=Id("surface")}
+delete volume {idV}
 
 # ----------------------------------------------------------------------
 # Create fault surface
 # ----------------------------------------------------------------------
 
 # Create fault (yz plane) at x = 0.0
-split surface 7 across location position 0 0 0 location position {-blockHeight/tand(faultDipAngle)} {-blockHeight} 0
-split curve 17 at position {-faultWidth*cosd(faultDipAngle)} {-faultWidth*sind(faultDipAngle)} 0
-curve 23 name "fault_surface"
+split surface {idS} across location position 0 0 0 location position {-blockHeight/tand(faultDipAngle)} {-blockHeight} 0
+
+# curve 17 name "fault_extended"
+curve ( at -40000 -40000 0 ordinal 1 ordered ) name "fault_extended"
+split curve fault_extended at position {-faultWidth*cosd(faultDipAngle)} {-faultWidth*sind(faultDipAngle)} 0
 
 # ----------------------------------------------------------------------
-# Imprint all volumes, merging surfaces
+# Name curves
 # ----------------------------------------------------------------------
-imprint all
-merge all
+#curve 23 name "fault_surface"
+curve ( at -10606.6 -10606.6 0 ordinal 1 ordered ) name "fault_surface"
+
+#curve 19 name "ground_fw"
+curve ( at 32196.7 0 0 ordinal 1 ordered )  name "ground_fw"
+
+#curve 20 name "ground_hw"
+curve ( at -42803.3 0 0 ordinal 1 ordered ) name "ground_hw"
+
+#curve 14 name "edge_xpos"
+curve ( at 64393.4 -40000 0 ordinal 1 ordered ) name "edge_xpos"
+
+#curve 16 name "edge_xneg"
+curve ( at -85606.6 -40000 0 ordinal 1 ordered ) name "edge_xneg"
+
+#curve 21 name "edge_yneg_hw"
+curve ( at -82803.3 -80000 0 ordinal 1 ordered ) name "edge_yneg_hw"
+
+#curve 18 name "edge_yneg_fw"
+curve ( at -7803.3 -80000 0 ordinal 1 ordered ) name "edge_yneg_fw"
+
+#curve 22 name "fault_extended"
+curve ( at -50606.6 -50606.6 0 ordinal 1 ordered ) name "fault_extended"
+
+# ----------------------------------------------------------------------
+# Name vertices
+# ----------------------------------------------------------------------
+
+#vertex 15 name "vertex_fault_bot"
+vertex ( at -21213.2 -21213.2 0 ordinal 1 ordered ) name "vertex_fault_bot"
+
+#vertex 14 name "vertex_fault_top"
+vertex ( at 0 0 0 ordinal 1 ordered ) name "vertex_fault_top"
+
+#vertex 13 name "vertex_fault_yneg"
+vertex ( at -80000 -80000 0 ordinal 1 ordered ) name "vertex_fault_yneg"
+
+#vertex 11 name "vertex_top_xpos"
+vertex ( at 64393.4 0 0 ordinal 1 ordered ) name "vertex_top_xpos"
+
+#vertex 12 name "vertex_top_xneg"
+vertex ( at -85606.6 0 0 ordinal 1 ordered ) name "vertex_top_xneg"
+
+#vertex 9 name "vertex_bot_xpos"
+vertex ( at 64393.4 -80000 0 ordinal 1 ordered ) name "vertex_bot_xpos"
 
+#vertex 10 name "vertex_bot_xneg"
+vertex ( at -85606.6 -80000 0 ordinal 1 ordered ) name "vertex_bot_xneg"
diff --git a/examples/2d/greensfns/reverse/gradient.jou b/examples/2d/greensfns/reverse/gradient.jou
index e100513..e36cd8f 100644
--- a/examples/2d/greensfns/reverse/gradient.jou
+++ b/examples/2d/greensfns/reverse/gradient.jou
@@ -10,17 +10,17 @@
 # Compute sizes at curve endpoints
 # ----------------------------------------------------------------------
 
-# dxA - size at vertex 11
-#{dxStart=dx}{curveL=Length(19)}{execute("dxA="//fun_dx)}
+# dxA - size at vertex_xpos
+#{dxStart=dx}{curveL=Length(Id("ground_fw"))}{execute("dxA="//fun_dx)}
 
-# dxB - size at vertex 12
-#{dxStart=dx}{curveL=Length(20)}{execute("dxB="//fun_dx)}
+# dxB - size at vertex_xneg
+#{dxStart=dx}{curveL=Length(Id("ground_hw"))}{execute("dxB="//fun_dx)}
 
-# dxC - size at vertex 13, 10
-#{dxStart=dx}{curveL=Length(22)}{execute("dxC="//fun_dx)}
+# dxC - size at vertex_fault_yneg, vertex_bot_yneg
+#{dxStart=dx}{curveL=Length(Id("fault_extended"))}{execute("dxC="//fun_dx)}
 
-# dxD - size at vertex 9
-#{dxStart=dxA}{curveL=Length(14)}{execute("dxD="//fun_dx)}
+# dxD - size at vertex__xpos, vertex_top_xneg
+#{dxStart=dxA}{curveL=Length(Id("edge_xpos"))}{execute("dxD="//fun_dx)}
 
 # ----------------------------------------------------------------------
 # Reset sizes
@@ -32,24 +32,21 @@ surface all sizing function none
 curve fault_surface size {dx}
 
 # Set bias on curves extending from faults
-curve 19 scheme bias fine size {dx} factor {bias_factor} start vertex 14
-curve 20 scheme bias fine size {dx} factor {bias_factor} start vertex 14
-curve 22 scheme bias fine size {dx} factor {bias_factor} start vertex 15
+curve ground_fw scheme bias fine size {dx} factor {bias_factor} start vertex vertex_fault_top
+curve ground_hw scheme bias fine size {dx} factor {bias_factor} start vertex vertex_fault_top
+curve fault_extended scheme bias fine size {dx} factor {bias_factor} start vertex vertex_fault_bot
 
-curve 21 size {dxC}
+curve edge_yneg_hw size {dxC}
 
 # A to D
-curve 18 scheme bias fine size {dxA} coarse size {dxD} start vertex 11
+curve edge_xpos scheme bias fine size {dxA} coarse size {dxD} start vertex vertex_top_xpos
 
 # B to C
-curve 16 scheme bias fine size {dxA} coarse size {dxD} start vertex 12
+curve edge_xneg scheme bias fine size {dxA} coarse size {dxD} start vertex vertex_top_xneg
 
 # D to C
-curve 18 scheme bias fine size {dxA} coarse size {dxD} start vertex 13
+curve edge_yneg_fw scheme bias fine size {dxA} coarse size {dxD} start vertex vertex_fault_yneg
 
-surface 8 9 sizing function type bias start curve fault_surface factor {bias_factor}
+surface all sizing function type bias start curve fault_surface factor {bias_factor}
 
 # End of file
-
-
-
diff --git a/examples/2d/greensfns/reverse/mesh_tri3.jou b/examples/2d/greensfns/reverse/mesh_tri3.jou
index c87a637..bb2b3b7 100644
--- a/examples/2d/greensfns/reverse/mesh_tri3.jou
+++ b/examples/2d/greensfns/reverse/mesh_tri3.jou
@@ -40,3 +40,4 @@ export mesh "mesh_tri3.exo" dimension 2 overwrite
 
 
 
+



More information about the CIG-COMMITS mailing list