<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hi Ian,<br><br></div>1) This is a linear system. A is a function of the evolved variables u, but not their time derivatives udot. I can compute the right-hand side of this equation--the "b" in A udot = b--using TensorTools and finite differencing for the spatial derivatives.<br><br></div>However, A does vary with space, as the evolved variables that comprise u are spatial tensors.<br><br></div>2) I have several systems of this type, ranging from 4x4 to 14x14.<br><br></div>3) Yes, I have a general symbolic form for A in terms of the evolved variables u.<br><br></div>My concern is more with how to incorporate the use of Mathematica functions alongside the equation rules in a Kranc-based computation.<br><br></div>Right now, I'm thinking I need to convert the various evolved tensors into the matrix A by defining a Mathematica function. However, that still leaves me with various issues that are unclear to me:<br><br></div>a) If I compute the matrix A by defining a function, where can I use this function? It's not clear to me this can be used within an Equation block, as there is no corresponding C++ statement that the Kranc code generator could convert it to.<br><br></div>b) If I use such a function outside of an Equation block, it's unclear to me how I would extract the vector of right-hand sides from the Equation block in which they're computed. Making them grid functions seems clumsy, as these are not the ultimate right-hand sides that will be used with MoL. I'd like to keep them as shorthands if possible. It's not clear to me if such shorthands could be used outside Equation blocks.<br><br><br></div>So in total, I've been looking at using Mathematica to solve the linear system. It's just not clear to me how I might do this in a way that plays well with Kranc's code generation.<br><br></div><div>Thanks for your help, Ian.<br><br></div><div>-Michael <br></div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 18, 2016 at 3:40 PM Ian Hinder <<a href="mailto:ian.hinder@aei.mpg.de">ian.hinder@aei.mpg.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>On 12 Jul 2016, at 10:23, Michael Clark <<a href="mailto:michael.clark@gatech.edu" target="_blank">michael.clark@gatech.edu</a>> wrote:</div><br><blockquote type="cite"><div dir="ltr"><div><div><div><div><div>Hello,<br><br></div>I have a system of equations for time derivatives of the form A(udot) = b, where A is a symmetric matrix, udot is a vector of time derivatives to solve for, and b is a vector of right-hand sides.<br><br></div>I'd like to compute the udot vector using Kranc, as the vector b involves a great deal of tensor math that I would like to use TensorTools for.<br><br></div>What options do I have to solve this problem?<br><br>In particular, the form of the matrix A does not change in time--only the values of its nonzero entries would vary. If it could be factored or inverted symbolically so that the time-varying quantities could be input to it at each step, I think that would be ideal, rather than running a full matrix-inversion or factorization at every step.<br></div></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>Hi Michael,</div><div><br></div><div>A few questions:</div><div><br></div><div>– Is this a linear system, so that A(udot) = A . udot, or is A a general matrix-valued function of udot?</div><div><br></div><div>– How large is the matrix A?</div><div><br></div><div>– If you have a general symbolic form for A, can you compute its inverse in Mathematica, or is it too complicated?</div></div></div><div style="word-wrap:break-word"><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div>-- </div><div>Ian Hinder</div><div><a href="http://members.aei.mpg.de/ianhin" target="_blank">http://members.aei.mpg.de/ianhin</a></div></div></div></div></div>
</div>
<br></div></blockquote></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>