<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Dear Brad and Charles,</div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">I will let you know soon. Thanks a lot for your help.</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif">Regards,</font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times, serif"><br></font></div><div><font class="Apple-style-span" face="'times new roman', 'new york', times,
 serif">Luigi</font></div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; color: black; "><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">Da:</span></b> Brad Aagaard &lt;baagaard@usgs.gov&gt;<br><b><span style="font-weight: bold;">A:</span></b> Charles Williams &lt;willic3@gmail.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b>
 cig-short@geodynamics.org<br><b><span style="font-weight: bold;">Inviato:</span></b> Lun 11 aprile 2011, 21:17:58<br><b><span style="font-weight: bold;">Oggetto:</span></b> Re: [CIG-SHORT] Fault-slip vector plot<br></font><br>The python script that Charles provided requires the Enthought Mayavi <br>package. If you are using a Linux or Darwin system and use a package <br>manager, a mayavi package may be available for easy installation. <br>Building Mayavi from source can be complicated due to its dependencies, <br>so it may be easier to write your own post-processing script to compute <br>the principal stresses.<br><br>Brad<br><br><br>On 04/11/2011 12:09 PM, Charles Williams wrote:<br>&gt; Attached is a simple Python script to compute principal axes, along with the<br>&gt; associated .cfg file. You will need to edit the .cfg file for your particular<br>&gt; problem. Let me know if this works OK for you -- I haven't really tested it. If<br>&gt; I'm
 remembering correctly, you will end up with one vector for each principal<br>&gt; axis direction, which will allow you to plot each principal axis separately as a<br>&gt; glyph.<br>&gt;<br>&gt; Charles<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; On 12/04/2011, at 4:47 AM, Brad Aagaard wrote:<br>&gt;<br>&gt;&gt;&nbsp; On 04/11/2011 09:01 AM, luigi vadacca wrote:<br>&gt;&gt;&gt;&nbsp; Dear all,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&nbsp; I have two questions about the plot of the fault slip vector and principal<br>&gt;&gt;&gt;&nbsp; stress axes in paraview.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&nbsp; In figure 7.33 of the example "step11" of the pylith manual is written:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&nbsp; "Note that PyLith outputs slip in the fault coordinate system, so we transform<br>&gt;&gt;&gt;&nbsp; them to the global coordinate<br>&gt;&gt;&gt;&nbsp; system using the Calculator in ParaView. A more general approach involves<br>&gt;&gt;&gt;&nbsp; outputing
 the fault coordinate<br>&gt;&gt;&gt;&nbsp; system information and using these fields in the Calculator"<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&nbsp; 1 - How can I do this?<br>&gt;&gt;<br>&gt;&gt;&nbsp; For the fault output, request that the output include the strike, dip,<br>&gt;&gt;&nbsp; and normal directions in the info file using something similar to the<br>&gt;&gt;&nbsp; following (you may need to adjust the name of the fault output component<br>&gt;&gt;&nbsp; if you have more than one fault or name your fault component something<br>&gt;&gt;&nbsp; else; you may also want to add other info fields to the output such as<br>&gt;&gt;&nbsp; final slip and slip time):<br>&gt;&gt;<br>&gt;&gt;&nbsp; [pylithapp.timedependent.interfaces.fault.output]<br>&gt;&gt;&nbsp; vertex_info_fields = [strike_dir,dip_dir,normal_dir]<br>&gt;&gt;<br>&gt;&gt;&nbsp; In ParaView you can use the calculator to take the dot product of the<br>&gt;&gt;&nbsp; slip with the three directions
 to get the slip vector in global<br>&gt;&gt;&nbsp; coordinates. For example,<br>&gt;&gt;<br>&gt;&gt;&nbsp; (slip[0]*strike_dir[0] +<br>&gt;&gt;&nbsp; slip[1]*dip_dir[0] +<br>&gt;&gt;&nbsp; slip[2]*normal_dir[0]) * iHat +<br>&gt;&gt;&nbsp; (slip[0]*strike_dir[1] +<br>&gt;&gt;&nbsp; slip[1]*dip_dir[1] +<br>&gt;&gt;&nbsp; slip[2]*normal_dir[1]) * jHat +<br>&gt;&gt;&nbsp; (slip[0]*strike_dir[2] +<br>&gt;&gt;&nbsp; slip[1]*dip_dir[2] +<br>&gt;&gt;&nbsp; slip[2]*normal_dir[2]) * kHat<br>&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&nbsp; 2 - Is possible to plot the three principal stress axes directly in paraview?<br>&gt;&gt;<br>&gt;&gt;&nbsp; ParaView does not supply a filter to calculate the principal stresses,<br>&gt;&gt;&nbsp; so you will need to write your own post-processing script.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&nbsp; Brad<br>&gt;&gt;&nbsp; _______________________________________________<br>&gt;&gt;&nbsp; CIG-SHORT mailing list<br>&gt;&gt;&nbsp; <a
 ymailto="mailto:CIG-SHORT@geodynamics.org" href="mailto:CIG-SHORT@geodynamics.org">CIG-SHORT@geodynamics.org</a>&lt;mailto:<a ymailto="mailto:CIG-SHORT@geodynamics.org" href="mailto:CIG-SHORT@geodynamics.org">CIG-SHORT@geodynamics.org</a>&gt;<br>&gt;&gt;&nbsp; <a href="http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short" target="_blank">http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short</a><br>&gt;<br>&gt; Charles A. Williams<br>&gt; Scientist<br>&gt; GNS Science<br>&gt; 1 Fairway Drive, Avalon<br>&gt; PO Box 30368<br>&gt; Lower Hutt 5040<br>&gt; New Zealand<br>&gt; ph (office): 0064-4570-4566<br>&gt; fax (office): 0064-4570-4600<br>&gt; <a ymailto="mailto:C.Williams@gns.cri.nz" href="mailto:C.Williams@gns.cri.nz">C.Williams@gns.cri.nz</a>&lt;mailto:<a ymailto="mailto:C.Williams@gns.cri.nz" href="mailto:C.Williams@gns.cri.nz">C.Williams@gns.cri.nz</a>&gt;<br>&gt;<br><br>_______________________________________________<br>CIG-SHORT mailing
 list<br><a ymailto="mailto:CIG-SHORT@geodynamics.org" href="mailto:CIG-SHORT@geodynamics.org">CIG-SHORT@geodynamics.org</a><br><a href="http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short" target="_blank">http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short</a><br></div></div><div style="position: fixed; color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "></div>


</div></body></html>