xx SphericalHarmonicDecomp

SphericalHarmonicDecomp

Yosef Zlochower <yosef@astro.rit.edu>

November 12 2008

Abstract

This thorns provides a mechanism to decompose grid functions in terms of Spin Weighted spherical harmonics of arbitrary spin. This thorn will also decompose the ADM metric on spherical shells for use in a subsequent CCE null evolution.

1 Introduction

The idea behind this thorn was to decompose GFs on 2D spheres and 3D spherical shells in terms of spin-weighted spherical harmonics and Chebyshev or Legendre polynomials in radius. This was used for waveform extraction, compression of 3D data for visualization and CCE. The code uses more “collocation” points than spectral functions. The idea here was to try to smooth the data by using a least-squares fit to obtain the spectral coefficients. This thorn provides aliased functions to perform the decomposition. This will also dump the Cauchy metric.

2 Physical System 3 Numerical Implementation 4 Using This Thorn 4.1 Dumping Cauchy Data for CCE The following is a section of a parfile appended to an ordinary Cauchy evolution run (see the par/ directory for the complete parfile)

ActiveThorns="SphericalHarmonicDecomp"
SphericalHarmonicDecomp::extract_spacetime_metric_every=32
SphericalHarmonicDecomp::num_radii=3
SphericalHarmonicDecomp::EM_Rin[0]=18
SphericalHarmonicDecomp::EM_Rout[0]=22
SphericalHarmonicDecomp::EM_Rin[1]=47
SphericalHarmonicDecomp::EM_Rout[1]=53
SphericalHarmonicDecomp::EM_Rin[2]=94
SphericalHarmonicDecomp::EM_Rout[2]=106
SphericalHarmonicDecomp::num_l_modes=7
SphericalHarmonicDecomp::num_n_modes=7
SphericalHarmonicDecomp::num_mu_points=41
SphericalHarmonicDecomp::num_phi_points=82
SphericalHarmonicDecomp::num_x_points=28

In this example we will extract the metric on 3 different shells (numxradii), the first between r=18 and r=22, the second between r=47 and r=53, and the third between r=94 and 106. The idea here is to make the shell small enough that we can accurately calculate the radial derivatives of the metric function, while also large enough that we can smooth out the grid noise. We decompose the metric functions in terms of 7 modes (numxlxmodes=7 or all modes from to , the m modes are automatically set) and 7 radial modes (numxnxmode=7). The grid functions are evaluated at 41 points in mu (mu=cos(theta)), 82 points in phi, and 28 points in radius. Minimally, we would need the number of angular points to be equal to the number of angular spectral functions , in this case we have many more angular modes () than angular spectral functions. Similarly numxxxpoints must be greater than numxnxmodes. The number of n modes is set by the need to accurately model the radial derivative of the mertric functions in the spherical shell. The larger the difference between EMxRin[] and EMxRout[] the more points required. The number of l modes is determined by the accuracy requiremnts of the final CCE waveoform. in this case, choosin numxnxmodes=7 is marginally acceptable.

Note that the parameters

SphericalHarmonicDecomp::Rin
SphericalHarmonicDecomp::Rout

are not used for CCE metric extraction. These parameters affect the 3D decomposition of GFs using the

SphericalHarmonicDecompx3DxDecompose aliased function mechanism

4.2 Aliased functions

SphericalHarmonicDecomp provides a mechanism for other thorns to decompose GFs either on 2D surfaces or 3D shells via aliased functions. These two functions should be called in GLOBAL mode.

CCTK_INTxxSphericalHarmonicDecomp_3D_Decomposex(
xxxxxxxCCTK_POINTER_TO_CONSTx_GHp,
xxxxxxxCCTK_POINTER_TO_CONSTx_name,
xxxxxxxCCTK_INTxre_gindx,
xxxxxxxCCTK_INTxim_gindx,
xxxxxxxCCTK_INTxspinx)
e.g.
xxSphericalHarmonicDecomp_3D_Decompose(cctkGH,x"Psi4",
xxxxxxxCCTK_VarIndex("WeylScal4::Psi4r"),
xxxxxxxCCTK_VarIndex("WeylScal4::Psi4i"),x-2);
CCTK_INTxFUNCTIONxsYlm_DecomposeField(\
xxxxxxxxxxxxxxxCCTK_POINTER_TO_CONSTxINxcctkGH,\
xxxxxxxxxxxxxxxCCTK_POINTER_TO_CONSTxINxname,\
xxxxxxxxxxxxxxxCCTK_INTxINxre_gindx,\
xxxxxxxxxxxxxxxCCTK_INTxINxim_gindx,\
xxxxxxxxxxxxxxxCCTK_REALxINxradius,\
xxxxxxxxxxxxxxxCCTK_INTxINxspin)
e.g.
xxSphericalHarmonicDecomp_DecomposeField(cctkGH,x"Psi4",
xxxxxxxCCTK_VarIndex("WeylScal4::Psi4r"),
xxxxxxxCCTK_VarIndex("WeylScal4::Psi4i"),x50,x-2);

4.3 Parameters

SphericalHarmonicDecomp::extract_spacetime_metric_everyxhowxoften
xxxxxxxxxxxxxxx(inxiterations)xshouldxthexmetricxbexdecomposedxandxdumped.
SphericalHarmonicDecomp::out_dir=""xxOutputxdirectoryxforxallxoutput,
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxusuallyxsetxtox"",xwhichxcausesxthe
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxthornxtoxusexIO::out_dir
SphericalHarmonicDecomp::max_spin=2xxLargestxspinxvalue.xForxmostxconfiguration
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxthisxshouldxbexsetxtox2.
SphericalHarmonicDecomp::num_l_modesxHowxmanyxlxmodes.xThisxaffectsxall
xxxxxxxxxxxxxxxxxxxxxxxxxxxoutput.xNotexthisxisxnotxlmax-1xinxgeneral.
xxxxxxxxxxxxxxxxxxxxxxxxxxxForxspin-weightx2xGF,xlmaxxwillxbexnum_l_modes+2-1
SphericalHarmonicDecomp::num_mu_pointsxnumberxofxpointsxinxthexmux(cos(theta))
xxxxxxxxxxxxxxxxxxxxxxxxxxxdirection.xAffectsxallxoutput.
SphericalHarmonicDecomp::num_phi_pointsxnumberxofxpointsxinxphixdirection.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAffectsxallxoutput.
SphericalHarmonicDecomp::num_x_pointsxnumberxofxpointsxinxxx(radial)xdirection.
xxxxxxxxxxxxxxxxxxxxxxxAffectsxallx3DxoutputxincludingxMetricDecomp
SphericalHarmonicDecomp::Rinxinnerxradiusxofx3Dxshell.xOnlyxaffectsxfields
xxxxxxxxxxxxxxxxxxxxxxdumpedxusingxaliasedxfunctionxmechanism
SphericalHarmonicDecomp::Routxouterxradiusxofx3Dxshell.xOnlyxaffectsxfields
xxxxxxxxxxxxxxxxxxxxxxdumpedxusingxaliasedxfunctionxmechanism
SphericalHarmonicDecomp::EM_RinxanxarrayxofxRinsxusedxforxthexCCExMetric
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxextraction
SphericalHarmonicDecomp::EM_RoutxanxarrayxofxRoutsxusedxforxthexCCExMetric
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxextraction
SphericalHarmonicDecomp::output_m_maxxlimitxonxthexmaximumxabs(m)xdumpedxto
xxxxxxxxxxxxxxxxoutput.xThesexoptionsxarexusefulxifxyouxdon'txwantxto
xxxxxxxxxxxxxxxxdumpxallxthexmxmodesxfromx-lxtoxl.
SphericalHarmonicDecomp::output_l_maxxlimitxonxthexmaximumxlxdumpedxto
xxxxxxxxxxxxxxxxoutput.xThisxoptionxisxusefulxifxyouxwantxthexmaximum
xxxxxxxxxxxxxxxxlxdumpedxtoxoutputxtoxbexindependentxofxthexspinxofxthe
xxxxxxxxxxxxxxxxGF.

4.4 Obtaining This Thorn 4.5 Basic Usage 4.6 Special Behaviour 4.7 Interaction With Other Thorns 4.8 Examples 4.9 Support and Feedback 5 History 5.1 Thorn Source Code 5.2 Thorn Documentation 5.3 Acknowledgements References

6 Parameters

11actionxonxhdf5xerror 10Scope: privatex01 KEYWORD

11Description: What to do

11 Range 10 x01 Default: alert
11abort  10stop the run.
11alert  10only alert the user

11

11doxtest  10Scope: privatex01  BOOLEAN

11Description: to test or not to test

11                        10  x01  Default: no

11emxrin  10Scope: privatex01  REAL

11Description: inner radius for decomp

11 Range 10 x01 Default: 10.0
110:*  10positive

11

11emxrout  10Scope: privatex01  REAL

11Description: outer radius for decomp

11 Range 10 x01 Default: 100.0
11(0:*  10positive > Rin

11

11extractxspacetimexmetricxevery 10Scope: privatex01  INT

11Description:

11 Range 10 x01 Default: (none)
110:*  100 or positive. 0 means never

11

11maxxspin  10Scope: privatex01  INT

11Description: maximum absolute spin of fields

11 Range 10 x01 Default: 2
110:*  10positive only

11

11numxlxmodes  10Scope: privatex01  INT

11Description: number of l modes ... not lmax

11 Range 10 x01 Default: 7
111:*  101 or larger

11

11numxmuxpoints  10Scope: privatex01  INT

11Description: number of points in mu direction

11  Range  10  x01  Default: 15

111:*  10

11

11numxnxmodes  10Scope: privatex01  INT

11Description: number of n modes

11 Range 10 x01 Default: 15
111:*  10 1 or larger

11

11numxphixpoints  10Scope: privatex01  INT

11Description: number of points in phi directions

11  Range  10  x01  Default: 31

111:*  10

11

11numxradii  10Scope: privatex01  INT

11Description: number of radii

11  Range  10  x01  Default: 1

111:99  10

11

11numxxxpoints  10Scope: privatex01  INT

11Description: number of points in phi directions

11  Range  10  x01  Default: 31

111:*  10

11outxdir  10Scope: privatex01  STRING

11Description: output directory

11 Range 10 x01 Default: (none)
11ˆ$  10Empty stting -> use IO::outxdir
11.+  10directory name

11

11outputxlxmax  10Scope: privatex01  INT

11Description: don’t dump l modes larger than this

11 Range 10 x01 Default: 100
110:*  10positive, but if lxmax < —s— then no output generated

11

11outputxmxmax  10Scope: privatex01  INT

11Description: don’t dump m modes larger than this

11 Range 10 x01 Default: 100
110:*  10positive or zero

11

11rin  10Scope: privatex01  REAL

11Description: inner radius for decomp

11 Range 10 x01 Default: 10.0
110:*  10positive

11

11rout  10Scope: privatex01  REAL

11Description: outer radius for decomp

11 Range 10 x01 Default: 100.0
11(0:*  10positive > Rin

11

11syncxfilexeachxtime  10Scope: privatex01  BOOLEAN

11Description: not yet activated

11                        10  x01  Default: yes

11

11ioxoutxdir  10Scope: shared from IOx01STRING

11

7 Interfaces

General Implements: sphericalharmonicdecomp

Provides: sYlmxDecomposeField to sYlmxDecomposeFieldx3D to

8 Schedule This section lists all the variables which are assigned storage by thorn PITTNullCode/SphericalHarmonicDecomp. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage NONE

Scheduled Functions

CCTKxINITIAL (conditional) x sphericalharmonicdecompxtest x test x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function

11

CCTKxPOSTSTEP (conditional) x sphericalharmonicdecompxdumpmetric x extract and decompose spacetime metric x

11x11Language:11c
11 x 11Options: 11global
11 x 11Type: 11function