[Debian-astro-commits] [gyoto] 29/221: MPI: support all the quantities except impactcoords
Thibaut Jean-Claude Paumard
thibaut at moszumanska.debian.org
Fri May 22 20:52:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
thibaut pushed a commit to branch master
in repository gyoto.
commit 405957cad35d8adc662b01862c0c90b8e364381e
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date: Fri Oct 10 17:21:38 2014 +0200
MPI: support all the quantities except impactcoords
---
lib/Scenery.C | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/lib/Scenery.C b/lib/Scenery.C
index 2050be3..ecacecf 100644
--- a/lib/Scenery.C
+++ b/lib/Scenery.C
@@ -356,15 +356,35 @@ void Scenery::rayTrace(size_t imin, size_t imax,
w = s.source();
- if (s.tag()==Scenery::raytrace_done) {
+ if (s.tag()==Scenery::raytrace_done && data) {
size_t cell=(ijr[2*w+1]-1)*npix+ijr[2*w]-1;
- if (data->intensity) {
- // Perform conversion here
+ // Copy each relevant quantity, performing conversion if needed
+ if (data->intensity)
data->intensity[cell]=data->intensity_converter_?
(*data->intensity_converter_)(*locdata->intensity):
*locdata->intensity;
- }
- //populate other quantities
+ if (data->time) data->time[cell]=*locdata->time;
+ if (data->distance) data->distance[cell]=*locdata->distance;
+ if (data->first_dmin) data->first_dmin[cell]=*locdata->first_dmin;
+ if (data->redshift) data->redshift[cell]=*locdata->redshift;
+ // deal with impactcoords
+ if (data->user1) data->user1[cell]=*locdata->user1;
+ if (data->user2) data->user2[cell]=*locdata->user2;
+ if (data->user3) data->user3[cell]=*locdata->user3;
+ if (data->user4) data->user4[cell]=*locdata->user4;
+ if (data->user5) data->user5[cell]=*locdata->user5;
+ if (data->spectrum)
+ for (size_t c=0; c<nbnuobs; ++c)
+ data->spectrum[cell+c*data->offset]=
+ data->spectrum_converter_?
+ (*data->spectrum_converter_)(locdata->spectrum[c]):
+ locdata->spectrum[c];
+ if (data->binspectrum)
+ for (size_t c=0; c<nbnuobs; ++c)
+ data->binspectrum[cell+c*data->offset]=
+ data->binspectrum_converter_?
+ (*data->binspectrum_converter_)(locdata->binspectrum[c]):
+ locdata->binspectrum[c];
}
// give new task or decrease working counter
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git
More information about the Debian-astro-commits
mailing list