Re: [xAct] Writing a function to calculate the post-Newtonian order

32 views
Skip to first unread message

Thomas Bäckdahl

unread,
Mar 20, 2023, 4:17:37 PM3/20/23
to xa...@googlegroups.com
Hi!

This depends a bit on how complicated expression you should be able to handle, but to handle some simple cases you could try:
PNOrder[r] = -1;
PNOrder[v] = 0.5;
PNOrder[c_?ConstantQ] := 0;
PNOrder[Power[a_, n_]] := n*PNOrder[a];
PNOrder[prod_Times] := Plus @@ (PNOrder /@ List @@ prod);

Regards
Thomas

On 2023-03-20 19:37, Aniket Khairnar wrote:
Hi,

       I am trying to write a function that can calculate the post-Newtonian order of an expression. But I don't know how to proceed. Here is what the function should do.

PNOrder[expr_] = 

given that,

PNOrder[r] = -1
PNOrder[v] = 0.5

The expr would be an algebraic combination of r and v. How to write such a function with these conditions?

For ex, it should give

PNOrder[r*v] = -0.5

Regards,
Aniket Khairnar
--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xact/df04a3f8-1076-439e-a97b-459384c75f9cn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages