Skip to content

Commit

Permalink
Add special handling of static case when constructing a TeukolskyMode
Browse files Browse the repository at this point in the history
Fixes #47
  • Loading branch information
barrywardell committed Oct 20, 2023
1 parent 344223f commit ec6b46e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Kernel/TeukolskyMode.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
TeukolskyPointParticleMode::mino = "Orbit parametrization \"`1`\" is not currently supported. Use \"Mino\" parametrization instead.";


TeukolskyPointParticleMode::sopt = "Option `1` not supported for static (\[Omega]=0) modes."


(* ::Subsection::Closed:: *)
(*Begin Private section*)

Expand Down Expand Up @@ -108,6 +111,7 @@

domain = OptionValue["Domain"];
If[MatchQ[domain, {_?NumericQ, _?NumericQ}],
If[\[Omega] == 0, Message[TeukolskyPointParticleMode::sout, "Domain"]; Return[$Failed]];
R = Ruser = TeukolskyRadial[s, l, m, a, \[Omega], Method ->
{"NumericalIntegration", "Domain"-> {"In" -> domain, "Up" -> domain}}];
,
Expand All @@ -118,9 +122,11 @@
rmin = p/(1+e);
rmax = p/(1-e);
Module[{eps=2/10^Precision[{p,e}]}, rmin = (1-eps)rmin; rmax = (1+eps)rmax];
R = TeukolskyRadial[s, l, m, a, \[Omega], Method->{"NumericalIntegration","Domain"-> {"In"->{rmin,rmax}, "Up"->{rmin,rmax}}},
If[\[Omega] != 0,
R = TeukolskyRadial[s, l, m, a, \[Omega], Method->{"NumericalIntegration","Domain"-> {"In"->{rmin,rmax}, "Up"->{rmin,rmax}}},
"Amplitudes" -> <|"In"-> R["In"]["UnscaledAmplitudes"], "Up"-> R["Up"]["UnscaledAmplitudes"]|>,
"RenormalizedAngularMomentum"-> R["In"]["RenormalizedAngularMomentum"], "Eigenvalue" -> R["In"]["Eigenvalue"]];
];
,
rmin = rmax = p;
];
Expand Down

0 comments on commit ec6b46e

Please sign in to comment.