<div dir="ltr"><div><div><div><div><div><div><div>To anyone that has some experience with custom/programmable filters,<br><br></div>I
have a set of 9 arrays from my 'ComputeDerivatives' Filter, and I would
like to perform simple math operations on these arrays, to create
another set of 9 arrays. I have to do this with 30 sets of data, so a
'brute force' approach would be very timely<br><br></div>In theory,
instead of using the in-program Strain selection from
'ComputeDerivatives' (which provides the elements of the infinitesimal
strain tensor), I need to formulate my own 'Strain' data (<b>finite</b>
strain tensor elements), which will have EXACTLY the same format as the
in-program Strain data, just each element is calculate slightly
differently.. I can show the difference below:<br><br></div>Current, infinitesimal strain element calculation, where 'tens' is a 3x3 matrix:<br><br><pre>tens->SetComponent(0,0, derivs<a name="-0"></a>[0]);
tens->SetComponent(0,1, 0.5*(derivs[1]+derivs<a name="-3"></a>[3]));
tens->SetComponent(0,2, 0.5*(derivs[2]+derivs<a name="-6"></a>[6]));
tens->SetComponent(1,0, 0.5*(derivs[1]+derivs[3]));
tens->SetComponent(1,1, derivs<a name="-4"></a>[4]);
tens->SetComponent(1,2, 0.5*(derivs[5]+derivs<a name="-7"></a>[7]));
tens->SetComponent(2,0, 0.5*(derivs[2]+derivs[6]));
tens->SetComponent(2,1, 0.5*(derivs[5]+derivs[7]));
tens->SetComponent(2,2, derivs<a name="-8"></a>[8]);<br><br></pre><pre>and I would need to substitute the math for the finite strain elements:<br><br>tens->SetComponent(0,0, ( derivs<a name="-0"></a>[0] + 0.5*( derivs[0]^2 + derivs[3]^2 + derivs[6]^2)) );
tens->SetComponent(0,1, ( 0.5*(derivs[1]+derivs<a name="-3"></a>[3]) + 0.5*(derivs[1]*derivs[2] + derivs[4]*derivs[5] + derivs[7]*derivs[8])) );
tens->SetComponent(0,2, ( 0.5*(derivs[2]+derivs<a name="-3"></a>[6]) + 0.5*(derivs[0]*derivs[2] + derivs[3]*derivs[5] + derivs[6]*derivs[8])) );
tens->SetComponent(1,0, ( 0.5*(derivs[1]+derivs<a name="-3"></a>[3]) + 0.5*(derivs[1]*derivs[2] + derivs[4]*derivs[5] + derivs[7]*derivs[8])) );
tens->SetComponent(1,1, ( derivs<a name="-0"></a>[4] + 0.5*( derivs[1]^2 + derivs[4]^2 + derivs[7]^2)) );
tens->SetComponent(1,2, ( 0.5*(derivs[5]+derivs<a name="-3"></a>[7]) + 0.5*(derivs[1]*derivs[2] + derivs[4]*derivs[5] + derivs[7]*derivs[8])) );
tens->SetComponent(2,0, ( 0.5*(derivs[2]+derivs<a name="-3"></a>[6]) + 0.5*(derivs[0]*derivs[2] + derivs[3]*derivs[5] + derivs[6]*derivs[8])) );
tens->SetComponent(2,1, ( 0.5*(derivs[5]+derivs<a name="-3"></a>[7]) + 0.5*(derivs[1]*derivs[2] + derivs[4]*derivs[5] + derivs[7]*derivs[8])) );
tens->SetComponent(2,2, ( derivs<a name="-0"></a>[8] + 0.5*( derivs[2]^2 + derivs[5]^2 + derivs[8]^2)) );</pre><br></div>I
am NOT a very competent programmer, and was hoping there'd be some way
to implement this in the Paraview GUI (perhaps using a programmable
python filter?), without having to modify/create code.<br><br></div>Can
anyone lend a hand to helping me find a simple way to implement this? I
would like to stay in paraview, because I am creating figures using
Paraview for other aspects of my research.<br><br></div>Alternatively,
if someone knows a way to import a csv into Paraview, and have it behave
exactly like data produced from 'ComputeDerivatives' - in that I wish
to use 'Resample with Dataset', then that would be another way to go.<br><br></div>Thanks,<br><div><div><div><div><div><br></div></div></div></div></div><br clear="all"><br>-- <br>Tim Bhatnagar<br>PhD Candidate<br>
Orthopaedic Injury Biomechanics Group<br>Department of Mechanical Engineering<br>University of British Columbia<br><br>Rm 5000 - 818 West 10th Ave.<br>Vancouver, BC<br>Canada<br>V5Z 1M9<br><br>Ph: (604) 675-8845<br>Fax: (604) 675-8820<br>
Web: <a href="http://oibg.mech.ubc.ca" target="_blank">oibg.mech.ubc.ca</a><br>
</div>