<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 <baagaard@usgs.gov><br><b><span style="font-weight: bold;">A:</span></b> Charles Williams <willic3@gmail.com><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>> Attached is a simple Python script to compute principal axes, along with the<br>> associated .cfg file. You will need to edit the .cfg file for your particular<br>> problem. Let me know if this works OK for you -- I haven't really tested it. If<br>> I'm
remembering correctly, you will end up with one vector for each principal<br>> axis direction, which will allow you to plot each principal axis separately as a<br>> glyph.<br>><br>> Charles<br>><br>><br>><br>><br>><br>> On 12/04/2011, at 4:47 AM, Brad Aagaard wrote:<br>><br>>> On 04/11/2011 09:01 AM, luigi vadacca wrote:<br>>>> Dear all,<br>>>><br>>>> I have two questions about the plot of the fault slip vector and principal<br>>>> stress axes in paraview.<br>>>><br>>>> In figure 7.33 of the example "step11" of the pylith manual is written:<br>>>><br>>>> "Note that PyLith outputs slip in the fault coordinate system, so we transform<br>>>> them to the global coordinate<br>>>> system using the Calculator in ParaView. A more general approach involves<br>>>> outputing
the fault coordinate<br>>>> system information and using these fields in the Calculator"<br>>>><br>>>> 1 - How can I do this?<br>>><br>>> For the fault output, request that the output include the strike, dip,<br>>> and normal directions in the info file using something similar to the<br>>> following (you may need to adjust the name of the fault output component<br>>> if you have more than one fault or name your fault component something<br>>> else; you may also want to add other info fields to the output such as<br>>> final slip and slip time):<br>>><br>>> [pylithapp.timedependent.interfaces.fault.output]<br>>> vertex_info_fields = [strike_dir,dip_dir,normal_dir]<br>>><br>>> In ParaView you can use the calculator to take the dot product of the<br>>> slip with the three directions
to get the slip vector in global<br>>> coordinates. For example,<br>>><br>>> (slip[0]*strike_dir[0] +<br>>> slip[1]*dip_dir[0] +<br>>> slip[2]*normal_dir[0]) * iHat +<br>>> (slip[0]*strike_dir[1] +<br>>> slip[1]*dip_dir[1] +<br>>> slip[2]*normal_dir[1]) * jHat +<br>>> (slip[0]*strike_dir[2] +<br>>> slip[1]*dip_dir[2] +<br>>> slip[2]*normal_dir[2]) * kHat<br>>><br>>>><br>>>> 2 - Is possible to plot the three principal stress axes directly in paraview?<br>>><br>>> ParaView does not supply a filter to calculate the principal stresses,<br>>> so you will need to write your own post-processing script.<br>>><br>>><br>>> Brad<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><mailto:<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>><br>> Charles A. Williams<br>> Scientist<br>> GNS Science<br>> 1 Fairway Drive, Avalon<br>> PO Box 30368<br>> Lower Hutt 5040<br>> New Zealand<br>> ph (office): 0064-4570-4566<br>> fax (office): 0064-4570-4600<br>> <a ymailto="mailto:C.Williams@gns.cri.nz" href="mailto:C.Williams@gns.cri.nz">C.Williams@gns.cri.nz</a><mailto:<a ymailto="mailto:C.Williams@gns.cri.nz" href="mailto:C.Williams@gns.cri.nz">C.Williams@gns.cri.nz</a>><br>><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>