[Users] Enhancements to Multipole

Ian Hinder ian.hinder at aei.mpg.de
Thu Dec 9 02:43:04 CST 2010


Hi,

I have three patches to Multipole:

===

1.  Convert to C++ strings

2.  Use IO::out_dir parameter by sharing from implementation rather than via CCTK_ParameterGet

3.  Add HDF5 output support
    
    One HDF5 file per variable, and one extensible dataset per radius per mode.  HDF5 is required only optionally, so this thorn can be compiled without it

===

The advantage of the HDF5 output is that you get only one file per variable, instead of the hundreds that you get with the previous one file per variable per mode per radius format.  Instead of using ASCII output, which is unindexed and very inefficient to parse, HDF5 output is structured and a single dataset can be easily read.  Analysis tools such as Python and Mathematica support reading HDF5, and the h5dump or h5totxt utility (in the h5utils package) can be used to convert the file to text for any tool which can't read HDF5.

Two new parameters are introduced: output_ascii (defaults to yes), and output_hdf5 (defaults to no).

Example output (modes are the same for all t in this test case; columns are t, re(var), im(var)):

$ h5ls mp_harmonic.h5
l0_m0_r8.00              Dataset {11/Inf, 3}
l1_m-1_r8.00             Dataset {11/Inf, 3}
l1_m0_r8.00              Dataset {11/Inf, 3}
l1_m1_r8.00              Dataset {11/Inf, 3}
l2_m-1_r8.00             Dataset {11/Inf, 3}
l2_m-2_r8.00             Dataset {11/Inf, 3}
l2_m0_r8.00              Dataset {11/Inf, 3}
l2_m1_r8.00              Dataset {11/Inf, 3}
l2_m2_r8.00              Dataset {11/Inf, 3}

$ h5totxt -d l2_m2_r8.00 mp_harmonic.h5 
0,1.009144071427338,1.00100865293711e-06
1,1.009144071427338,1.00100865293711e-06
2,1.009144071427338,1.00100865293711e-06
3,1.009144071427338,1.00100865293711e-06
4,1.009144071427338,1.00100865293711e-06
5,1.009144071427338,1.00100865293711e-06
6,1.009144071427338,1.00100865293711e-06
7,1.009144071427338,1.00100865293711e-06
8,1.009144071427338,1.00100865293711e-06
9,1.009144071427338,1.00100865293711e-06
10,1.009144071427338,1.00100865293711e-06

$ h5dump -d l2_m2_r8.00 mp_harmonic.h5 
HDF5 "mp_harmonic.h5" {
DATASET "l2_m2_r8.00" {
   DATATYPE  H5T_IEEE_F64LE
   DATASPACE  SIMPLE { ( 11, 3 ) / ( H5S_UNLIMITED, 3 ) }
   DATA {
   (0,0): 0, 1.00914, 1.00101e-06,
   (1,0): 1, 1.00914, 1.00101e-06,
   (2,0): 2, 1.00914, 1.00101e-06,
   (3,0): 3, 1.00914, 1.00101e-06,
   (4,0): 4, 1.00914, 1.00101e-06,
   (5,0): 5, 1.00914, 1.00101e-06,
   (6,0): 6, 1.00914, 1.00101e-06,
   (7,0): 7, 1.00914, 1.00101e-06,
   (8,0): 8, 1.00914, 1.00101e-06,
   (9,0): 9, 1.00914, 1.00101e-06,
   (10,0): 10, 1.00914, 1.00101e-06
   }
}
}

Testsuites pass.  OK to commit?

PS: The optional capability support depends on a recent patch to the flesh which has not been applied yet.  I won't commit these three patches unless that patch is accepted and committed.

-- 
Ian Hinder
ian.hinder at aei.mpg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Convert-to-C-strings.patch
Type: application/octet-stream
Size: 10137 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20101209/f87b874a/attachment-0003.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Use-IO-out_dir-parameter-by-sharing-from-implementat.patch
Type: application/octet-stream
Size: 1316 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20101209/f87b874a/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-HDF5-output-support.patch
Type: application/octet-stream
Size: 8309 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20101209/f87b874a/attachment-0005.obj 


More information about the Users mailing list