27 #ifndef __GyotoScenery_H_ 28 #define __GyotoScenery_H_ 45 #include <boost/mpi/environment.hpp> 46 #include <boost/mpi/communicator.hpp> 264 enum
mpi_tag {give_task, read_scenery, terminate,
265 raytrace, raytrace_done, ready,
266 impactcoords, noimpactcoords};
336 double delta()
const ;
337 double delta(
const std::string &unit)
const ;
339 void delta(
double,
const std::string &unit);
341 void initCoord(std::vector<double> c);
342 std::vector<double> initCoord()
const;
377 double tMin()
const ;
379 double tMin(
const std::string &unit)
const ;
383 void tMin(
double,
const std::string &unit);
508 #ifdef GYOTO_SWIGIMPORTED
514 double * impactcoords=NULL);
525 double * impactcoords = NULL,
Photon * ph = NULL);
538 #ifdef GYOTO_USE_XERCES #define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
void rayTrace(Screen::Coord2dSet &ij, Astrobj::Properties *data, double *impactcoords=NULL)
Perform ray-tracing.
void fillElement(FactoryMessenger *fmp) const
Fill the XML element for this Object.
void mpiSpawn(int nbchildren)
Spawn gyoto-mpi-worker processes.
Astronomical objects (light emitters)
double tMin() const
Get ph_.tmin_.
std::string integrator() const
Passed to ph_.
bool parallelTransport() const
Get ph_.parallel_transport_.
double absTol() const
Passed to ph_.
A null geodesic transporting light.
Definition: GyotoPhoton.h:52
Ray-tracing scene.
Definition: GyotoScenery.h:162
Reference-counting pointers.
bool integ31() const
Get WorldlinIntegState integ_31_.
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
void updatePhoton()
Update values in cached Photon.
static SmartPointer< Scenery > Subcontractor(Gyoto::FactoryMessenger *)
Instanciate Scenery from an XML description.
size_t nthreads_
Number of parallel threads to use in rayTrace()
Definition: GyotoScenery.h:205
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:387
void binSpectrumConverter(std::string unit)
Set Scenery::binspectrum_converter_.
Gyoto::Photon ph_
Template Photon.
Definition: GyotoScenery.h:198
static void mpiWorker()
Become an MPI worker.
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
SmartPointer< Screen > screen() const
Get Scenery::screen_.
Gyoto::Quantity_t quantities_
Quantities to compute.
Definition: GyotoScenery.h:191
void mpiClone()
Send a copy of self to the mpi workers.
void mpiTask(mpi_tag &tag)
Send a tag to workers.
double relTol() const
Passed to ph_.
void operator()(size_t i, size_t j, Astrobj::Properties *data, double *impactcoords=NULL, Photon *ph=NULL)
Ray-trace a single pixel in Scenery::screen_.
double deltaMin() const
Passed to ph_.
void fillProperty(FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::SmartPointer< Gyoto::Units::Converter > binspectrum_converter_
See Astrobj::Properties::intensity_converter_.
Definition: GyotoScenery.h:215
Gyoto::SmartPointer< Gyoto::Units::Converter > intensity_converter_
See Astrobj::Properties::intensity_converter_.
Definition: GyotoScenery.h:211
double deltaMax() const
Passed to ph_.
Gyoto ubiquitous macros and typedefs.
Base class for metric description.
SmartPointer< Photon > clonePhoton() const
Get clone of template Photon.
int nprocesses_
Number of parallel processes to use in rayTrace()
Definition: GyotoScenery.h:207
Property that can be set and got using standard methods.
Definition: GyotoProperty.h:607
bool secondary() const
Get ph_.secondary_.
mpi_tag
Tags that may be sent to communicate with workers using MPI_Send()
Definition: GyotoScenery.h:264
size_t maxiter() const
Get ph_.maxiter_.
static bool am_worker
True in instance of gyoto-mpi-worker, otherwise false.
Definition: GyotoScenery.h:229
void mpiTerminate()
Terminate worker processes.
Gyoto::SmartPointer< Gyoto::Units::Converter > spectrum_converter_
See Astrobj::Properties::intensity_converter_.
Definition: GyotoScenery.h:213
void intensityConverter(std::string unit)
Set Scenery::intensity_converter_.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
double deltaMaxOverR() const
Passed to ph_.
double maxCrossEqplane() const
Passed to ph_.
unsigned int Quantity_t
Type for observabke quantities.
Definition: GyotoDefs.h:76
boost::mpi::communicator * mpi_team_
Team of processes for MPI.
Definition: GyotoScenery.h:226
std::string requestedQuantitiesString() const
Get a string representation of Scenery::quantities_.
SmartPointer< Metric::Generic > metric() const
Get ph_.Worldline::metric_.
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Can be pointed to by a SmartPointer.
Definition: GyotoSmartPointer.h:80
void setPropertyConverters(Gyoto::Astrobj::Properties *prop)
Copy converters to Astrobj::Properties instance.
size_t getScalarQuantitiesCount(Quantity_t *q=NULL) const
Get number of requested quantities of scalar nature.
Scenery()
Set everything to defaults.
size_t nThreads() const
Get nthreads_;.
Scenery * clone() const
Cloner.
Class to specify a set of points on the Screen.
Definition: GyotoScreen.h:682
Object with properties.
Definition: GyotoObject.h:151
Description of the observer screen.
size_t nProcesses() const
Get nprocesses_;.
double delta_
Definition: GyotoScenery.h:182
size_t getSpectralQuantitiesCount(Quantity_t *q=NULL) const
Get number of requested quantities of spectral nature.
void setRequestedQuantities(Quantity_t quant)
Set Scenery::quantities_.
SmartPointer< Screen > screen_
Definition: GyotoScenery.h:176
double delta() const
Get default step in geometrical units.
Quantity_t getRequestedQuantities() const
Get Scenery::quantities_.
bool adaptive() const
Get ph_.adaptive_.
void spectrumConverter(std::string unit)
Set Scenery::spectrum_converter_.
Observable properties of an Astronomical object.
Definition: GyotoAstrobj.h:654
SmartPointer< Astrobj::Generic > astrobj() const
Get ph_.obj_.