[Users] debugging kranc .m

Comer Duncan comer.duncan at gmail.com
Mon Aug 17 14:09:53 CDT 2015


Hi,

I am trying to make a Kranc file to build a thorn to make a Brill wave
using CT_Cosmology.  I am bogged down with errors in the script and would
appreciate some help in getting the thing to work.  I am attaching the
script and the output err file.  Basically what I am trying to do is to
build a single kranc file to handle the specification of the initial metric
and extrinsic curvature and have the Hamiltonian constraint solved using
the CT_Cosmology thorn CT_Multilevel.  I have been trying to copy existing
thorns but have not been able to iron out the problems.

Thanks for the help!

Comer

On Wed, Aug 12, 2015 at 11:17 AM, Comer Duncan <comer.duncan at gmail.com>
wrote:

> Here are the two files. Sorry.
>
> Comer
>
> On Wed, Aug 12, 2015 at 11:16 AM, Comer Duncan <comer.duncan at gmail.com>
> wrote:
>
>> Hi Ian,
>>
>> I've made some changes taking info from the WeylScalar thorn stuff, but
>> apparently not really well enough.  I am attaching the BrillAnalytic.err
>> and BrillAnalytic.m files.  The error I get indicates that there is a big
>> mismatch between expected argument number (2) and 'passed' (17)!.  I can
>> not tell where this is coming from from the error.  Can you take a look,
>> please?
>>
>> Thanks.
>>
>> Comer
>>
>> On Tue, Aug 11, 2015 at 10:45 AM, Ian Hinder <ian.hinder at aei.mpg.de>
>> wrote:
>>
>>>
>>> On 11 Aug 2015, at 15:07, Comer Duncan <comer.duncan at gmail.com> wrote:
>>>
>>> Hi Ian,
>>>
>>> Yes, I have a recurring error which I can't track down. In fact there
>>> are probably several things wrong with the script.  I am attaching the
>>> script BrillAnalytic.m and BrillAnalytic.err.  I can not seem to locate a
>>> missing paren or bracket or brace.  vi tells me that there is a mismatch of
>>> 1 in the occurrence of a '[' and a ']' .  Also I am not at all sure that I
>>> have configured the calculation of TrRicci correctly.  On one hand I
>>> specify gxx,gxy,gxz, etc but never associate these expressions with
>>> g[la,lb].  I guess I don't understand well enough the working of Kranc.
>>> Thanks for taking a look!
>>>
>>>
>>> Hi Comer,
>>>
>>> Observations in the order I have them:
>>>
>>>
>>>    - You can't define q[rho1_,zcyl_] in the way that you have, inside
>>>    the calculation.  The mathematica expression f[x_] := y has the effect of
>>>    defining the function f, but returns Null.  So you effectively have
>>>
>>>
>>>     epsi -> one,
>>>     Null,
>>>     rho1 -> Sqrt[x*x + y*y],
>>>
>>> in your calculation.  Just move this to outside the calculation.
>>>
>>> Get["KrancThorn`]"; should be Get["KrancThorn`"];  *that* was a subtle
>>> mistake!  I commented out the whole of the rest of the file before I found
>>> it! The issue is that the closing parenthesis is inside the string (before
>>> the ") so Mathematica thinks the whole of the rest of the file is inside
>>> the Get[], and when it reaches the end of the file, it complains that the
>>> Get hasn't been terminated.  This is your main error.
>>>
>>> 1/detg detgExpr is indeed 1.  However, detg is calculated from g only
>>> once, rather than in every component of gu, so it is more efficient.
>>>
>>> You need to define g as a tensor.  Anything which is used as a tensor in
>>> the .m file needs to be defined as a tensor with DefineTensor.  This is the
>>> cause of the RecursionLimit errors, which happen in MatrixInverse.  Kranc
>>> could in fact detect this; I am thinking about how to add such a check.
>>>
>>> The standard 3+1 metric variables are defined in the ADMBase thorn, and
>>> are called gxx, gxy, etc.  Kranc needs tensors to be called g11, g12, etc,
>>> so we usually just redefine these components: g11=gxx; g21=gxy; g22=gyy;
>>> g31=gxz; g32=gyz; g33=gzz
>>>
>>> You might want to take a look at
>>>
>>>
>>> https://bitbucket.org/einsteintoolkit/einsteinanalysis/src/master/WeylScal4/m/WeylScal4.m
>>>
>>> which is a thorn for computing the Weyl scalars from the ADMBase
>>> variables, which is similar to what you are trying to do in TrRicciCalc.
>>>
>>> --
>>> Ian Hinder
>>> http://members.aei.mpg.de/ianhin
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20150817/523f2e45/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CT_BrillAnalytic.m
Type: application/octet-stream
Size: 11959 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20150817/523f2e45/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CT_BrillAnalytic.err
Type: application/octet-stream
Size: 8882 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20150817/523f2e45/attachment-0003.obj 


More information about the Users mailing list