<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Apr 19, 2014 at 5:25 PM, Miguel Angel Salazar de Troya <span dir="ltr"><<a href="mailto:salazardetroya@gmail.com" target="_blank">salazardetroya@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for your response. Now I understand a bit better your implementation, but I am still confused. Is the g3 function equivalent to the f_{1,1} function in the matrix in equation (3) in this paper: <a href="http://arxiv.org/pdf/1309.1204v2.pdf" target="_blank">http://arxiv.org/pdf/1309.1204v2.pdf</a> ? If so, why would it have terms that depend on the trial fields? I think this is what is confusing me.</div>
</blockquote><div><br></div><div>Yes, it is. It has no terms that depend on the trial fields. It is just indexed by the number of components in that field. It is</div><div>a continuum thing, which has nothing to do with the discretization. That is why it acts pointwise.</div>
<div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote">On Sat, Apr 19, 2014 at 11:35 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On Fri, Apr 18, 2014 at 1:23 PM, Miguel Angel Salazar de Troya <span dir="ltr"><<a href="mailto:salazardetroya@gmail.com" target="_blank">salazardetroya@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everybody.<div><br></div><div>First, I am taking this example from the petsc-dev version, I am not sure if I should have posted this in another mail-list, if so, my apologies. </div>
<div><br></div><div>
In this example, for the elasticity case, function g3 is built as:</div><div><br></div><div><div>void g3_elas(const PetscScalar u[], const PetscScalar gradU[], const PetscScalar a[], const PetscScalar gradA[], const PetscReal x[], PetscScalar g3[])</div>
<div>{</div><div> const PetscInt dim = spatialDim;</div><div> const PetscInt Ncomp = spatialDim;</div><div> PetscInt compI, d;</div><div><br></div><div> for (compI = 0; compI < Ncomp; ++compI) {</div><div>
for (d = 0; d < dim; ++d) {</div>
<div> g3[((compI*Ncomp+compI)*dim+d)*dim+d] = 1.0;</div><div> }</div><div> }</div><div>}</div><div><br></div><div>Therefore, a fourth-order tensor is represented as a vector. I was checking the indices for different iterator values, and they do not seem to match the vectorization that I have in mind. For a two dimensional case, the indices for which the value is set as 1 are:</div>
<div><br></div><div>compI = 0 , d = 0 -----> index = 0</div><div>compI = 0 , d = 1 -----> index = 3<br></div><div>compI = 1 , d = 0 -----> index = 12<br></div><div>
compI = 1 , d = 1 -----> index = 15<br></div><div><br></div><div>The values for the first and last seem correct to me, but they other two are confusing me. I see that this elasticity tensor (which is the derivative of the gradient by itself in this case) would be a four by four identity matrix in its matrix representation, so the indices in between would be 5 and 10 instead of 3 and 12, if we put one column on top of each other. </div>
</div></div></blockquote><div><br></div></div><div>I have read this a few times, but I cannot understand that you are asking. The simplest thing I can</div><div>respond is that we are indexing a row-major array, using the indices:</div>
<div><br></div><div> g3[ic, id, jc, jd]</div><div><br></div><div>where ic indexes the components of the trial field, id indexes the derivative components,</div><div>jc indexes the basis field components, and jd its derivative components.</div>
<div><br></div><div> Matt</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I guess my question is then, how did you vectorize the fourth order tensor? </div>
<div><br></div><div>Thanks in advance</div><span><font color="#888888"><div>Miguel</div><div><br></div>-- <br><div dir="ltr">
<font face="verdana, sans-serif"><b>Miguel Angel Salazar de Troya</b></font><span><font color="#888888"><br><font face="arial,helvetica,sans-serif">Graduate Research Assistant<br>Department of Mechanical Science and Engineering<br>
</font>University of Illinois at Urbana-Champaign<br><a href="tel:%28217%29%20550-2360" value="+12175502360" target="_blank">(217) 550-2360</a><br>
<a href="mailto:salaza11@illinois.edu" target="_blank">salaza11@illinois.edu</a></font></span><div><br></div></div>
</font></span></div></div>
</blockquote></div></div><span><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</font></span></font></span></div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font face="verdana, sans-serif"><b>Miguel Angel Salazar de Troya</b></font><span><font color="#888888"><br>
<font face="arial,helvetica,sans-serif">Graduate Research Assistant<br>
Department of Mechanical Science and Engineering<br></font>University of Illinois at Urbana-Champaign<br><a href="tel:%28217%29%20550-2360" value="+12175502360" target="_blank">(217) 550-2360</a><br>
<a href="mailto:salaza11@illinois.edu" target="_blank">salaza11@illinois.edu</a></font></span><div><br></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>