[Users] Kranc and linear systems of equations
Michael Clark
michael.clark at gatech.edu
Mon Jul 18 15:06:39 CDT 2016
Hi Ian,
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.
However, A does vary with space, as the evolved variables that comprise u
are spatial tensors.
2) I have several systems of this type, ranging from 4x4 to 14x14.
3) Yes, I have a general symbolic form for A in terms of the evolved
variables u.
My concern is more with how to incorporate the use of Mathematica functions
alongside the equation rules in a Kranc-based computation.
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:
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.
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.
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.
Thanks for your help, Ian.
-Michael
On Mon, Jul 18, 2016 at 3:40 PM Ian Hinder <ian.hinder at aei.mpg.de> wrote:
> On 12 Jul 2016, at 10:23, Michael Clark <michael.clark at gatech.edu> wrote:
>
> Hello,
>
> 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.
>
> 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.
>
> What options do I have to solve this problem?
>
> 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.
>
>
> Hi Michael,
>
> A few questions:
>
> – Is this a linear system, so that A(udot) = A . udot, or is A a general
> matrix-valued function of udot?
>
> – How large is the matrix A?
>
> – If you have a general symbolic form for A, can you compute its inverse
> in Mathematica, or is it too complicated?
>
> --
> Ian Hinder
> http://members.aei.mpg.de/ianhin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20160718/3bd43dad/attachment.html
More information about the Users
mailing list