[Commits] [svn:einsteintoolkit] Multipole/trunk/src/ (Rev. 60)
ian.hinder at aei.mpg.de
ian.hinder at aei.mpg.de
Mon Jun 14 03:06:04 CDT 2010
User: hinder
Date: 2010/06/14 03:06 AM
Modified:
/trunk/src/
multipole.cc
Log:
Fix 1D output filename in the case that the variable to be decomposed is real
File Changes:
Directory: /trunk/src/
======================
File [modified]: multipole.cc
Delta lines: +10 -7
===================================================================
--- trunk/src/multipole.cc 2010-06-14 06:14:12 UTC (rev 59)
+++ trunk/src/multipole.cc 2010-06-14 08:06:04 UTC (rev 60)
@@ -133,17 +133,20 @@
if (out_1d_every != 0 && (cctk_iteration) % out_1d_every == 0)
{
const char *real_name = CCTK_VarName(v->index);
- const char *imag_name = CCTK_VarName(v->imag_index);
-
sprintf(name_tmp, "mp_%s_r%1.2f.th.asc", real_name, rad);
Multipole_Output1D(CCTK_PASS_CTOC, name_tmp, array_size, th, ph, mp_theta, real);
- sprintf(name_tmp, "mp_%s_r%1.2f.th.asc", imag_name, rad);
- Multipole_Output1D(CCTK_PASS_CTOC, name_tmp, array_size, th, ph, mp_theta, imag);
-
sprintf(name_tmp, "mp_%s_r%1.2f.ph.asc", real_name, rad);
Multipole_Output1D(CCTK_PASS_CTOC, name_tmp, array_size, th, ph, mp_phi, real);
- sprintf(name_tmp, "mp_%s_r%1.2f.ph.asc", imag_name, rad);
- Multipole_Output1D(CCTK_PASS_CTOC, name_tmp, array_size, th, ph, mp_phi, imag);
+
+ if (v->imag_index != -1)
+ {
+ const char *imag_name = CCTK_VarName(v->imag_index);
+ sprintf(name_tmp, "mp_%s_r%1.2f.th.asc", imag_name, rad);
+ Multipole_Output1D(CCTK_PASS_CTOC, name_tmp, array_size, th, ph, mp_theta, imag);
+
+ sprintf(name_tmp, "mp_%s_r%1.2f.ph.asc", imag_name, rad);
+ Multipole_Output1D(CCTK_PASS_CTOC, name_tmp, array_size, th, ph, mp_phi, imag);
+ }
}
}
}
More information about the Commits
mailing list