diff --git a/ChangeLog b/ChangeLog index b1914dfa..735143e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,89 @@ commit unknown Author: Thibaut Paumard -Date: Mon Oct 31 11:08:12 2016 +0100 +Date: Mon, 12 Dec 2016 13:49:58 +0100 + + Releasing 1.2.0 + +commit b3052c5f8663e4b6c49256b5041bcd67a91c2d85 +Author: Thibaut Paumard +Date: Mon Dec 12 12:57:47 2016 +0100 + + Add --version option to gyoto command-line tool + +commit 6ca591a2660e1293b559af6c1e86015d7be0bd48 +Author: Thibaut Paumard +Date: Mon Dec 12 10:45:37 2016 +0100 + + Support enroling MPI_COMM_WORLD in python/example-mpi.py + + Apply the same heuristics and algorithm as in bin/gyoto.C to support + mpirun starting the worker process itself. + +commit 87e8567f6c9bcd263a874bc1f11811556770c276 +Author: Thibaut Paumard +Date: Sun Dec 11 20:46:35 2016 +0100 + + Correctly handle empty stry case in OscilTorus::emittingArea() + +commit 09a179b9d5d070c949d0969221cc4efc0bdcc989 +Author: Thibaut Paumard +Date: Sun Dec 11 20:08:45 2016 +0100 + + Remove spurious cerr + +commit 63632ea68aee0e6ff3d2e58d13991ce2148ece06 +Author: Thibaut Paumard +Date: Sun Dec 11 19:33:11 2016 +0100 + + Implement thread-safety declaration + + Thread-unsafe classes declare themselves as such, so that NThreads is + ignored when multi-threading would cause erroneous results. + +commit b524fef7147c66ec16190b4c8f7e31adbaa1e64c +Author: Thibaut Paumard +Date: Sat Dec 10 20:44:57 2016 +0100 + + NumericalMetricalLorene is mature: not WIP anymore + + Stop inheriting from WIP + +commit 22d3e7f974b8f52dbe40b3776bdb2c90d7e9261c +Author: Thibaut Paumard +Date: Sat Dec 10 18:11:35 2016 +0100 Releasing 1.1.2 +commit 039f3b98a6ddfa3a99470f2a9b50b9bfcabc97e3 +Author: Thibaut Paumard +Date: Sat Dec 10 15:53:19 2016 +0100 + + Change subcontractor APIs to use a vector + + It is now possible to specify several plugins for loading an + object. Useful when a plug-in depends on another one. In XML: + + Plugins are loaded in order and looked into in reverse order + for the class. + +commit 78608e5a49a349166d15b570ffcec5c9a2754571 +Author: Thibaut Paumard +Date: Sat Dec 10 13:15:06 2016 +0100 + + Store plug-in name as given by user + + When plu-gin name is actually a file name, loadPlugin() determines the + actual plug-in name to find out the intilialization + function. Nevertherless we prefer to store the file name in that case + so users can load several versions of the same plug-in e.g. for + testing purposes. + +commit 5f35070ab4371ab0829de38585b635bd3d0cf51f +Author: Thibaut Paumard +Date: Sat Dec 10 12:34:15 2016 +0100 + + Merging branch master into track-plugin + commit b0413450c29b5a2fca5af1ac30c30954e23f4da8 Author: Thibaut Paumard Date: Fri Dec 9 19:18:24 2016 +0100 @@ -338,6 +418,18 @@ Date: Mon Oct 3 11:27:05 2016 +0200 framework. Allow using any two or three-dimensional image or stack of images in the `picture' and `panorama' painters. +commit 649d76dce7a90a15d55ec444a9d7b50f5868a6f8 +Author: Thibaut Paumard +Date: Wed Sep 28 12:21:32 2016 +0200 + + NEXT 2016/09/28 API + * New functionality: the plug-in from which each subcontractor is + registered is now tracked, so that it becomes possible to look + for a subcontractor matching a specific kind and plug-in. We + introduce the function Gyoto::requirePlugin() in addition to + Gyoto::loadPlugin(). The subcontractor signature is changed to + accept a second parameter, which breaks the API. + commit 22c8c78b2388b987ee5afca27706e2d54c4a3c0a Author: Thibaut Paumard Date: Thu Sep 15 22:22:29 2016 +0200 diff --git a/NEWS b/NEWS index ffaf8e51..9f2c18bd 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,14 @@ +1.2.0 2016/12/12 ABI 6:0:0 + * New functionality: the plug-in from which each subcontractor is + registered is now tracked, so that it becomes possible to look + for a subcontractor matching a specific kind and plug-in. We + introduce the function Gyoto::requirePlugin() in addition to + Gyoto::loadPlugin(). The subcontractor signature is changed to + accept a second parameter, which breaks the API. + * New functionality: thread-unsafe classes declare themselves as + such, so that NThreads is ignored when multi-threading would + cause erroneous results. + 1.1.2 2016/12/10 FTR * New Metrics in stdplug: ChernSimons, RezzollaZhidenko. * New Astrobjs in stdplug: DeformedTorus, DynamicalDiskBolometric, diff --git a/README.Developers b/README.Developers index d6c3ae67..cc2b516c 100644 --- a/README.Developers +++ b/README.Developers @@ -42,12 +42,13 @@ http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html Note that this VERSINFO has nothing to do with the Gyoto version. + run autoreconf. -* Edit NEWS + add a new entry (or change the one which has not been - released yet) + mark the release either "ABI n" if the ABI changed, - FTR for addition of features in an ABI-compatible way, "BUG" if its - a simple backwards-compatible bugfix release, PKG if only the - packaging has been changed. + document shortly what has changed in - Gyoto: new features, significant bug fixes... +* Edit NEWS + + add a new entry (or change the one which has not been released yet) + + mark the release either "ABI n" if the ABI changed, "BUG" if its a + simple backwards-compatible bugfix release, PKG if only the + packaging has been changed. + + document shortly what has changed in Gyoto: new features, + significant bug fixes... * Regenerate ChangeLog: + run "git log --no-merges > ChangeLog" diff --git a/TODO.md b/TODO.md index c64aea76..13264112 100644 --- a/TODO.md +++ b/TODO.md @@ -14,8 +14,7 @@ DynamicalDiskBolometric: Document and provide example EquatorialHotspot: Document and provide example InflateStar: Document and provide example OscilTorus: Document -NumericalMetricLorene: stop inheriting from WIP (ABI-breaking) ## libgyoto: -merge branch track-plugin (ABI-breaking) -implement thread-safety declaration (ABI-breaking) + +Scenery: Apply Object/Property paradigm diff --git a/bin/gyoto.C b/bin/gyoto.C index 24450b8b..7923d451 100644 --- a/bin/gyoto.C +++ b/bin/gyoto.C @@ -229,7 +229,7 @@ int main(int argc, char** argv) { // State copyright if (options[VERSION] ||(!options[LIST] && !options[HELP] && verbose() >= GYOTO_QUIET_VERBOSITY)) { - cout << " Copyright (c) 2011-2015 Frederic Vincent & Thibaut Paumard\n" + cout << " Copyright (c) 2011-2016 Frederic Vincent & Thibaut Paumard\n" << " GYOTO is distributed under the terms of the GPL v. 3 license.\n" << " We request that use of Gyoto in scientific publications be " << " properly \n acknowledged. Please cite:\n" diff --git a/configure b/configure index 294852be..083c9e15 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Gyoto 1.1.1. +# Generated by GNU Autoconf 2.69 for Gyoto 1.2.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Gyoto' PACKAGE_TARNAME='gyoto' -PACKAGE_VERSION='1.1.1' -PACKAGE_STRING='Gyoto 1.1.1' +PACKAGE_VERSION='1.2.0' +PACKAGE_STRING='Gyoto 1.2.0' PACKAGE_BUGREPORT='gyoto@sympa.obspm.fr' PACKAGE_URL='' @@ -1457,7 +1457,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Gyoto 1.1.1 to adapt to many kinds of systems. +\`configure' configures Gyoto 1.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1528,7 +1528,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Gyoto 1.1.1:";; + short | recursive ) echo "Configuration of Gyoto 1.2.0:";; esac cat <<\_ACEOF @@ -1723,7 +1723,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Gyoto configure 1.1.1 +Gyoto configure 1.2.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2422,7 +2422,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Gyoto $as_me 1.1.1, which was +It was created by Gyoto $as_me 1.2.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3398,7 +3398,7 @@ fi # Define the identity of the package. PACKAGE='gyoto' - VERSION='1.1.1' + VERSION='1.2.0' cat >>confdefs.h <<_ACEOF @@ -15655,8 +15655,8 @@ ac_config_headers="$ac_config_headers config.h include/GyotoConfig.h" # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # C: current; R: revision; A: age # Linux library name is: libgyoto.so.(C-A).A.R -VERSINFO_C=5 -VERSINFO_R=2 +VERSINFO_C=6 +VERSINFO_R=0 VERSINFO_A=0 VERSINFO=${VERSINFO_C}:${VERSINFO_R}:${VERSINFO_A} @@ -21319,7 +21319,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Gyoto $as_me 1.1.1, which was +This file was extended by Gyoto $as_me 1.2.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21385,7 +21385,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Gyoto config.status 1.1.1 +Gyoto config.status 1.2.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d0476297..50625fda 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ dnl without any warranty. AC_PREREQ([2.69]) -AC_INIT([Gyoto], [1.1.1], [gyoto@sympa.obspm.fr]) +AC_INIT([Gyoto], [1.2.0], [gyoto@sympa.obspm.fr]) gyoto_test_CXXFLAGS=${CXXFLAGS+set} gyoto_test_CPPFLAGS=${CPPFLAGS+set} AC_CANONICAL_SYSTEM @@ -26,8 +26,8 @@ AC_SUBST([VERBATIM], []) # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # C: current; R: revision; A: age # Linux library name is: libgyoto.so.(C-A).A.R -VERSINFO_C=5 -VERSINFO_R=2 +VERSINFO_C=6 +VERSINFO_R=0 VERSINFO_A=0 VERSINFO=${VERSINFO_C}:${VERSINFO_R}:${VERSINFO_A} AC_SUBST([VERSINFO]) diff --git a/doc/examples/example-fixedstar-rotstar3_1.xml b/doc/examples/example-fixedstar-rotstar3_1.xml index 0447dd61..2eba5680 100644 --- a/doc/examples/example-fixedstar-rotstar3_1.xml +++ b/doc/examples/example-fixedstar-rotstar3_1.xml @@ -8,8 +8,10 @@ prefixed with "`pwd`/" : `pwd`/.check-lorene/resu.d - 1 - + + SpecificIntegrator: 3+1D integration; + GenericIntegrator: 4D integration. + diff --git a/doc/examples/example-movingstar-rotstar3_1.xml b/doc/examples/example-movingstar-rotstar3_1.xml index 69fbda6d..1d8f996a 100644 --- a/doc/examples/example-movingstar-rotstar3_1.xml +++ b/doc/examples/example-movingstar-rotstar3_1.xml @@ -7,8 +7,10 @@ prefixed with "`pwd`/" : `pwd`/.check-lorene/resu.d - 1 - + + SpecificIntegrator: 3+1D integration; + GenericIntegrator: 4D integration. + diff --git a/doc/user_guide/GyotoManual.tex b/doc/user_guide/GyotoManual.tex index 5901588a..b3b7090c 100644 --- a/doc/user_guide/GyotoManual.tex +++ b/doc/user_guide/GyotoManual.tex @@ -60,7 +60,7 @@ \section*{\Huge{Quick User Guide for \texttt{GYOTO}}} % Let's enter the date manually. Need to update it at least for each % release. Use git log to find out the last change to the user manual. -\Large{Updated October 29, 2016} +\Large{Updated December 7, 2016} %\today \vspace{4cm} @@ -528,7 +528,7 @@ \subsubsection{Using} gyoto: \begin{code} import gyoto - gyoto.loadPlugin("stdplug") + gyoto.requirePlugin("stdplug") \end{code} Get help on Gyoto: \begin{code} @@ -551,7 +551,7 @@ \subsubsection{Using} for a specific Gyoto plug-in must be imported: \begin{code} import gyoto - gyoto.loadPlugin("stdplug") + gyoto.requirePlugin("stdplug") import gyoto_std st=gyoto_std.Star() \end{code} @@ -1000,16 +1000,21 @@ \subsection{Writing a C++ plug-in} A plug-in is merely a shared library which contains the object code for your new objects, plus a special initialisation function. It is loaded into memory using \texttt{dlopen()} by the function -\texttt{Gyoto::loadPlugin(char const*const name, int nofail)}, -implemented in \texttt{lib/Register.C}. The \texttt{name} argument -will be used twice: +\texttt{Gyoto::loadPlugin(char const*const name, int nofail)} (note +that the upper level function \texttt{Gyoto::requirePlugin(char + const*const name, int nofail)} should be used instead whenever +applicable), implemented in \texttt{lib/Register.C}. The \texttt{name} +argument will be used three times: \begin{itemize} \item the shared library file must be called \texttt{libgyoto-\emph{name}.\$suffix} (\texttt{\$suffix} is usually \texttt{.so} under Linux, \texttt{.dylib} under Mac OS); \item the init function for your plug-in must be called either \texttt{\_\_Gyoto\emph{name}Init} or exactly - \texttt{\_\_GyotoPluginInit}. + \texttt{\_\_GyotoPluginInit}; +\item each subcontractor registered by the init function (see below) + will be tagged with the plug-in name, so it is later possible to + search for a registered subcontractor by kind name and plugin name. \end{itemize} The role of the init function is to register subcontractors for your @@ -1029,7 +1034,8 @@ \subsection{Writing a C++ plug-in} Likewise, you could register more metrics, astrophysical objects and spectra. Other examples can be seen in the \texttt{lib/StdPlug.C} and -\texttt{lib/LorenePlug.C} files. +\texttt{lib/LorenePlug.C} files, and in the \texttt{plugins/python/} +directory. When building your plug-in, make sure \texttt{MyPlugin.C} ends up compiled with\\ \texttt{lib/Minkowski.C} (in this example) into a @@ -1229,7 +1235,7 @@ \subsection{Using your new plug-in} Finally, the Yorick interface (Sect.~\ref{sect:yorick}) has a function to explicitly load a \GYOTO\ plug-in at run-time: \begin{code} - > gyoto.loadPlugin("myplugin"); + > gyoto.requirePlugin("myplugin"); \end{code} Once the plug-in is loaded, your new object kinds should be registered (that's the purpose of the init function). To check that your objects @@ -1251,8 +1257,7 @@ \subsection{Using your new plug-in} The Yorick interface can load any object from an XML description, an can also initialise any object from its name: \begin{code} - > gyoto.loadPlugin("myplugin"); - > metric = gyoto.Metric("Minkowski"); + > metric = gyoto.Metric("Minkowski", "myplugin"); \end{code} If your object supports any options using the \texttt{setParameter()} method, these options can also be set from within Yorick: diff --git a/include/GyotoAstrobj.h b/include/GyotoAstrobj.h index eb666b64..9fe7a8a8 100644 --- a/include/GyotoAstrobj.h +++ b/include/GyotoAstrobj.h @@ -59,7 +59,7 @@ namespace Gyoto{ * provided so that you may not have to code anything. */ typedef SmartPointer - Subcontractor_t(Gyoto::FactoryMessenger*); + Subcontractor_t(Gyoto::FactoryMessenger*, std::vector const &); ///< A function to build instances of a specific Astrobj::Generic sub-class /** @@ -73,8 +73,9 @@ namespace Gyoto{ * \tparam T Gyoto::Astrobj::Generic sub-class */ template SmartPointer Subcontractor - (FactoryMessenger* fmp) { + (FactoryMessenger* fmp, std::vector const &plugin) { SmartPointer ao = new T(); + ao -> plugins(plugin) ; #ifdef GYOTO_USE_XERCES if (fmp) ao -> setParameters(fmp); #endif @@ -82,19 +83,26 @@ namespace Gyoto{ } ///< A template for Subcontractor_t functions + /// Query the Astrobj register /** * Query the Astrobj register to get the Astrobj::Subcontractor_t - * correspondig to a given kind name. This function is normally - * called only from the Factory. + * corresponding to a given kind name. This function is normally + * called only from the Factory. If plugin is specified, only a + * subcontractor matching both name and plugin will be returned, + * loading the plug-in if necessary. If plugin is the empty + * string, then the first subcontractor matching name will be + * returned, and the name of the plug-in it belongs to will be + * returned in plugin upon output. * - * \param name e.g. "Star" - * \param errmode 1 to return NULL in case of failure instead of + * \param[in] name e.g. "Star" + * \param[inout] plugin e.g. "stdplug". + * \param[in] errmode 1 to return NULL in case of failure instead of * throwing an Error. * \return pointer to the corresponding subcontractor. */ Gyoto::Astrobj::Subcontractor_t* getSubcontractor(std::string name, + std::vector &plugin, int errmode = 0); - ///< Query the Astrobj register /** * Use the Astrobj::initRegister() once in your program to diff --git a/include/GyotoComplexAstrobj.h b/include/GyotoComplexAstrobj.h index e770442d..6a460f33 100644 --- a/include/GyotoComplexAstrobj.h +++ b/include/GyotoComplexAstrobj.h @@ -6,7 +6,7 @@ */ /* - Copyright 2011 Thibaut Paumard, Frederic Vincent + Copyright 2011, 2013-2014, 2016 Thibaut Paumard This file is part of Gyoto. @@ -93,6 +93,7 @@ class Gyoto::Astrobj::Complex : public Gyoto::Astrobj::Generic { double step_max_; ///< Maximum δ step inside the Astrobj public: + GYOTO_OBJECT_THREAD_SAFETY; Complex(); ///< Default constructor. Complex(const Complex& ) ; ///< Copy constructor. virtual Complex* clone() const; ///< "Virtual" copy constructor diff --git a/include/GyotoComplexSpectrometer.h b/include/GyotoComplexSpectrometer.h index 0049299d..8e7680cb 100644 --- a/include/GyotoComplexSpectrometer.h +++ b/include/GyotoComplexSpectrometer.h @@ -6,7 +6,7 @@ */ /* - Copyright 2013 Thibaut Paumard, Frederic Vincent + Copyright 2013-2014, 2016 Thibaut Paumard This file is part of Gyoto. @@ -87,6 +87,7 @@ class Gyoto::Spectrometer::Complex public: + GYOTO_OBJECT_THREAD_SAFETY; Complex(); ///< Default constructor. Complex(const Complex& ) ; ///< Copy constructor. diff --git a/include/GyotoDynamicalDisk3D.h b/include/GyotoDynamicalDisk3D.h index a781fde9..dd795928 100644 --- a/include/GyotoDynamicalDisk3D.h +++ b/include/GyotoDynamicalDisk3D.h @@ -7,7 +7,7 @@ */ /* - Copyright 2011-2015 Frederic Vincent, Thibaut Paumard + Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -96,6 +96,7 @@ class Gyoto::Astrobj::DynamicalDisk3D : public Astrobj::Disk3D { // ------------------------- public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; DynamicalDisk3D(); ///< Standard constructor diff --git a/include/GyotoMetric.h b/include/GyotoMetric.h index c64e14b9..0896a6a6 100644 --- a/include/GyotoMetric.h +++ b/include/GyotoMetric.h @@ -55,7 +55,7 @@ namespace Gyoto { * Factory and Subcontractor_t function communicate through a * Gyoto::FactoryMessenger. */ - typedef SmartPointer Subcontractor_t(FactoryMessenger*); + typedef SmartPointer Subcontractor_t(FactoryMessenger*, std::vector const &); /** @@ -67,8 +67,9 @@ namespace Gyoto { * \tparam T Sub-class of Metric::Generic */ template SmartPointer Subcontractor - (FactoryMessenger* fmp) { + (FactoryMessenger* fmp, std::vector const &plugins) { SmartPointer gg = new T(); + gg -> plugins(plugins); #ifdef GYOTO_USE_XERCES if (fmp) gg -> setParameters(fmp); #endif @@ -79,15 +80,22 @@ namespace Gyoto { /** * Query the Metric register to get the Metric::Subcontractor_t * correspondig to a given kind name. This function is normally - * called only from the Factory. + * called only from the Factory. If plugin is specified, only a + * subcontractor matching both name and plugin will be returned, + * loading the plug-in if necessary. If plugin is the empty + * string, then the first subcontractor matching name will be + * returned, and the name of the plug-in it belongs to will be + * returned in plugin upon output. * - * \param name e.g. "KerrBL" - * \param errmode int=0. If errmode==0, failure to find a + * \param[in] name e.g. "KerrBL" + * \param[inout] plugin e.g. "stdplug". + * \param[in] errmode int=0. If errmode==0, failure to find a * registered Metric by that name is an error. Else, simply * return NULL pointer in that case. * \return pointer to the corresponding subcontractor. */ Gyoto::Metric::Subcontractor_t* getSubcontractor(std::string name, + std::vector &plugin, int errmode=0); /// The Metric register diff --git a/include/GyotoNumericalMetricLorene.h b/include/GyotoNumericalMetricLorene.h index 42148c3b..665c2528 100644 --- a/include/GyotoNumericalMetricLorene.h +++ b/include/GyotoNumericalMetricLorene.h @@ -6,7 +6,7 @@ */ /* - * Copyright (c) 2012-2015 Frederic Vincent, Thibaut Paumard + * Copyright (c) 2014-2016 Frederic Vincent, Thibaut Paumard * * */ @@ -33,7 +33,6 @@ namespace Lorene { #include #include #include -#include #ifdef GYOTO_USE_XERCES #include @@ -46,7 +45,7 @@ namespace Lorene { * stars, collapsing stars, Kerr, boson star e.g. */ class Gyoto::Metric::NumericalMetricLorene -: public WIP, public Gyoto::Metric::Generic +: public Gyoto::Metric::Generic { friend class Gyoto::SmartPointer; @@ -80,6 +79,7 @@ class Gyoto::Metric::NumericalMetricLorene public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; NumericalMetricLorene(); ///< Constructor NumericalMetricLorene(const NumericalMetricLorene&); ///< Copy constructor virtual NumericalMetricLorene* clone() const ; diff --git a/include/GyotoObject.h b/include/GyotoObject.h index 133ad7a9..f7473972 100644 --- a/include/GyotoObject.h +++ b/include/GyotoObject.h @@ -4,7 +4,7 @@ */ /* - Copyright 2014-2015 Thibaut Paumard + Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. @@ -27,6 +27,7 @@ #define __GyotoObject_H_ #include "GyotoConfig.h" +#include "GyotoSmartPointer.h" #include #include @@ -81,8 +82,22 @@ namespace Gyoto { * a compile-time error. */ #define GYOTO_OBJECT \ - static Property const properties[]; \ - virtual Property const * getProperties() const + static Property const properties[]; \ + virtual Property const * getProperties() const; \ + static const std::string builtinPluginValue; \ + virtual void plugins(std::vector const & plugname); \ + virtual std::vector plugins() const + +/// Declare virtual bool isThreadSafe() const +/** + * Use this to declare that the object is not (or not always) thread + * safe. The corresponding definition of isThreadSafe() must exist. If + * the object is always thread unsafe (e.g. Lorene Metrics of Python + * based objects), you can simply use GYOTO_PROPERTY_THREAD_SAFETY in + * the corresponding .C file. + */ +#define GYOTO_OBJECT_THREAD_SAFETY \ + virtual bool isThreadSafe() const /// Object with properties /** @@ -140,12 +155,48 @@ class Gyoto::Object /** * E.g. for an Astrobj, fillElement() will ensure * \code - * ... + * ... * \endcode * is written. */ std::string kind_; + + /// The plug-ins that needs to be loaded to access this instance's class + /** + * E.g. for an Astrobj, fillElement() will ensure + * \code + * ... + * \endcode + * is written. + */ + std::vector plugins_; + public: + /// Whether this class is thread-safe + /** + * Return True if this object is thread-safe, i.e. if an instance + * and its clone can be used in parallel threads (in the context of + * Scenery::raytrace()). Known objects which are not thread-safe + * include Lorene metrics and everything from the Python plug-in. + * + * The default implementation considers that the class itself is + * thread safe and recurses into the declared properties to check + * whether they are safe too. Classes that abide to the + * Object/Property paradigm and are themselves thread-safe have + * nothing special to do. + * + * Objects that clone children in their copy constructor that are + * not declared as properties must take these children into + * account. + * + * Classes that are never thread-safe must declare it. It acn be + * easily done using GYOTO_OBJECT_THREAD_SAFETY in the class + * declaration and GYOTO_PROPERTY_THREAD_UNSAFE in the class + * definition. + */ + virtual bool isThreadSafe() const; + + GYOTO_OBJECT; /** \fn virtual Property const * Object::getProperties() const * \brief Get list of properties diff --git a/include/GyotoPageThorneDisk.h b/include/GyotoPageThorneDisk.h index 7fef93e3..6f3d4279 100644 --- a/include/GyotoPageThorneDisk.h +++ b/include/GyotoPageThorneDisk.h @@ -12,7 +12,7 @@ */ /* - Copyright 2011-2015 Frederic Vincent, Thibaut Paumard + Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -83,6 +83,7 @@ class Gyoto::Astrobj::PageThorneDisk // ------------------------- public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; PageThorneDisk(); ///< Standard constructor diff --git a/include/GyotoPatternDiskBB.h b/include/GyotoPatternDiskBB.h index 738d5182..1cc0aa71 100644 --- a/include/GyotoPatternDiskBB.h +++ b/include/GyotoPatternDiskBB.h @@ -7,7 +7,7 @@ */ /* - Copyright 2011-2015 Frederic Vincent, Thibaut Paumard + Copyright 2012-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -70,6 +70,7 @@ class Gyoto::Astrobj::PatternDiskBB : public Astrobj::PatternDisk { // ------------------------- public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; PatternDiskBB(); ///< Standard constructor diff --git a/include/GyotoPhoton.h b/include/GyotoPhoton.h index 311e1cc0..5565e310 100644 --- a/include/GyotoPhoton.h +++ b/include/GyotoPhoton.h @@ -7,7 +7,7 @@ */ /* - Copyright 2011, 2015 Frederic Vincent, Thibaut Paumard + Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -96,6 +96,7 @@ class Gyoto::Photon public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; GYOTO_WORLDLINE; virtual std::string className() const ; ///< "Photon" virtual std::string className_l() const ; ///< "photon" diff --git a/include/GyotoPolishDoughnut.h b/include/GyotoPolishDoughnut.h index 96f72116..e16a5597 100644 --- a/include/GyotoPolishDoughnut.h +++ b/include/GyotoPolishDoughnut.h @@ -105,6 +105,7 @@ class Gyoto::Astrobj::PolishDoughnut // ------------------------- public: GYOTO_OBJECT; // This object has Properties + GYOTO_OBJECT_THREAD_SAFETY; #ifdef GYOTO_USE_XERCES // We need to filter some properties when writing XML void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const; diff --git a/include/GyotoProperty.h b/include/GyotoProperty.h index fb90a39a..82842b1e 100644 --- a/include/GyotoProperty.h +++ b/include/GyotoProperty.h @@ -4,7 +4,7 @@ */ /* - Copyright 2014 Thibaut Paumard + Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. @@ -30,6 +30,10 @@ #include #include +#ifndef GYOTO_PLUGIN +#define GYOTO_PLUGIN +#endif + namespace Gyoto { class Object; class Property; @@ -41,6 +45,12 @@ namespace Gyoto { template class SmartPointer; } +/// Define the class as not beeing thread-safe +/** + * See also GYOTO_OBJECT_THREAD_SAFETY + */ +#define GYOTO_PROPERTY_THREAD_UNSAFE(class) \ + bool class::isThreadSafe() const {return false;} /// Define a pair of accessors to scalar member (double, long, size_t) /** @@ -483,10 +493,22 @@ namespace Gyoto { ) /// Define class::properties and class::getProperties() -#define GYOTO_PROPERTY_END(class, next) \ +#define GYOTO_PROPERTY_END(class, next) \ Property(next)}; \ Gyoto::Property const * class::getProperties() const { \ return class::properties; \ + } \ + const std::string class::builtinPluginValue ( GYOTO_STRINGIFY(GYOTO_PLUGIN) ); \ + std::vector class::plugins() const { \ + if (plugins_.size() == 0) { \ + std::vector p; \ + p.push_back(class::builtinPluginValue); \ + return p; \ + } \ + return plugins_; \ + } \ + void class::plugins(std::vector const & plugname) { \ + plugins_=plugname; \ } /// Property that can be set and got using standard methods diff --git a/include/GyotoRegister.h b/include/GyotoRegister.h index 5c5cbe2f..daeaa2eb 100644 --- a/include/GyotoRegister.h +++ b/include/GyotoRegister.h @@ -81,6 +81,8 @@ namespace Gyoto { * an Gyoto::Error. */ void loadPlugin( char const * const plugname, int nofail = 0); + bool havePlugin(std::string plugname); + void requirePlugin(std::string plugname, int nofail = 0); } /** @@ -101,6 +103,8 @@ class Gyoto::Register::Entry { ///< Pointer to the Gyoto::SmartPointee::Subcontractor_t function that produces an object of this kind Register::Entry* next_; ///< Next entry in the register, or NULL + const std::string plugin_; + ///< Plug-in from which this Entry was loaded public: /** * \brief Constructor @@ -114,15 +118,49 @@ class Gyoto::Register::Entry { * \brief Get subcontractor for a given name * * Search through the register for an Entry matching name and return - * the corresponding subcontractor. + * the corresponding subcontractor. If plugin is specified, only a + * subcontractor matching both name and plugin will be returned. + * Note that Gyoto::Entry::getSubcontractor() will not load the + * plug-in for you, contrary to + * e.g. Gyoto::Metric::getSubcontractor(). If plugin is the empty + * string, then the first subcontractor matching name will be + * returned, and the name of the plug-in it belongs to will be + * returned in plugin upon output. * - * \param name Name of the kind to look for. - * \param errmode 1 if getSubContractor() should return NULL upon + * \param[in] name Name of the kind to look for. + * \param[inout] plugin e.g. "stdplug". + * \param[in] errmode 1 if getSubContractor() should return NULL upon * failure. Else a Gyoto::Error is thrown. * \return Pointer to subcontractor function. */ Gyoto::SmartPointee::Subcontractor_t* - getSubcontractor(std::string name, int errmode=0); + getSubcontractor(std::string name, std::string &plugin, int errmode=0); + }; +#define GYOTO_GETSUBCONTRACTOR(space) \ + Gyoto::space::Subcontractor_t* \ + Gyoto::space::getSubcontractor(std::string name, std::vector &plugin, int errmode) { \ + for (size_t i=0; i getSubcontractor(name, plg, errmode); \ + plugin.push_back(plg); \ + } \ + for (size_t i=plugin.size()-1; i>=0 && sctr == NULL; --i) { \ + sctr= \ + (Subcontractor_t*)Gyoto::space::Register_ \ + -> getSubcontractor(name, plugin[i], 1); \ + } \ + if (!errmode && !sctr) throwError ("Kind not found in the specified plug-ins: "+name); \ + return sctr; \ +} + #endif diff --git a/include/GyotoRotStar3_1.h b/include/GyotoRotStar3_1.h index 613374ac..7ab4fd5f 100644 --- a/include/GyotoRotStar3_1.h +++ b/include/GyotoRotStar3_1.h @@ -6,7 +6,7 @@ */ /* - Copyright 2011 Frederic Vincent + Copyright 2011-2014, 2016 Frederic Vincent & Thibaut Paumard This file is part of Gyoto. @@ -61,6 +61,7 @@ class Gyoto::Metric::RotStar3_1 : public Gyoto::Metric::Generic { public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; RotStar3_1(); ///< Constructor RotStar3_1(const RotStar3_1& ) ; ///< Copy constructor virtual ~RotStar3_1() ; ///< Destructor diff --git a/include/GyotoScenery.h b/include/GyotoScenery.h index 3d682c0f..4858eb49 100644 --- a/include/GyotoScenery.h +++ b/include/GyotoScenery.h @@ -216,6 +216,7 @@ class Gyoto::Scenery # endif public: + GYOTO_OBJECT_THREAD_SAFETY; # ifdef HAVE_MPI /// Team of processes for MPI /** diff --git a/include/GyotoScreen.h b/include/GyotoScreen.h index 9d529a37..0f29e825 100644 --- a/include/GyotoScreen.h +++ b/include/GyotoScreen.h @@ -5,7 +5,7 @@ */ /* - Copyright 2011-2015 Thibaut Paumard, Frederic Vincent + Copyright 2011-2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. @@ -235,6 +235,7 @@ class Gyoto::Screen public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; // Constructors - Destructor // ------------------------- diff --git a/include/GyotoSmartPointer.h b/include/GyotoSmartPointer.h index 85ed1a85..479543b6 100644 --- a/include/GyotoSmartPointer.h +++ b/include/GyotoSmartPointer.h @@ -54,6 +54,8 @@ namespace Gyoto { #include #include #include +#include +#include /** * \brief Can be pointed to by a SmartPointer @@ -109,7 +111,7 @@ class Gyoto::SmartPointee * Metric::Register(), Spectrum::Register(). */ typedef Gyoto::SmartPointer - Subcontractor_t(Gyoto::FactoryMessenger*); + Subcontractor_t(Gyoto::FactoryMessenger*, std::vector const &); ///< A subcontractor builds an object upon order from the Factory }; diff --git a/include/GyotoSpectrometer.h b/include/GyotoSpectrometer.h index f4152ee9..cd315569 100644 --- a/include/GyotoSpectrometer.h +++ b/include/GyotoSpectrometer.h @@ -93,7 +93,7 @@ namespace Gyoto{ * communicate through a Gyoto::FactoryMessenger. */ typedef SmartPointer - Subcontractor_t(Gyoto::FactoryMessenger*); + Subcontractor_t(Gyoto::FactoryMessenger*, std::vector const &); ///< A function to build instances of a specific Astrobj::Generic sub-class /** @@ -101,15 +101,24 @@ namespace Gyoto{ * * Get the Spectrometer::Subcontractor_t correspondig to a given * kind name. This function is normally called only from the - * Gyoto::Factory. + * Gyoto::Factory. If plugin is specified, only a + * subcontractor matching both name and plugin will be returned, + * loading the plug-in if necessary. If plugin is the empty + * string, then the first subcontractor matching name will be + * returned, and the name of the plug-in it belongs to will be + * returned in plugin upon output. * - * \param name Name of the subclass to build, e.g. "Complex" or "wave". - * \param errmode If name is not registered, getSubcontractor() return NULL - * errmode==1, throws a Gyoto::Error if errmode==0. + * \param[in] name Name of the subclass to build, e.g. "Complex" + * or "wave". + * \param[inout] plugin e.g. "stdplug". + * \param errmode[in] If name is not registered, + * getSubcontractor() return NULL errmode==1, throws a + * Gyoto::Error if errmode==0. * \return pointer to the corresponding subcontractor. */ Gyoto::Spectrometer::Subcontractor_t* getSubcontractor(std::string name, - int errmode = 0); + std::vector &plugins, + int errmode = 0); /** * \brief A template for Subcontractor_t functions @@ -121,8 +130,9 @@ namespace Gyoto{ * \tparam T A Spectrometer::Generic sub-class. */ template SmartPointer Subcontractor - (FactoryMessenger* fmp) { + (FactoryMessenger* fmp, std::vector const &plugins) { SmartPointer spectro = new T(); + spectro -> plugins(plugins); #ifdef GYOTO_USE_XERCES if (fmp) spectro -> setParameters(fmp); #endif diff --git a/include/GyotoSpectrum.h b/include/GyotoSpectrum.h index 4c7444b8..a1b0fcc2 100644 --- a/include/GyotoSpectrum.h +++ b/include/GyotoSpectrum.h @@ -6,7 +6,7 @@ */ /* - Copyright 2011-2014, 2016 Thibaut Paumard + Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. @@ -49,7 +49,7 @@ namespace Gyoto{ * provided so that you may not have to code anything. */ typedef Gyoto::SmartPointer - Subcontractor_t(Gyoto::FactoryMessenger* fmp); + Subcontractor_t(Gyoto::FactoryMessenger* fmp, std::vector const &); /** * \brief Subcontractor template @@ -60,8 +60,9 @@ namespace Gyoto{ * \tparam T Sub-class of Spectrum::Generic */ template SmartPointer Subcontractor - (FactoryMessenger* fmp) { + (FactoryMessenger* fmp, std::vector const & plugins) { SmartPointer sp = new T(); + sp -> plugins(plugins) ; #ifdef GYOTO_USE_XERCES if (fmp) sp -> setParameters(fmp); #endif @@ -86,16 +87,23 @@ namespace Gyoto{ /** * Query the Spectrum register to get the Metric::Subcontractor_t * correspondig to a given kind name. This function is normally - * called only from the Factory. + * called only from the Factory. If plugin is specified, only a + * subcontractor matching both name and plugin will be returned, + * loading the plug-in if necessary. If plugin is the empty + * string, then the first subcontractor matching name will be + * returned, and the name of the plug-in it belongs to will be + * returned in plugin upon output. * - * \param name e.g. "PowerLaw" - * \param errmode int=0. If errmode==0, failure to find a + * \param[in] name e.g. "PowerLaw" + * \param[inout] plugin e.g. "stdplug". + * \param[in] errmode int=0. If errmode==0, failure to find a * registered Spectrum by that name is an error. Else, simply * return NULL pointer in that case. * \return pointer to the corresponding subcontractor. */ - Gyoto::Spectrum::Subcontractor_t* - getSubcontractor(std::string name, int errmode=0); + Gyoto::Spectrum::Subcontractor_t* getSubcontractor(std::string name, + std::vector &plugins, + int errmode=0); /// The Spectrum register /** diff --git a/include/GyotoThinDiskPL.h b/include/GyotoThinDiskPL.h index 1ea66d2b..df984d15 100644 --- a/include/GyotoThinDiskPL.h +++ b/include/GyotoThinDiskPL.h @@ -6,7 +6,7 @@ */ /* - Copyright 2012-2015 Frederic Vincent, Thibaut Paumard + Copyright 2012-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -65,6 +65,7 @@ class Gyoto::Astrobj::ThinDiskPL : public Astrobj::ThinDisk { // ------------------------- public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; ThinDiskPL(); ///< Standard constructor diff --git a/include/GyotoUtils.h b/include/GyotoUtils.h index 9f7791f2..0399f35c 100644 --- a/include/GyotoUtils.h +++ b/include/GyotoUtils.h @@ -6,7 +6,7 @@ */ /* - Copyright 2011 Thibaut Paumard + Copyright 2011, 2016 Thibaut Paumard This file is part of Gyoto. @@ -30,6 +30,7 @@ #include "GyotoDefs.h" #include +#include namespace Gyoto { /// Set debug mode @@ -99,6 +100,9 @@ namespace Gyoto { * \param[in] class_name e.g. "Gyoto::Screen", "Gyoto::Astrobj::Torus". */ void help(std::string class_name); + + /// Split string + std::vector split(std::string const &src, std::string const &delim); } #endif diff --git a/lib/Astrobj.C b/lib/Astrobj.C index 777d4046..68265b93 100644 --- a/lib/Astrobj.C +++ b/lib/Astrobj.C @@ -1,5 +1,5 @@ /* - Copyright 2011-2015 Frederic Vincent, Thibaut Paumard + Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -462,12 +462,7 @@ void Gyoto::Astrobj::Register(std::string name, Subcontractor_t* scp){ Gyoto::Astrobj::Register_ = ne; } -Gyoto::Astrobj::Subcontractor_t* -Astrobj::getSubcontractor(std::string name, int errmode) { - if (!Gyoto::Astrobj::Register_) throwError("No Astrobj kind registered!"); - return (Subcontractor_t*)Gyoto::Astrobj::Register_ - -> getSubcontractor(name, errmode); -} +GYOTO_GETSUBCONTRACTOR(Astrobj) Astrobj::Properties::Properties() : intensity(NULL), time(NULL), distance(NULL), diff --git a/lib/ComplexAstrobj.C b/lib/ComplexAstrobj.C index 1fa03db0..a183eaa8 100644 --- a/lib/ComplexAstrobj.C +++ b/lib/ComplexAstrobj.C @@ -1,5 +1,5 @@ /* - Copyright 2011 Thibaut Paumard, Frederic Vincent + Copyright 2011-2014, 2016 Thibaut Paumard This file is part of Gyoto. @@ -57,6 +57,12 @@ Complex::~Complex() if (cardinal_) for (size_t i=0; i< cardinal_; ++i) elements_[i] = NULL; } +bool Complex::isThreadSafe() const { + bool safe = Generic::isThreadSafe(); + for (size_t i=0; i < cardinal_; ++i) safe &= elements_[i] -> isThreadSafe(); + return safe; +} + void Complex::metric(SmartPointer gg) { Generic::metric(gg); @@ -186,6 +192,7 @@ void Complex::setParameters(FactoryMessenger *fmp) { cerr << "DEBUG: in Complex::setParameters()" << endl; string name="", content="", unit=""; + vector plugin; FactoryMessenger * child = NULL; metric( fmp->metric() ); @@ -195,8 +202,9 @@ void Complex::setParameters(FactoryMessenger *fmp) { cerr << "DEBUG: Astrobj::Complex::Subcontractor(): name=" << name << endl; if (name=="SubAstrobj") { content = fmp -> getAttribute("kind"); - child = fmp -> getChild(); - append ((*Astrobj::getSubcontractor(content))(child)); + plugin = split(fmp -> getAttribute("plugin"), ","); + child = fmp -> getChild(); + append ((*Astrobj::getSubcontractor(content, plugin))(child, plugin)); delete child; } else setParameter(name, content, unit); } diff --git a/lib/ComplexSpectrometer.C b/lib/ComplexSpectrometer.C index 7c2a4a73..5fc33f0c 100644 --- a/lib/ComplexSpectrometer.C +++ b/lib/ComplexSpectrometer.C @@ -1,5 +1,5 @@ /* - Copyright 2013 Thibaut Paumard, Frederic Vincent + Copyright 2013-2014, 2016 Thibaut Paumard This file is part of Gyoto. @@ -52,6 +52,11 @@ Complex::Complex(const Complex& o) : } Complex *Complex::clone() const {return new Complex(*this); } +bool Complex::isThreadSafe() const { + bool safe = Generic::isThreadSafe(); + for (size_t i=0; i < cardinal_; ++i) safe &= elements_[i] -> isThreadSafe(); + return safe; +} Complex::~Complex() { @@ -126,6 +131,7 @@ void Complex::setParameters(FactoryMessenger *fmp) { cerr << "DEBUG: in Complex::setParameters()" << endl; string name="", content="", unit=""; + std::vector plugin; FactoryMessenger * child = NULL; while (fmp->getNextParameter(&name, &content, &unit)) { @@ -133,8 +139,9 @@ void Complex::setParameters(FactoryMessenger *fmp) { cerr << "DEBUG: Spectrometer::Complex::Subcontractor(): name=" << name << endl; if (name=="SubSpectrometer") { content = fmp -> getAttribute("kind"); - child = fmp -> getChild(); - append ((*Spectrometer::getSubcontractor(content))(child)); + child = fmp -> getChild(); + plugin = split(fmp -> getAttribute("plugin"), ","); + append ((*Spectrometer::getSubcontractor(content, plugin))(child, plugin)); delete child; } else setParameter(name, content, unit); } diff --git a/lib/DynamicalDisk3D.C b/lib/DynamicalDisk3D.C index 145268f1..47d58386 100644 --- a/lib/DynamicalDisk3D.C +++ b/lib/DynamicalDisk3D.C @@ -1,5 +1,5 @@ /* - Copyright 2011-2015 Frederic Vincent, Thibaut Paumard + Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -124,6 +124,12 @@ DynamicalDisk3D::DynamicalDisk3D(const DynamicalDisk3D& o) : DynamicalDisk3D* DynamicalDisk3D::clone() const { return new DynamicalDisk3D(*this); } +bool DynamicalDisk3D::isThreadSafe() const { + // spectrumBB_ is not handled by a property. + return Disk3D::isThreadSafe() + && (!spectrumBB_ || spectrumBB_ -> isThreadSafe()); +} + DynamicalDisk3D::~DynamicalDisk3D() { GYOTO_DEBUG << "DynamicalDisk3D Destruction" << endl; delete [] emission_array_; diff --git a/lib/Factory.C b/lib/Factory.C index 22bce3e6..481d712f 100644 --- a/lib/Factory.C +++ b/lib/Factory.C @@ -270,13 +270,12 @@ SmartPointer Factory::metric() { delete result; } else MetricDOM = root_; - string Plugin = C(MetricDOM->getAttribute(X("plugin"))); - if (Plugin != "") loadPlugin(Plugin.c_str()); + vector Plugin = Gyoto::split(C(MetricDOM->getAttribute(X("plugin"))), ","); string Kind = C(MetricDOM->getAttribute(X("kind"))); FactoryMessenger fm(this, MetricDOM); - gg_= (*Metric::getSubcontractor(Kind))(&fm); + gg_= (*Metric::getSubcontractor(Kind, Plugin))(&fm, Plugin); } @@ -304,15 +303,14 @@ SmartPointer Factory::astrobj(){ tmpEl = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); delete result; } - string Plugin = C(tmpEl->getAttribute(X("plugin"))); - if (Plugin != "") loadPlugin(Plugin.c_str()); + vector Plugin = split(C(tmpEl->getAttribute(X("plugin"))), ","); string AstrobjKind = Cs(tmpEl->getAttribute(X("kind"))); GYOTO_DEBUG_EXPR(AstrobjKind); FactoryMessenger fm(this, tmpEl); - obj_ = (*Astrobj::getSubcontractor(AstrobjKind))(&fm); + obj_ = (*Astrobj::getSubcontractor(AstrobjKind, Plugin))(&fm, Plugin); } return obj_; @@ -365,14 +363,13 @@ SmartPointer Factory::spectrum(){ tmpEl = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); delete result; } - string Plugin = C(tmpEl->getAttribute(X("plugin"))); - if (Plugin != "") loadPlugin(Plugin.c_str()); + vector Plugin = split(C(tmpEl->getAttribute(X("plugin"))), ","); string Kind = Cs(tmpEl->getAttribute(X("kind"))); GYOTO_DEBUG_EXPR(Kind); FactoryMessenger fm(this, tmpEl); - return (*Spectrum::getSubcontractor(Kind))(&fm); + return (*Spectrum::getSubcontractor(Kind, Plugin))(&fm, Plugin); } @@ -395,14 +392,13 @@ SmartPointer Factory::spectrometer(){ tmpEl = static_cast< xercesc::DOMElement* >(result -> getNodeValue()); delete result; } - string Plugin = C(tmpEl->getAttribute(X("plugin"))); - if (Plugin != "") loadPlugin(Plugin.c_str()); + vector Plugin = split(C(tmpEl->getAttribute(X("plugin"))), ","); string Kind = Cs(tmpEl->getAttribute(X("kind"))); GYOTO_DEBUG_EXPR(Kind); FactoryMessenger fm(this, tmpEl); - return (*Spectrometer::getSubcontractor(Kind))(&fm); + return (*Spectrometer::getSubcontractor(Kind, Plugin))(&fm, Plugin); } diff --git a/lib/Makefile.am b/lib/Makefile.am index 40a5a297..104a5498 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -31,6 +31,7 @@ libgyoto@FEATURES@_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(VERSINFO) # STANDARD PLUGIN soverdir=$(pkglibdir)/@sovers@ sover_LTLIBRARIES = libgyoto-stdplug.la +libgyoto_stdplug_la_CPPFLAGS = $(AM_CPPFLAGS) -DGYOTO_PLUGIN=stdplug libgyoto_stdplug_la_SOURCES = KerrBL.C KerrKS.C Minkowski.C \ ChernSimons.C RezzollaZhidenko.C \ Star.C StarTrace.C FixedStar.C InflateStar.C \ @@ -59,7 +60,7 @@ sover_LTLIBRARIES += libgyoto-lorene.la endif libgyoto_lorene_la_SOURCES = RotStar3_1.C NumericalMetricLorene.C LorenePlug.C libgyoto_lorene_la_LDFLAGS = -module -export-dynamic $(LORENELDFLAGS) $(AM_LDFLAGS) -avoid-version -libgyoto_lorene_la_CPPFLAGS = $(AM_CPPFLAGS) $(LORENECPPFLAGS) +libgyoto_lorene_la_CPPFLAGS = $(AM_CPPFLAGS) $(LORENECPPFLAGS) -DGYOTO_PLUGIN=lorene # pkg-config file pkgconfigdir=$(libdir)/pkgconfig diff --git a/lib/Makefile.in b/lib/Makefile.in index 954aa65f..9d693ebc 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -158,17 +158,33 @@ libgyoto_lorene_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(LDFLAGS) -o $@ @HAVE_LORENE_TRUE@am_libgyoto_lorene_la_rpath = -rpath $(soverdir) libgyoto_stdplug_la_LIBADD = -am__objects_1 = PatternDisk.lo PatternDiskBB.lo DynamicalDisk.lo \ - DynamicalDiskBolometric.lo Disk3D.lo DynamicalDisk3D.lo \ - DirectionalDisk.lo -am_libgyoto_stdplug_la_OBJECTS = KerrBL.lo KerrKS.lo Minkowski.lo \ - ChernSimons.lo RezzollaZhidenko.lo Star.lo StarTrace.lo \ - FixedStar.lo InflateStar.lo Torus.lo OscilTorus.lo \ - PowerLawSpectrum.lo BlackBodySpectrum.lo \ - ThermalBremsstrahlungSpectrum.lo ComplexAstrobj.lo \ - UniformSphere.lo PageThorneDisk.lo ThinDiskPL.lo \ - PolishDoughnut.lo ThinDiskIronLine.lo DeformedTorus.lo \ - EquatorialHotSpot.lo StdPlug.lo $(am__objects_1) +am__objects_1 = libgyoto_stdplug_la-PatternDisk.lo \ + libgyoto_stdplug_la-PatternDiskBB.lo \ + libgyoto_stdplug_la-DynamicalDisk.lo \ + libgyoto_stdplug_la-DynamicalDiskBolometric.lo \ + libgyoto_stdplug_la-Disk3D.lo \ + libgyoto_stdplug_la-DynamicalDisk3D.lo \ + libgyoto_stdplug_la-DirectionalDisk.lo +am_libgyoto_stdplug_la_OBJECTS = libgyoto_stdplug_la-KerrBL.lo \ + libgyoto_stdplug_la-KerrKS.lo libgyoto_stdplug_la-Minkowski.lo \ + libgyoto_stdplug_la-ChernSimons.lo \ + libgyoto_stdplug_la-RezzollaZhidenko.lo \ + libgyoto_stdplug_la-Star.lo libgyoto_stdplug_la-StarTrace.lo \ + libgyoto_stdplug_la-FixedStar.lo \ + libgyoto_stdplug_la-InflateStar.lo \ + libgyoto_stdplug_la-Torus.lo libgyoto_stdplug_la-OscilTorus.lo \ + libgyoto_stdplug_la-PowerLawSpectrum.lo \ + libgyoto_stdplug_la-BlackBodySpectrum.lo \ + libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo \ + libgyoto_stdplug_la-ComplexAstrobj.lo \ + libgyoto_stdplug_la-UniformSphere.lo \ + libgyoto_stdplug_la-PageThorneDisk.lo \ + libgyoto_stdplug_la-ThinDiskPL.lo \ + libgyoto_stdplug_la-PolishDoughnut.lo \ + libgyoto_stdplug_la-ThinDiskIronLine.lo \ + libgyoto_stdplug_la-DeformedTorus.lo \ + libgyoto_stdplug_la-EquatorialHotSpot.lo \ + libgyoto_stdplug_la-StdPlug.lo $(am__objects_1) libgyoto_stdplug_la_OBJECTS = $(am_libgyoto_stdplug_la_OBJECTS) libgyoto_stdplug_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ @@ -474,6 +490,7 @@ libgyoto@FEATURES@_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(VERSINFO) # STANDARD PLUGIN soverdir = $(pkglibdir)/@sovers@ sover_LTLIBRARIES = libgyoto-stdplug.la $(am__append_3) +libgyoto_stdplug_la_CPPFLAGS = $(AM_CPPFLAGS) -DGYOTO_PLUGIN=stdplug libgyoto_stdplug_la_SOURCES = KerrBL.C KerrKS.C Minkowski.C \ ChernSimons.C RezzollaZhidenko.C Star.C StarTrace.C \ FixedStar.C InflateStar.C Torus.C OscilTorus.C \ @@ -492,7 +509,7 @@ EXTRA_libgyoto_stdplug_la_SOURCES = $(cfitsio_stdplug_sources) libgyoto_stdplug_la_LDFLAGS = -module -export-dynamic $(AM_LDFLAGS) -avoid-version libgyoto_lorene_la_SOURCES = RotStar3_1.C NumericalMetricLorene.C LorenePlug.C libgyoto_lorene_la_LDFLAGS = -module -export-dynamic $(LORENELDFLAGS) $(AM_LDFLAGS) -avoid-version -libgyoto_lorene_la_CPPFLAGS = $(AM_CPPFLAGS) $(LORENECPPFLAGS) +libgyoto_lorene_la_CPPFLAGS = $(AM_CPPFLAGS) $(LORENECPPFLAGS) -DGYOTO_PLUGIN=lorene # pkg-config file pkgconfigdir = $(libdir)/pkgconfig @@ -622,55 +639,25 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Astrobj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlackBodySpectrum.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChernSimons.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ComplexAstrobj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ComplexSpectrometer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Converters.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DeformedTorus.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DirectionalDisk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Disk3D.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DynamicalDisk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DynamicalDisk3D.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DynamicalDiskBolometric.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EquatorialHotSpot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Factory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FixedStar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Functors.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Hooks.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InflateStar.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/KerrBL.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/KerrKS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Metric.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Minkowski.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Object.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OscilTorus.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PageThorneDisk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PatternDisk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PatternDiskBB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Photon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PolishDoughnut.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PowerLawSpectrum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Property.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Register.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RezzollaZhidenko.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Scenery.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SmartPointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Spectrometer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Spectrum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StandardAstrobj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Star.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StarTrace.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StdPlug.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThermalBremsstrahlungSpectrum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThinDisk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThinDiskIronLine.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThinDiskPL.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Torus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UniformSpectrometer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UniformSphere.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WIP.Plo@am__quote@ @@ -679,6 +666,36 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_lorene_la-LorenePlug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_lorene_la-NumericalMetricLorene.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_lorene_la-RotStar3_1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-BlackBodySpectrum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ChernSimons.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ComplexAstrobj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DeformedTorus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DirectionalDisk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-Disk3D.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk3D.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-DynamicalDiskBolometric.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-EquatorialHotSpot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-FixedStar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-InflateStar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-KerrBL.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-KerrKS.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-Minkowski.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-OscilTorus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PageThorneDisk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PatternDisk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PatternDiskBB.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PolishDoughnut.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-PowerLawSpectrum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-RezzollaZhidenko.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-Star.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-StarTrace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-StdPlug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ThinDiskIronLine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-ThinDiskPL.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-Torus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgyoto_stdplug_la-UniformSphere.Plo@am__quote@ .C.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -722,6 +739,216 @@ libgyoto_lorene_la-LorenePlug.lo: LorenePlug.C @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_lorene_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_lorene_la-LorenePlug.lo `test -f 'LorenePlug.C' || echo '$(srcdir)/'`LorenePlug.C +libgyoto_stdplug_la-KerrBL.lo: KerrBL.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-KerrBL.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-KerrBL.Tpo -c -o libgyoto_stdplug_la-KerrBL.lo `test -f 'KerrBL.C' || echo '$(srcdir)/'`KerrBL.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-KerrBL.Tpo $(DEPDIR)/libgyoto_stdplug_la-KerrBL.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='KerrBL.C' object='libgyoto_stdplug_la-KerrBL.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-KerrBL.lo `test -f 'KerrBL.C' || echo '$(srcdir)/'`KerrBL.C + +libgyoto_stdplug_la-KerrKS.lo: KerrKS.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-KerrKS.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-KerrKS.Tpo -c -o libgyoto_stdplug_la-KerrKS.lo `test -f 'KerrKS.C' || echo '$(srcdir)/'`KerrKS.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-KerrKS.Tpo $(DEPDIR)/libgyoto_stdplug_la-KerrKS.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='KerrKS.C' object='libgyoto_stdplug_la-KerrKS.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-KerrKS.lo `test -f 'KerrKS.C' || echo '$(srcdir)/'`KerrKS.C + +libgyoto_stdplug_la-Minkowski.lo: Minkowski.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-Minkowski.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-Minkowski.Tpo -c -o libgyoto_stdplug_la-Minkowski.lo `test -f 'Minkowski.C' || echo '$(srcdir)/'`Minkowski.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-Minkowski.Tpo $(DEPDIR)/libgyoto_stdplug_la-Minkowski.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Minkowski.C' object='libgyoto_stdplug_la-Minkowski.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-Minkowski.lo `test -f 'Minkowski.C' || echo '$(srcdir)/'`Minkowski.C + +libgyoto_stdplug_la-ChernSimons.lo: ChernSimons.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ChernSimons.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ChernSimons.Tpo -c -o libgyoto_stdplug_la-ChernSimons.lo `test -f 'ChernSimons.C' || echo '$(srcdir)/'`ChernSimons.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ChernSimons.Tpo $(DEPDIR)/libgyoto_stdplug_la-ChernSimons.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ChernSimons.C' object='libgyoto_stdplug_la-ChernSimons.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ChernSimons.lo `test -f 'ChernSimons.C' || echo '$(srcdir)/'`ChernSimons.C + +libgyoto_stdplug_la-RezzollaZhidenko.lo: RezzollaZhidenko.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-RezzollaZhidenko.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-RezzollaZhidenko.Tpo -c -o libgyoto_stdplug_la-RezzollaZhidenko.lo `test -f 'RezzollaZhidenko.C' || echo '$(srcdir)/'`RezzollaZhidenko.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-RezzollaZhidenko.Tpo $(DEPDIR)/libgyoto_stdplug_la-RezzollaZhidenko.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='RezzollaZhidenko.C' object='libgyoto_stdplug_la-RezzollaZhidenko.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-RezzollaZhidenko.lo `test -f 'RezzollaZhidenko.C' || echo '$(srcdir)/'`RezzollaZhidenko.C + +libgyoto_stdplug_la-Star.lo: Star.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-Star.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-Star.Tpo -c -o libgyoto_stdplug_la-Star.lo `test -f 'Star.C' || echo '$(srcdir)/'`Star.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-Star.Tpo $(DEPDIR)/libgyoto_stdplug_la-Star.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Star.C' object='libgyoto_stdplug_la-Star.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-Star.lo `test -f 'Star.C' || echo '$(srcdir)/'`Star.C + +libgyoto_stdplug_la-StarTrace.lo: StarTrace.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-StarTrace.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-StarTrace.Tpo -c -o libgyoto_stdplug_la-StarTrace.lo `test -f 'StarTrace.C' || echo '$(srcdir)/'`StarTrace.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-StarTrace.Tpo $(DEPDIR)/libgyoto_stdplug_la-StarTrace.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='StarTrace.C' object='libgyoto_stdplug_la-StarTrace.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-StarTrace.lo `test -f 'StarTrace.C' || echo '$(srcdir)/'`StarTrace.C + +libgyoto_stdplug_la-FixedStar.lo: FixedStar.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-FixedStar.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-FixedStar.Tpo -c -o libgyoto_stdplug_la-FixedStar.lo `test -f 'FixedStar.C' || echo '$(srcdir)/'`FixedStar.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-FixedStar.Tpo $(DEPDIR)/libgyoto_stdplug_la-FixedStar.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='FixedStar.C' object='libgyoto_stdplug_la-FixedStar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-FixedStar.lo `test -f 'FixedStar.C' || echo '$(srcdir)/'`FixedStar.C + +libgyoto_stdplug_la-InflateStar.lo: InflateStar.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-InflateStar.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-InflateStar.Tpo -c -o libgyoto_stdplug_la-InflateStar.lo `test -f 'InflateStar.C' || echo '$(srcdir)/'`InflateStar.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-InflateStar.Tpo $(DEPDIR)/libgyoto_stdplug_la-InflateStar.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='InflateStar.C' object='libgyoto_stdplug_la-InflateStar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-InflateStar.lo `test -f 'InflateStar.C' || echo '$(srcdir)/'`InflateStar.C + +libgyoto_stdplug_la-Torus.lo: Torus.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-Torus.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-Torus.Tpo -c -o libgyoto_stdplug_la-Torus.lo `test -f 'Torus.C' || echo '$(srcdir)/'`Torus.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-Torus.Tpo $(DEPDIR)/libgyoto_stdplug_la-Torus.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Torus.C' object='libgyoto_stdplug_la-Torus.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-Torus.lo `test -f 'Torus.C' || echo '$(srcdir)/'`Torus.C + +libgyoto_stdplug_la-OscilTorus.lo: OscilTorus.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-OscilTorus.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-OscilTorus.Tpo -c -o libgyoto_stdplug_la-OscilTorus.lo `test -f 'OscilTorus.C' || echo '$(srcdir)/'`OscilTorus.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-OscilTorus.Tpo $(DEPDIR)/libgyoto_stdplug_la-OscilTorus.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='OscilTorus.C' object='libgyoto_stdplug_la-OscilTorus.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-OscilTorus.lo `test -f 'OscilTorus.C' || echo '$(srcdir)/'`OscilTorus.C + +libgyoto_stdplug_la-PowerLawSpectrum.lo: PowerLawSpectrum.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PowerLawSpectrum.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PowerLawSpectrum.Tpo -c -o libgyoto_stdplug_la-PowerLawSpectrum.lo `test -f 'PowerLawSpectrum.C' || echo '$(srcdir)/'`PowerLawSpectrum.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PowerLawSpectrum.Tpo $(DEPDIR)/libgyoto_stdplug_la-PowerLawSpectrum.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PowerLawSpectrum.C' object='libgyoto_stdplug_la-PowerLawSpectrum.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PowerLawSpectrum.lo `test -f 'PowerLawSpectrum.C' || echo '$(srcdir)/'`PowerLawSpectrum.C + +libgyoto_stdplug_la-BlackBodySpectrum.lo: BlackBodySpectrum.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-BlackBodySpectrum.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-BlackBodySpectrum.Tpo -c -o libgyoto_stdplug_la-BlackBodySpectrum.lo `test -f 'BlackBodySpectrum.C' || echo '$(srcdir)/'`BlackBodySpectrum.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-BlackBodySpectrum.Tpo $(DEPDIR)/libgyoto_stdplug_la-BlackBodySpectrum.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='BlackBodySpectrum.C' object='libgyoto_stdplug_la-BlackBodySpectrum.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-BlackBodySpectrum.lo `test -f 'BlackBodySpectrum.C' || echo '$(srcdir)/'`BlackBodySpectrum.C + +libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo: ThermalBremsstrahlungSpectrum.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.Tpo -c -o libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo `test -f 'ThermalBremsstrahlungSpectrum.C' || echo '$(srcdir)/'`ThermalBremsstrahlungSpectrum.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.Tpo $(DEPDIR)/libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ThermalBremsstrahlungSpectrum.C' object='libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ThermalBremsstrahlungSpectrum.lo `test -f 'ThermalBremsstrahlungSpectrum.C' || echo '$(srcdir)/'`ThermalBremsstrahlungSpectrum.C + +libgyoto_stdplug_la-ComplexAstrobj.lo: ComplexAstrobj.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ComplexAstrobj.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ComplexAstrobj.Tpo -c -o libgyoto_stdplug_la-ComplexAstrobj.lo `test -f 'ComplexAstrobj.C' || echo '$(srcdir)/'`ComplexAstrobj.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ComplexAstrobj.Tpo $(DEPDIR)/libgyoto_stdplug_la-ComplexAstrobj.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ComplexAstrobj.C' object='libgyoto_stdplug_la-ComplexAstrobj.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ComplexAstrobj.lo `test -f 'ComplexAstrobj.C' || echo '$(srcdir)/'`ComplexAstrobj.C + +libgyoto_stdplug_la-UniformSphere.lo: UniformSphere.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-UniformSphere.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-UniformSphere.Tpo -c -o libgyoto_stdplug_la-UniformSphere.lo `test -f 'UniformSphere.C' || echo '$(srcdir)/'`UniformSphere.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-UniformSphere.Tpo $(DEPDIR)/libgyoto_stdplug_la-UniformSphere.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='UniformSphere.C' object='libgyoto_stdplug_la-UniformSphere.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-UniformSphere.lo `test -f 'UniformSphere.C' || echo '$(srcdir)/'`UniformSphere.C + +libgyoto_stdplug_la-PageThorneDisk.lo: PageThorneDisk.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PageThorneDisk.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PageThorneDisk.Tpo -c -o libgyoto_stdplug_la-PageThorneDisk.lo `test -f 'PageThorneDisk.C' || echo '$(srcdir)/'`PageThorneDisk.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PageThorneDisk.Tpo $(DEPDIR)/libgyoto_stdplug_la-PageThorneDisk.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PageThorneDisk.C' object='libgyoto_stdplug_la-PageThorneDisk.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PageThorneDisk.lo `test -f 'PageThorneDisk.C' || echo '$(srcdir)/'`PageThorneDisk.C + +libgyoto_stdplug_la-ThinDiskPL.lo: ThinDiskPL.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ThinDiskPL.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ThinDiskPL.Tpo -c -o libgyoto_stdplug_la-ThinDiskPL.lo `test -f 'ThinDiskPL.C' || echo '$(srcdir)/'`ThinDiskPL.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ThinDiskPL.Tpo $(DEPDIR)/libgyoto_stdplug_la-ThinDiskPL.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ThinDiskPL.C' object='libgyoto_stdplug_la-ThinDiskPL.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ThinDiskPL.lo `test -f 'ThinDiskPL.C' || echo '$(srcdir)/'`ThinDiskPL.C + +libgyoto_stdplug_la-PolishDoughnut.lo: PolishDoughnut.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PolishDoughnut.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PolishDoughnut.Tpo -c -o libgyoto_stdplug_la-PolishDoughnut.lo `test -f 'PolishDoughnut.C' || echo '$(srcdir)/'`PolishDoughnut.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PolishDoughnut.Tpo $(DEPDIR)/libgyoto_stdplug_la-PolishDoughnut.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PolishDoughnut.C' object='libgyoto_stdplug_la-PolishDoughnut.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PolishDoughnut.lo `test -f 'PolishDoughnut.C' || echo '$(srcdir)/'`PolishDoughnut.C + +libgyoto_stdplug_la-ThinDiskIronLine.lo: ThinDiskIronLine.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-ThinDiskIronLine.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-ThinDiskIronLine.Tpo -c -o libgyoto_stdplug_la-ThinDiskIronLine.lo `test -f 'ThinDiskIronLine.C' || echo '$(srcdir)/'`ThinDiskIronLine.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-ThinDiskIronLine.Tpo $(DEPDIR)/libgyoto_stdplug_la-ThinDiskIronLine.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ThinDiskIronLine.C' object='libgyoto_stdplug_la-ThinDiskIronLine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-ThinDiskIronLine.lo `test -f 'ThinDiskIronLine.C' || echo '$(srcdir)/'`ThinDiskIronLine.C + +libgyoto_stdplug_la-DeformedTorus.lo: DeformedTorus.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DeformedTorus.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DeformedTorus.Tpo -c -o libgyoto_stdplug_la-DeformedTorus.lo `test -f 'DeformedTorus.C' || echo '$(srcdir)/'`DeformedTorus.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DeformedTorus.Tpo $(DEPDIR)/libgyoto_stdplug_la-DeformedTorus.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DeformedTorus.C' object='libgyoto_stdplug_la-DeformedTorus.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DeformedTorus.lo `test -f 'DeformedTorus.C' || echo '$(srcdir)/'`DeformedTorus.C + +libgyoto_stdplug_la-EquatorialHotSpot.lo: EquatorialHotSpot.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-EquatorialHotSpot.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-EquatorialHotSpot.Tpo -c -o libgyoto_stdplug_la-EquatorialHotSpot.lo `test -f 'EquatorialHotSpot.C' || echo '$(srcdir)/'`EquatorialHotSpot.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-EquatorialHotSpot.Tpo $(DEPDIR)/libgyoto_stdplug_la-EquatorialHotSpot.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='EquatorialHotSpot.C' object='libgyoto_stdplug_la-EquatorialHotSpot.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-EquatorialHotSpot.lo `test -f 'EquatorialHotSpot.C' || echo '$(srcdir)/'`EquatorialHotSpot.C + +libgyoto_stdplug_la-StdPlug.lo: StdPlug.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-StdPlug.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-StdPlug.Tpo -c -o libgyoto_stdplug_la-StdPlug.lo `test -f 'StdPlug.C' || echo '$(srcdir)/'`StdPlug.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-StdPlug.Tpo $(DEPDIR)/libgyoto_stdplug_la-StdPlug.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='StdPlug.C' object='libgyoto_stdplug_la-StdPlug.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-StdPlug.lo `test -f 'StdPlug.C' || echo '$(srcdir)/'`StdPlug.C + +libgyoto_stdplug_la-PatternDisk.lo: PatternDisk.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PatternDisk.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PatternDisk.Tpo -c -o libgyoto_stdplug_la-PatternDisk.lo `test -f 'PatternDisk.C' || echo '$(srcdir)/'`PatternDisk.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PatternDisk.Tpo $(DEPDIR)/libgyoto_stdplug_la-PatternDisk.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PatternDisk.C' object='libgyoto_stdplug_la-PatternDisk.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PatternDisk.lo `test -f 'PatternDisk.C' || echo '$(srcdir)/'`PatternDisk.C + +libgyoto_stdplug_la-PatternDiskBB.lo: PatternDiskBB.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-PatternDiskBB.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-PatternDiskBB.Tpo -c -o libgyoto_stdplug_la-PatternDiskBB.lo `test -f 'PatternDiskBB.C' || echo '$(srcdir)/'`PatternDiskBB.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-PatternDiskBB.Tpo $(DEPDIR)/libgyoto_stdplug_la-PatternDiskBB.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PatternDiskBB.C' object='libgyoto_stdplug_la-PatternDiskBB.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-PatternDiskBB.lo `test -f 'PatternDiskBB.C' || echo '$(srcdir)/'`PatternDiskBB.C + +libgyoto_stdplug_la-DynamicalDisk.lo: DynamicalDisk.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DynamicalDisk.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk.Tpo -c -o libgyoto_stdplug_la-DynamicalDisk.lo `test -f 'DynamicalDisk.C' || echo '$(srcdir)/'`DynamicalDisk.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk.Tpo $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DynamicalDisk.C' object='libgyoto_stdplug_la-DynamicalDisk.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DynamicalDisk.lo `test -f 'DynamicalDisk.C' || echo '$(srcdir)/'`DynamicalDisk.C + +libgyoto_stdplug_la-DynamicalDiskBolometric.lo: DynamicalDiskBolometric.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DynamicalDiskBolometric.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DynamicalDiskBolometric.Tpo -c -o libgyoto_stdplug_la-DynamicalDiskBolometric.lo `test -f 'DynamicalDiskBolometric.C' || echo '$(srcdir)/'`DynamicalDiskBolometric.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DynamicalDiskBolometric.Tpo $(DEPDIR)/libgyoto_stdplug_la-DynamicalDiskBolometric.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DynamicalDiskBolometric.C' object='libgyoto_stdplug_la-DynamicalDiskBolometric.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DynamicalDiskBolometric.lo `test -f 'DynamicalDiskBolometric.C' || echo '$(srcdir)/'`DynamicalDiskBolometric.C + +libgyoto_stdplug_la-Disk3D.lo: Disk3D.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-Disk3D.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-Disk3D.Tpo -c -o libgyoto_stdplug_la-Disk3D.lo `test -f 'Disk3D.C' || echo '$(srcdir)/'`Disk3D.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-Disk3D.Tpo $(DEPDIR)/libgyoto_stdplug_la-Disk3D.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Disk3D.C' object='libgyoto_stdplug_la-Disk3D.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-Disk3D.lo `test -f 'Disk3D.C' || echo '$(srcdir)/'`Disk3D.C + +libgyoto_stdplug_la-DynamicalDisk3D.lo: DynamicalDisk3D.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DynamicalDisk3D.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk3D.Tpo -c -o libgyoto_stdplug_la-DynamicalDisk3D.lo `test -f 'DynamicalDisk3D.C' || echo '$(srcdir)/'`DynamicalDisk3D.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk3D.Tpo $(DEPDIR)/libgyoto_stdplug_la-DynamicalDisk3D.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DynamicalDisk3D.C' object='libgyoto_stdplug_la-DynamicalDisk3D.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DynamicalDisk3D.lo `test -f 'DynamicalDisk3D.C' || echo '$(srcdir)/'`DynamicalDisk3D.C + +libgyoto_stdplug_la-DirectionalDisk.lo: DirectionalDisk.C +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgyoto_stdplug_la-DirectionalDisk.lo -MD -MP -MF $(DEPDIR)/libgyoto_stdplug_la-DirectionalDisk.Tpo -c -o libgyoto_stdplug_la-DirectionalDisk.lo `test -f 'DirectionalDisk.C' || echo '$(srcdir)/'`DirectionalDisk.C +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgyoto_stdplug_la-DirectionalDisk.Tpo $(DEPDIR)/libgyoto_stdplug_la-DirectionalDisk.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='DirectionalDisk.C' object='libgyoto_stdplug_la-DirectionalDisk.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgyoto_stdplug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgyoto_stdplug_la-DirectionalDisk.lo `test -f 'DirectionalDisk.C' || echo '$(srcdir)/'`DirectionalDisk.C + mostlyclean-libtool: -rm -f *.lo diff --git a/lib/Metric.C b/lib/Metric.C index 55ec0d46..33abcfbd 100644 --- a/lib/Metric.C +++ b/lib/Metric.C @@ -1,5 +1,5 @@ /* - Copyright 2011 Frederic Vincent, Thibaut Paumard + Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -568,10 +568,4 @@ void Gyoto::Metric::Register(std::string name, Metric::Subcontractor_t* scp) { Gyoto::Metric::Register_ = ne; } -Metric::Subcontractor_t* -Metric::getSubcontractor(std::string name, int errmode) { - if (!Gyoto::Metric::Register_) throwError("No Metric kind registered!"); - return (Metric::Subcontractor_t*)Gyoto::Metric::Register_ - -> getSubcontractor(name, errmode); -} - +GYOTO_GETSUBCONTRACTOR(Metric) diff --git a/lib/NumericalMetricLorene.C b/lib/NumericalMetricLorene.C index 2594a058..20f2030e 100644 --- a/lib/NumericalMetricLorene.C +++ b/lib/NumericalMetricLorene.C @@ -1,5 +1,5 @@ /* - Copyright 2014-2015 Frederic Vincent, Thibaut Paumard + Copyright 2014-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -65,10 +65,12 @@ GYOTO_PROPERTY_VECTOR_DOUBLE(NumericalMetricLorene, GYOTO_PROPERTY_FILENAME(NumericalMetricLorene, File, directory) GYOTO_PROPERTY_END(NumericalMetricLorene, Generic::properties) +// Lorene Metrics are not thread-safe +GYOTO_PROPERTY_THREAD_UNSAFE(NumericalMetricLorene) + #define GYOTO_NML_PPHI_TOL 5 // tolerance on p_phi drift, percentage NumericalMetricLorene::NumericalMetricLorene() : - WIP(""), Generic(GYOTO_COORDKIND_SPHERICAL, "NumericalMetricLorene"), filename_(NULL), mapet_(true), diff --git a/lib/Object.C b/lib/Object.C index e730a042..4cbdf4b2 100644 --- a/lib/Object.C +++ b/lib/Object.C @@ -1,5 +1,5 @@ /* - Copyright 2014-2015 Thibaut Paumard + Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. @@ -42,11 +42,65 @@ GYOTO_PROPERTY_START(Gyoto::Object, "Object with properties.") GYOTO_PROPERTY_END(Object, NULL) -Gyoto::Object::Object(std::string const &name):kind_(name) {} -Gyoto::Object::Object():kind_("") {} -Gyoto::Object::Object(Object const &o):kind_(o.kind_) {} +Gyoto::Object::Object(std::string const &name):kind_(name), plugins_() {} +Gyoto::Object::Object():kind_(""), plugins_() {} +Gyoto::Object::Object(Object const &o):kind_(o.kind_), plugins_(o.plugins_) {} Gyoto::Object::~Object() {} +bool Object::isThreadSafe() const { + /** + * The default behaviour is to consider that everything is + * thread-safe (for the purpose of threads in + * Gyoto::Scenery::rayTrace()). + * + * For Objects that have other Object as children, we need to + * recursively ask those children whether they are thread-safe and + * accumulate the answer. It can be done in a generic manner as long + * as the Object declares its children as properties, this is what + * we do here. + * + * Objects that are never thread-safe must reimplement this function + * to simply return "false", which can be done with the pair of + * macros GYOTO_OBJECT_THREAD_SAFETY/GYOTO_PROPERTY_THREAD_UNSAFE + * respectively in the class declaration and definition. + * + * Objects that need to clone children that are not declared as + * properties in their copy constructors need to reimplement this + * method to take care of those children. + */ + bool safe = true; + Property const * prop = getProperties(); + SmartPointer child=NULL; + while (prop) { + if (*prop) { + switch (prop -> type) { + case Property::metric_t: + child=SmartPointer(get(*prop)); + break; + case Property::screen_t: + child=SmartPointer(get(prop)); + break; + case Property::astrobj_t: + child=SmartPointer(get(*prop)); + break; + case Property::spectrum_t: + child=SmartPointer(get(*prop)); + break; + case Property::spectrometer_t: + child=SmartPointer(get(*prop)); + break; + default: + child=NULL; + } + if (child) safe &= dynamic_cast(child()) -> isThreadSafe(); + ++prop; + } else { + prop=prop->parent; + } + } + GYOTO_DEBUG_EXPR(safe); + return safe; +} void Object::set(Property const &p, Value val, @@ -320,7 +374,16 @@ void Object::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const } void Object::fillElement(Gyoto::FactoryMessenger *fmp) const { - fmp -> setSelfAttribute("kind", kind_); + std::vector const plgs=plugins(); + size_t np=plgs.size(); + if (np) { + std::string plg(plgs[0]); + for (size_t i=1; i setSelfAttribute("plugin", plg); + } + if (kind_ != "") fmp -> setSelfAttribute("kind", kind_); Property const * prop = getProperties(); while (prop) { if (*prop) { @@ -347,6 +410,7 @@ void Object::setParameters(Gyoto::FactoryMessenger *fmp) { setParameter(name, content, unit); } else { GYOTO_DEBUG << "'" << name << "' found "<< endl; + std::vector plugins; switch (prop->type) { case Property::metric_t: set(*prop, fmp->metric()); @@ -360,13 +424,15 @@ void Object::setParameters(Gyoto::FactoryMessenger *fmp) { case Property::spectrum_t: content = fmp -> getAttribute("kind"); child = fmp -> getChild(); - set(*prop, (*Spectrum::getSubcontractor(content))(child) ); + plugins = Gyoto::split(fmp -> getAttribute("plugin"), ","); + set(*prop, (*Spectrum::getSubcontractor(content, plugins))(child, plugins) ); delete child; break; case Property::spectrometer_t: content = fmp -> getAttribute("kind"); child = fmp -> getChild(); - set(*prop, (*Spectrometer::getSubcontractor(content))(child) ); + plugins = Gyoto::split(fmp -> getAttribute("plugin"), ","); + set(*prop, (*Spectrometer::getSubcontractor(content, plugins))(child, plugins) ); delete child; break; case Property::filename_t: diff --git a/lib/PageThorneDisk.C b/lib/PageThorneDisk.C index 66809fc4..8ab949ad 100644 --- a/lib/PageThorneDisk.C +++ b/lib/PageThorneDisk.C @@ -78,13 +78,17 @@ PageThorneDisk::PageThorneDisk(const PageThorneDisk& o) : spectrumBB_(NULL) { if (o.spectrumBB_()) spectrumBB_=o.spectrumBB_->clone(); - if (o.gg_()) gg_=o.gg_->clone(); - Generic::gg_=gg_; gg_->hook(this); } PageThorneDisk* PageThorneDisk::clone() const { return new PageThorneDisk(*this); } +bool PageThorneDisk::isThreadSafe() const { + // spectrumBB_ is not a Property + return ThinDisk::isThreadSafe() + && (!spectrumBB_ || spectrumBB_->isThreadSafe()); +} + PageThorneDisk::~PageThorneDisk() { GYOTO_DEBUG<unhook(this); diff --git a/lib/PatternDiskBB.C b/lib/PatternDiskBB.C index d7d05b36..23fc0248 100644 --- a/lib/PatternDiskBB.C +++ b/lib/PatternDiskBB.C @@ -1,5 +1,5 @@ /* - Copyright 2011 Frederic Vincent, Thibaut Paumard + Copyright 2012-2014, 2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -78,6 +78,12 @@ PatternDiskBB::PatternDiskBB(const PatternDiskBB& o) : PatternDiskBB* PatternDiskBB::clone() const { return new PatternDiskBB(*this); } +bool PatternDiskBB::isThreadSafe() const { + // spectrumBB_ is not a Property + return PatternDisk::isThreadSafe() + && (!spectrumBB_ || spectrumBB_->isThreadSafe()); +} + PatternDiskBB::~PatternDiskBB() { GYOTO_DEBUG << "PatternDiskBB Destruction" << endl; } diff --git a/lib/Photon.C b/lib/Photon.C index 75fad29c..6a8e82de 100644 --- a/lib/Photon.C +++ b/lib/Photon.C @@ -1,5 +1,5 @@ /* - Copyright 2011-2015 Frederic Vincent, Thibaut Paumard + Copyright 2011-2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -73,6 +73,13 @@ Photon::Photon(const Photon& o) : Photon * Photon::clone() const { return new Photon(*this); } +bool Photon::isThreadSafe() const { + // spectro_ is not a Property + return + Object::isThreadSafe() + && (!spectro_ || spectro_ -> isThreadSafe()); +} + Photon::Photon(Photon* orig, size_t i0, int dir, double step_max) : Worldline(orig, i0, dir, step_max), SmartPointee(), object_(orig->object_), diff --git a/lib/PolishDoughnut.C b/lib/PolishDoughnut.C index 8224e941..c3b16535 100644 --- a/lib/PolishDoughnut.C +++ b/lib/PolishDoughnut.C @@ -1,5 +1,5 @@ /* - Copyright (c) 2012-2015 Frederic Vincent, Odele Straub, Thibaut Paumard + Copyright (c) 2012-2016 Frederic Vincent, Odele Straub, Thibaut Paumard This file is part of Gyoto. Gyoto is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -151,6 +151,11 @@ PolishDoughnut::PolishDoughnut(const PolishDoughnut& orig) : } PolishDoughnut* PolishDoughnut::clone() const {return new PolishDoughnut(*this);} +bool PolishDoughnut::isThreadSafe() const { + // spectrumBB_ is not a Property + return Standard::isThreadSafe() + && (!spectrumBB_ || spectrumBB_->isThreadSafe()); +} double PolishDoughnut::getL0() const { return l0_; } //void PolishDoughnut::setL0(double l0) { l0_ = l0; } double PolishDoughnut::getWsurface() const { return W_surface_; } diff --git a/lib/Register.C b/lib/Register.C index 44949b23..668ae51f 100644 --- a/lib/Register.C +++ b/lib/Register.C @@ -34,8 +34,22 @@ using namespace Gyoto; using namespace std; +static std::string GyotoRegisterCurrentPlugin ("built-in"); + +static std::vector GyotoRegisteredPlugins; + typedef void GyotoInitFcn(); +bool Gyoto::havePlugin(std::string name) { + for (size_t i=0; i < GyotoRegisteredPlugins.size(); ++i) + if (GyotoRegisteredPlugins[i]==name) return true; + return false; +} + +void Gyoto::requirePlugin(std::string name, int nofail) { + if (!havePlugin(name)) loadPlugin(name.c_str(), nofail); +} + void Gyoto::loadPlugin(char const*const nam, int nofail) { string name(nam); @@ -122,7 +136,13 @@ void Gyoto::loadPlugin(char const*const nam, int nofail) { } if ( (err=dlerror()) ) throwError(err); GYOTO_DEBUG << "Calling plug-in init function " << dlfunc << endl; + std::string tmp_name(GyotoRegisterCurrentPlugin); + // In case nam is a file name, that's what we wan't to store + GyotoRegisterCurrentPlugin = nam; (*initfcn)(); + GyotoRegisterCurrentPlugin = tmp_name; + // In case nam is a file name, that's what we wan't to store + GyotoRegisteredPlugins.insert(GyotoRegisteredPlugins.begin(), nam); GYOTO_DEBUG << "Done." << endl; } @@ -135,6 +155,8 @@ void Gyoto::Register::init(char const * cpluglist) { // This cleans and fills Spectometer::Register_ Spectrometer::initRegister(); + GyotoRegisteredPlugins.push_back(GyotoRegisterCurrentPlugin); + // Init units system Units::Init(); @@ -184,22 +206,36 @@ void Gyoto::Register::init(char const * cpluglist) { Register::Entry::Entry(std::string name, Gyoto::SmartPointee::Subcontractor_t* subcontractor, Register::Entry* next) - : name_(name), subcontractor_(subcontractor), next_(next) + : name_(name), subcontractor_(subcontractor), next_(next), plugin_(GyotoRegisterCurrentPlugin) {} Register::Entry::~Entry() { if (next_) delete next_; } +#ifndef GYOTO_NO_DEPRECATED +#warning Embedding deprecated method.\ + Define GYOTO_NO_DEPRECATED to disable. Gyoto::SmartPointee::Subcontractor_t* Register::Entry::getSubcontractor(std::string name, int errmode) { + std::string plugin(""); + return getSubcontractor(name, plugin, errmode); +} +#endif + +Gyoto::SmartPointee::Subcontractor_t* +Register::Entry::getSubcontractor(std::string name, std::string &plugin, int errmode) { # if GYOTO_DEBUG_ENABLED GYOTO_IF_DEBUG GYOTO_DEBUG_EXPR(name); GYOTO_DEBUG_EXPR(errmode); GYOTO_ENDIF_DEBUG # endif - if (name_==name) return subcontractor_; - if (next_) return next_ -> getSubcontractor(name, errmode); + bool any_plugin = (plugin == ""); + if (name_==name && (any_plugin || (plugin_ == plugin))) { + if (any_plugin) plugin=plugin_; + return subcontractor_; + } + if (next_) return next_ -> getSubcontractor(name, plugin, errmode); if (errmode) return NULL; throwError ("Unregistered kind: "+name); return NULL; // will never get there, avoid compilation warning @@ -220,21 +256,25 @@ void Gyoto::Register::list() { cout << " " << GYOTO_PKGLIBDIR "/" GYOTO_SOVERS "/" << endl; cout << " " << GYOTO_PKGLIBDIR "/" << endl << endl; + cout << "List of loaded plug-ins:" << endl; + for (size_t i=0; i < GyotoRegisteredPlugins.size(); ++i) + cout << " " << GyotoRegisteredPlugins[i] << endl; + cout << "List of available Metrics:" << endl; for (entry = Metric::Register_; entry; entry = entry -> next_) - cout << " " << entry -> name_ << endl; + cout << " " << entry -> name_ << " (in plug-in: " << entry -> plugin_ << ")" << endl; cout << "List of available Astrobjs:" << endl; for (entry = Astrobj::Register_; entry; entry = entry -> next_) - cout << " " << entry -> name_ << endl; + cout << " " << entry -> name_ << " (in plug-in: " << entry -> plugin_ << ")" << endl; cout << "List of available Spectra:" << endl; for (entry = Spectrum::Register_; entry; entry = entry -> next_) - cout << " " << entry -> name_ << endl; + cout << " " << entry -> name_ << " (in plug-in: " << entry -> plugin_ << ")" << endl; cout << "List of available Spectrometers:" << endl; for (entry = Spectrometer::Register_; entry; entry = entry -> next_) - cout << " " << entry -> name_ << endl; + cout << " " << entry -> name_ << " (in plug-in: " << entry -> plugin_ << ")" << endl; } diff --git a/lib/RotStar3_1.C b/lib/RotStar3_1.C index a467f4e4..fbeac377 100644 --- a/lib/RotStar3_1.C +++ b/lib/RotStar3_1.C @@ -1,5 +1,5 @@ /* - Copyright 2011 Frederic Vincent + Copyright 2011-2014, 2016 Frederic Vincent & Thibaut Paumard This file is part of Gyoto. @@ -50,6 +50,9 @@ GYOTO_PROPERTY_BOOL(RotStar3_1, GenericIntegrator, SpecificIntegrator, GYOTO_PROPERTY_FILENAME(RotStar3_1, File, file) GYOTO_PROPERTY_END(RotStar3_1, Generic::properties) +// Lorene Metrics are not thread-safe +GYOTO_PROPERTY_THREAD_UNSAFE(RotStar3_1) + RotStar3_1::RotStar3_1() : Generic(GYOTO_COORDKIND_SPHERICAL, "RotStar3_1"), filename_(NULL), diff --git a/lib/Scenery.C b/lib/Scenery.C index 44f129ee..f03e6a01 100644 --- a/lib/Scenery.C +++ b/lib/Scenery.C @@ -1,5 +1,5 @@ /* - Copyright 2011, 2013-2015 Thibaut Paumard, Frederic Vincent + Copyright 2011-2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. @@ -68,6 +68,14 @@ GYOTO_PROPERTY_STRING(Scenery, Quantities, requestedQuantitiesString, "Physical quantities to evaluate for each light ray.") GYOTO_WORLDLINE_PROPERTY_END(Scenery, Object::properties) +bool Scenery::isThreadSafe() const { + bool safe=true; + if (metric() ) safe &= metric() -> isThreadSafe(); + if (screen_ ) safe &= screen_ -> isThreadSafe(); + if (astrobj()) safe &= astrobj() -> isThreadSafe(); + return safe; +} + #ifdef GYOTO_USE_XERCES void Scenery::fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const { @@ -604,13 +612,20 @@ void Scenery::rayTrace(Screen::Coord2dSet & ij, pthread_t * threads = NULL; pthread_t pself = pthread_self(); larg.parent = &pself; + bool thread_safe = isThreadSafe(); if (nthreads_ >= 2) { - threads = new pthread_t[nthreads_-1]; - larg.mutex = &mumu; - for (size_t th=0; th < nthreads_-1; ++th) { - if (pthread_create(threads+th, NULL, - SceneryThreadWorker, static_cast(&larg)) < 0) - throwError("Error creating thread"); + if (!thread_safe) { + GYOTO_WARNING << + "Something in this Scenery is not thread-safe: running single-threaded" + << endl; + } else { + threads = new pthread_t[nthreads_-1]; + larg.mutex = &mumu; + for (size_t th=0; th < nthreads_-1; ++th) { + if (pthread_create(threads+th, NULL, + SceneryThreadWorker, static_cast(&larg)) < 0) + throwError("Error creating thread"); + } } } #endif @@ -621,7 +636,7 @@ void Scenery::rayTrace(Screen::Coord2dSet & ij, #ifdef HAVE_PTHREAD // Wait for the child threads - if (nthreads_>=2) + if (thread_safe && nthreads_>=2) for (size_t th=0; th < nthreads_-1; ++th) pthread_join(threads[th], NULL); #endif @@ -631,7 +646,8 @@ void Scenery::rayTrace(Screen::Coord2dSet & ij, GYOTO_MSG << "\nRaytraced "<< ij.size() << " photons in " << end-start - << "s using " << nthreads_ << " thread(s)\n"; + << "s using " << (thread_safe?nthreads_:1) << " thread" + << (thread_safe && nthreads_>1)?"s\n":"\n"; } diff --git a/lib/Screen.C b/lib/Screen.C index 9bd25e28..2fbc9439 100644 --- a/lib/Screen.C +++ b/lib/Screen.C @@ -1,5 +1,5 @@ /* - Copyright 2011-2015 Thibaut Paumard, Frederic Vincent + Copyright 2011-2016 Thibaut Paumard, Frederic Vincent This file is part of Gyoto. @@ -141,6 +141,12 @@ Screen::Screen(const Screen& o) : } Screen * Screen::clone() const { return new Screen(*this); } +bool Screen::isThreadSafe() const { + return Object::isThreadSafe() + && (!gg_ || gg_ -> isThreadSafe()) + && (!spectro_ || spectro_ -> isThreadSafe()); +} + Screen::~Screen(){if (mask_) delete [] mask_;} std::ostream& Screen::print( std::ostream& o) const { @@ -1249,6 +1255,7 @@ void Screen::fillProperty(Gyoto::FactoryMessenger *fmp, SmartPointer Screen::Subcontractor(FactoryMessenger* fmp) { string name="", content="", unit="", tunit="", aunit="", dunit=""; + vector plugin; SmartPointer scr = new Screen(); if (!fmp) return scr; scr -> metric(fmp->metric()); @@ -1291,7 +1298,10 @@ SmartPointer Screen::Subcontractor(FactoryMessenger* fmp) { fov = atof(tc); fov_unit=unit; fov_found=1; } else if (name=="Spectrometer") { - scr -> spectrometer ((Spectrometer::getSubcontractor(fmp->getAttribute("kind")))(fmp->getChild())); + scr -> + spectrometer((Spectrometer::getSubcontractor(fmp->getAttribute("kind"), + plugin)) + (fmp->getChild(), plugin)); } else if (name=="Alpha0"){ alpha0 = atof(tc); alpha0_found=1; aunit=unit; diff --git a/lib/Spectrometer.C b/lib/Spectrometer.C index 13eca782..d7a4a5db 100644 --- a/lib/Spectrometer.C +++ b/lib/Spectrometer.C @@ -1,5 +1,5 @@ /* - Copyright 2011 Thibaut Paumard + Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. @@ -67,12 +67,7 @@ void Gyoto::Spectrometer::Register(std::string name, Subcontractor_t* scp){ Gyoto::Spectrometer::Register_ = ne; } -Gyoto::Spectrometer::Subcontractor_t* -Spectrometer::getSubcontractor(std::string name, int errmode) { - if (!Gyoto::Spectrometer::Register_) throwError("No Spectrometer kind registered!"); - return (Subcontractor_t*)Gyoto::Spectrometer::Register_ - -> getSubcontractor(name, errmode); -} +GYOTO_GETSUBCONTRACTOR(Spectrometer) Generic::Generic() : SmartPointee(), diff --git a/lib/Spectrum.C b/lib/Spectrum.C index 78415751..fa14cb4c 100644 --- a/lib/Spectrum.C +++ b/lib/Spectrum.C @@ -1,5 +1,5 @@ /* - Copyright 2011 Thibaut Paumard + Copyright 2011-2016 Thibaut Paumard This file is part of Gyoto. @@ -147,12 +147,7 @@ void Gyoto::Spectrum::Register(std::string name, Gyoto::Spectrum::Register_ = ne; } -Spectrum::Subcontractor_t* -Spectrum::getSubcontractor(std::string name, int errmode) { - if (!Gyoto::Spectrum::Register_) throwError("No Spectrum kind registered!"); - return (Spectrum::Subcontractor_t*)Gyoto::Spectrum::Register_ - -> getSubcontractor(name, errmode); -} +GYOTO_GETSUBCONTRACTOR(Spectrum) void Gyoto::Spectrum::initRegister() { if (Gyoto::Spectrum::Register_) delete Gyoto::Spectrum::Register_; diff --git a/lib/ThinDisk.C b/lib/ThinDisk.C index 56c96bf0..3f03dbbe 100644 --- a/lib/ThinDisk.C +++ b/lib/ThinDisk.C @@ -17,6 +17,9 @@ along with Gyoto. If not, see . */ +/* The subcontractor is registered by the stdplug plugin */ +#define GYOTO_PLUGIN stdplug + #include "GyotoPhoton.h" #include "GyotoThinDisk.h" #include "GyotoProperty.h" diff --git a/lib/ThinDiskPL.C b/lib/ThinDiskPL.C index 6456707f..3e132eb4 100644 --- a/lib/ThinDiskPL.C +++ b/lib/ThinDiskPL.C @@ -1,5 +1,5 @@ /* - Copyright 2011 Frederic Vincent, Thibaut Paumard + Copyright 2012, 2014, 2016 Frederic Vincent, Thibaut Paumard This file is part of Gyoto. @@ -76,6 +76,11 @@ ThinDiskPL::ThinDiskPL(const ThinDiskPL& o) : ThinDiskPL* ThinDiskPL::clone() const { return new ThinDiskPL(*this); } +bool ThinDiskPL::isThreadSafe() const { + return ThinDisk::isThreadSafe() + && (!spectrumBB_ || spectrumBB_ -> isThreadSafe()); +} + ThinDiskPL::~ThinDiskPL() { if (debug()) cerr << "DEBUG: ThinDiskPL Destruction" << endl; } diff --git a/lib/Utils.C b/lib/Utils.C index f4755ec4..77a73f6b 100644 --- a/lib/Utils.C +++ b/lib/Utils.C @@ -111,6 +111,7 @@ double Gyoto::atof(const char * str) } void Gyoto::help(std::string class_name) { + std::vector plugins; if (class_name.substr(0, 7)=="Gyoto::") class_name=class_name.substr(7); if (class_name=="Scenery") {Scenery().help(); return;} @@ -123,22 +124,39 @@ void Gyoto::help(std::string class_name) { string nspace = class_name.substr(0, pos); class_name = class_name.substr(pos+2); if (nspace=="Astrobj") { - (*Astrobj::getSubcontractor(class_name))(NULL)->help(); + (*Astrobj::getSubcontractor(class_name, plugins)) + (NULL, plugins)->help(); return; } if (nspace=="Metric") { - (*Metric::getSubcontractor(class_name))(NULL)->help(); + (*Metric::getSubcontractor(class_name, plugins)) + (NULL, plugins)->help(); return; } if (nspace=="Spectrum") { - (*Spectrum::getSubcontractor(class_name))(NULL)->help(); + (*Spectrum::getSubcontractor(class_name, plugins)) + (NULL, plugins)->help(); return; } if (nspace=="Spectrometer") { - (*Spectrometer::getSubcontractor(class_name))(NULL)->help(); + (*Spectrometer::getSubcontractor(class_name, plugins)) + (NULL, plugins)->help(); return; } throwError("Unrecognized namespace: "+nspace); } throwError("Help string not implemented (yet) for "+class_name); } + +std::vector Gyoto::split(std::string const &src, std::string const &delim) { + std::vector res; + size_t pos=0, fpos=0, sz=src.length(); + std::string tmp(""); + while (fpos != string::npos && pos < sz) { + fpos = src.find_first_of(delim, pos); + if (fpos==pos) {++pos; continue;} + res.push_back(src.substr(pos, fpos-pos)); + pos = fpos+1; + } + return res; +} diff --git a/lib/Value.C b/lib/Value.C index df6523c9..4f3739e7 100644 --- a/lib/Value.C +++ b/lib/Value.C @@ -1,5 +1,5 @@ /* - Copyright 2014-2015 Thibaut Paumard + Copyright 2014-2016 Thibaut Paumard This file is part of Gyoto. diff --git a/plugins/null/README b/plugins/null/README index 5f0510ca..2d9e76ef 100644 --- a/plugins/null/README +++ b/plugins/null/README @@ -23,7 +23,7 @@ To make your own, - In XML: - On the command line: gyoto -pstdplug,null ... - In Python: - gyoto.loadPlugin('null') + gyoto.requirePlugin('null') - In all cases: export GYOTO_PLUGINS="stdplug,null". For further details, refer to the Gyoto user manual, section entitled diff --git a/plugins/python/doc/examples/gyoto_sample_metrics.py b/plugins/python/doc/examples/gyoto_sample_metrics.py index 4c32c353..ce67e5b4 100644 --- a/plugins/python/doc/examples/gyoto_sample_metrics.py +++ b/plugins/python/doc/examples/gyoto_sample_metrics.py @@ -11,7 +11,7 @@ Synopsis: import gyoto - gyoto.loadPlugin("python") # or python2.7 or python3.4... + gyoto.requirePlugin("python") # or python2.7 or python3.4... gg=gyoto.Metric("Python") gg.set("Module", "gyoto_sample_metric") gg.set("Class", "Minkowski") diff --git a/plugins/python/doc/examples/gyoto_sample_spectra.py b/plugins/python/doc/examples/gyoto_sample_spectra.py index 52427dd4..eee1bdcf 100644 --- a/plugins/python/doc/examples/gyoto_sample_spectra.py +++ b/plugins/python/doc/examples/gyoto_sample_spectra.py @@ -11,7 +11,7 @@ Synopsis: import gyoto - gyoto.loadPlugin("python") # or python2.7 or python3.4... + gyoto.requirePlugin("python") # or python2.7 or python3.4... sp=gyoto.Spectrum("Python") sp.set("Module", "gyoto_sample_spectra") sp.set("Class", "PowerLaw") # or "BlackBody6000" diff --git a/plugins/python/doc/examples/gyoto_sample_standard.py b/plugins/python/doc/examples/gyoto_sample_standard.py index 36c4a64c..e01cb950 100644 --- a/plugins/python/doc/examples/gyoto_sample_standard.py +++ b/plugins/python/doc/examples/gyoto_sample_standard.py @@ -12,7 +12,7 @@ Synopsis: import gyoto - gyoto.loadPlugin("python") # or python2.7 or python3.4... + gyoto.requirePlugin("python") # or python2.7 or python3.4... sp=gyoto.Astrobj("Python::Standard") sp.set("Module", "gyoto_sample_standard") sp.set("Class", "FixedStar") diff --git a/plugins/python/doc/examples/gyoto_sample_thindisks.py b/plugins/python/doc/examples/gyoto_sample_thindisks.py index 9091ea38..caa4b972 100644 --- a/plugins/python/doc/examples/gyoto_sample_thindisks.py +++ b/plugins/python/doc/examples/gyoto_sample_thindisks.py @@ -12,7 +12,7 @@ Synopsis: import gyoto - gyoto.loadPlugin("python") # or python2.7 or python3.4... + gyoto.requirePlugin("python") # or python2.7 or python3.4... td=gyoto.Spectrum("Python::ThinDisk") td.set("Module", "gyoto_sample_thindisks") td.set("Class", "ThinDisk") diff --git a/plugins/python/doc/examples/test.py b/plugins/python/doc/examples/test.py index f91e9169..04e5f58e 100644 --- a/plugins/python/doc/examples/test.py +++ b/plugins/python/doc/examples/test.py @@ -5,7 +5,7 @@ # The name of the Gyoto plug-in that can be loaded in a given Python # session is the same as the name of the Python executable python_plugin = os.path.basename(sys.executable) -gyoto.loadPlugin(python_plugin) +gyoto.requirePlugin(python_plugin) sp=gyoto.Spectrum("Python") sp.set("Module", "gyoto_sample_spectra") diff --git a/plugins/python/include/GyotoPython.h b/plugins/python/include/GyotoPython.h index ec62b926..1b79bc59 100644 --- a/plugins/python/include/GyotoPython.h +++ b/plugins/python/include/GyotoPython.h @@ -328,6 +328,7 @@ class Gyoto::Spectrum::Python public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; Python(); @@ -391,6 +392,7 @@ class Gyoto::Metric::Python public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; Python(); Python(const Python&); ~Python(); @@ -440,6 +442,7 @@ class Gyoto::Astrobj::Python::Standard public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; /* Birth and Death*/ Standard(); @@ -505,6 +508,7 @@ class Gyoto::Astrobj::Python::ThinDisk public: GYOTO_OBJECT; + GYOTO_OBJECT_THREAD_SAFETY; /* Birth and Death*/ ThinDisk(); diff --git a/plugins/python/lib/Makefile.am b/plugins/python/lib/Makefile.am index d66c79e2..b666068d 100644 --- a/plugins/python/lib/Makefile.am +++ b/plugins/python/lib/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I@top_srcdir@/include -DGYOTO_NO_DEPRECATED \ - $(PYTHON_INCLUDES) $(NUMPY_CFLAGS) + $(PYTHON_INCLUDES) $(NUMPY_CFLAGS) -DGYOTO_PLUGIN=@pluginname@ AM_LDFLAGS = $(Gyoto_LDFLAGS) -module -export-dynamic \ $(PYTHON_LDFLAGS) $(PYTHON_LIBS) -avoid-version -shared AM_CXXFLAGS = $(Gyoto_CFLAGS) -DGYOTO_PREFIX=\"@prefix@\" \ diff --git a/plugins/python/lib/Makefile.in b/plugins/python/lib/Makefile.in index 6318dc3a..a30d0d9e 100644 --- a/plugins/python/lib/Makefile.in +++ b/plugins/python/lib/Makefile.in @@ -344,7 +344,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I@top_srcdir@/include -DGYOTO_NO_DEPRECATED \ - $(PYTHON_INCLUDES) $(NUMPY_CFLAGS) + $(PYTHON_INCLUDES) $(NUMPY_CFLAGS) -DGYOTO_PLUGIN=@pluginname@ AM_LDFLAGS = $(Gyoto_LDFLAGS) -module -export-dynamic \ $(PYTHON_LDFLAGS) $(PYTHON_LIBS) -avoid-version -shared diff --git a/plugins/python/lib/Metric.C b/plugins/python/lib/Metric.C index d7e809fa..87d740b5 100644 --- a/plugins/python/lib/Metric.C +++ b/plugins/python/lib/Metric.C @@ -27,6 +27,8 @@ GYOTO_PROPERTY_BOOL(Metric::Python, Spherical, Cartesian, spherical, "Whether the coordinate system is Spherical or (default) Cartesian.") GYOTO_PROPERTY_END(Metric::Python, Generic::properties) +GYOTO_PROPERTY_THREAD_UNSAFE(Metric::Python) + // Birth and death Gyoto::Metric::Python::Python() : Generic(GYOTO_COORDKIND_CARTESIAN, "Python"), diff --git a/plugins/python/lib/Spectrum.C b/plugins/python/lib/Spectrum.C index fac951da..cd0f605f 100644 --- a/plugins/python/lib/Spectrum.C +++ b/plugins/python/lib/Spectrum.C @@ -20,6 +20,8 @@ GYOTO_PROPERTY_VECTOR_DOUBLE(Gyoto::Spectrum::Python, Parameters, parameters, GYOTO_PROPERTY_END(Gyoto::Spectrum::Python, Gyoto::Spectrum::Generic::properties) +GYOTO_PROPERTY_THREAD_UNSAFE(Gyoto::Spectrum::Python) + Spectrum::Python::Python() : Generic("Python"), Base(), pCall_(NULL), pIntegrate_(NULL), pCall_overloaded_(false) diff --git a/plugins/python/lib/Standard.C b/plugins/python/lib/Standard.C index c8da9ba1..2533b62b 100644 --- a/plugins/python/lib/Standard.C +++ b/plugins/python/lib/Standard.C @@ -28,6 +28,8 @@ GYOTO_PROPERTY_DOUBLE(Gyoto::Astrobj::Python::Standard, "The object is defined by __call__ < this value") GYOTO_PROPERTY_END(Astrobj::Python::Standard, Generic::properties) +GYOTO_PROPERTY_THREAD_UNSAFE(Astrobj::Python::Standard) + // Birth and death Gyoto::Astrobj::Python::Standard::Standard() : Astrobj::Standard("Python::Standard"), diff --git a/plugins/python/lib/ThinDisk.C b/plugins/python/lib/ThinDisk.C index 7ba93614..390cbe7e 100644 --- a/plugins/python/lib/ThinDisk.C +++ b/plugins/python/lib/ThinDisk.C @@ -25,6 +25,8 @@ GYOTO_PROPERTY_VECTOR_DOUBLE(Gyoto::Astrobj::Python::ThinDisk, "Parameters for the class instance.") GYOTO_PROPERTY_END(Astrobj::Python::ThinDisk, Astrobj::ThinDisk::properties) +GYOTO_PROPERTY_THREAD_UNSAFE(Astrobj::Python::ThinDisk) + // Birth and death Gyoto::Astrobj::Python::ThinDisk::ThinDisk() : Astrobj::ThinDisk("Python::ThinDisk"), diff --git a/python/example-mpi.py b/python/example-mpi.py index b3a5aa25..63860a84 100644 --- a/python/example-mpi.py +++ b/python/example-mpi.py @@ -102,7 +102,7 @@ import matplotlib as ml import matplotlib.pyplot as plt import gyoto -gyoto.loadPlugin("stdplug") +gyoto.requirePlugin("stdplug") import gyoto_std a=gyoto.Factory("../doc/examples/example-moving-star.xml") diff --git a/python/example.py b/python/example.py index 858e5806..22ed2865 100644 --- a/python/example.py +++ b/python/example.py @@ -27,7 +27,7 @@ import matplotlib as ml import matplotlib.pyplot as plt import gyoto -gyoto.loadPlugin("stdplug") +gyoto.requirePlugin("stdplug") import gyoto_std # Simple stuff @@ -244,8 +244,8 @@ # Any derived class can be instantiated from its name, as soon as the # corresponding plug-in has been loaded into Gyoto. The standard # plug-in is normally loaded automatically, but this can also be -# forced with gyoto.loadPlugin(): -gyoto.loadPlugin('stdplug') +# forced with gyoto.requirePlugin(): +gyoto.requirePlugin('stdplug') tt=gyoto.Astrobj('Torus') kerr=gyoto.Metric('KerrBL') @@ -263,10 +263,10 @@ # However, we also have Python extensions around the standard Gyoto # plug-ins. Beware that the plug-in must be loaded into Gyoto before # importing the corresponding Python extension: -gyoto.loadPlugin('stdplug') +gyoto.requirePlugin('stdplug') import gyoto_std # And if the lorene plug-in has been compiled: -# gyoto.loadPlugin('lorene') +# gyoto.requirePlugin('lorene') # import gyoto_lorene # It then becomes possible to access the methods specific to derived diff --git a/python/gyoto.i b/python/gyoto.i index 2d72f8da..2034c870 100644 --- a/python/gyoto.i +++ b/python/gyoto.i @@ -132,7 +132,7 @@ Gyoto::SmartPointer, gtype * { // Need to mark the base classes as "notabstract" to extend them with // a down-cast constructor %feature("notabstract") Gyoto::klass::Generic; -// Ignore all the actual constructors are these classes are really abstract +// Ignore all the actual constructors as these classes are really abstract %ignore Gyoto::klass::Generic::Generic(Gyoto::klass::Generic const &); %ignore Gyoto::klass::Generic::Generic(const Generic &); %ignore Gyoto::klass::Generic::Generic(const klass::Generic &); @@ -140,11 +140,21 @@ Gyoto::SmartPointer, gtype * { %ignore Gyoto::klass::Generic::Generic(double); %ignore Gyoto::klass::Generic::Generic(kind_t); %ignore Gyoto::klass::Generic::Generic(const std::string); +%ignore Gyoto::klass::Generic::Generic(const int, const std::string &); // Make a pseudo constructor for down-casting. %extend Gyoto::klass::Generic { Generic(std::string nm) { + std::vector plugin; Gyoto::SmartPointer pres= - Gyoto::klass::getSubcontractor(nm.c_str())(NULL); + Gyoto::klass::getSubcontractor(nm.c_str(), plugin)(NULL, plugin); + Gyoto::klass::Generic * res = (Gyoto::klass::Generic *)(pres); + if (res) res -> incRefCount(); + return res; + } + Generic(std::string nm, std::vector plugin) { + GYOTO_DEBUG_EXPR(plugin.size()); + Gyoto::SmartPointer pres= + Gyoto::klass::getSubcontractor(nm.c_str(), plugin)(NULL, plugin); Gyoto::klass::Generic * res = (Gyoto::klass::Generic *)(pres); if (res) res -> incRefCount(); return res; @@ -433,6 +443,7 @@ GyotoSmPtrTypeMapClassDerived(Astrobj, Properties); // Handle std::vector and %include "std_vector.i"; +%template(vector_string) std::vector; %template(vector_double) std::vector; %{ typedef unsigned long unsignedlong; diff --git a/python/tests/test_metric.py b/python/tests/test_metric.py index d76caeb8..0b2ea144 100644 --- a/python/tests/test_metric.py +++ b/python/tests/test_metric.py @@ -2,7 +2,7 @@ import gyoto import numpy -gyoto.loadPlugin('stdplug') +gyoto.requirePlugin('stdplug') class TestMetric(unittest.TestCase): diff --git a/python/tests/test_value.py b/python/tests/test_value.py index 3bc623a0..012622d1 100644 --- a/python/tests/test_value.py +++ b/python/tests/test_value.py @@ -1,6 +1,6 @@ import unittest import gyoto -gyoto.loadPlugin("stdplug") +gyoto.requirePlugin("stdplug") class TestValue(unittest.TestCase): diff --git a/python/tests_std/test_star.py b/python/tests_std/test_star.py index 936104c9..7415f497 100644 --- a/python/tests_std/test_star.py +++ b/python/tests_std/test_star.py @@ -1,7 +1,7 @@ import numpy import unittest import gyoto -gyoto.loadPlugin('stdplug') +gyoto.requirePlugin('stdplug') import gyoto_std class TestStar(unittest.TestCase): diff --git a/yorick/gyoto.i b/yorick/gyoto.i index c3b6ba86..90121998 100644 --- a/yorick/gyoto.i +++ b/yorick/gyoto.i @@ -37,9 +37,9 @@ local GYOTO_PLUGINS; GYOTO_PLUGINS=""; GYOTO_NO_STD=1; #include "gyoto.i" - noop, gyoto.loadPlugin("myplugin"); + noop, gyoto.requirePlugin("myplugin"); - SEE ASLO: gyoto.loadPlugin, GYOTO_NO_STD + SEE ASLO: gyoto.requirePlugin, GYOTO_NO_STD */ local GYOTO_PLUGINS; @@ -55,9 +55,9 @@ local GYOTO_PLUGINS; GYOTO_PLUGINS=""; GYOTO_NO_STD=1; #include "gyoto.i" - noop, gyoto.loadPlugin("myplugin"); + noop, gyoto.requirePlugin("myplugin"); - SEE ASLO: gyoto.loadPlugin, GYOTO_PLUGINS + SEE ASLO: gyoto.requirePlugin, GYOTO_PLUGINS */ extern gyoto_haveXerces; @@ -156,27 +156,43 @@ extern __gyoto_setErrorHandler; */ __gyoto_setErrorHandler; +extern gyoto_requirePlugin; extern gyoto_loadPlugin; -/* DOCUMENT gyoto.loadPlugin, plugin[, plugin2[, plugin3]] [, nofail=1] +extern gyoto_havePlugin; +/* DOCUMENT gyoto.requirePlugin, plugin[, plugin2[, plugin3]] [, nofail=1] + gyoto.loadPlugin, plugin[, plugin2[, plugin3]] [, nofail=1] + gyoto.havePlugin(plugin] Load Gyoto plug-ins. INPUTS: - gyoto.loadPlugins() accepts an aribtrary number of positional - arguments, each a string or string array naming individual Gyoto - plugins. For instance, all of the following attempt to load the - plug-ins, stdplug, lorene and myplug: - gyoto.loadPlugin, "stdplug", "lorene", myplug" - gyoto.loadPlugin, ["stdplug", "lorene", myplug"] - gyoto.loadPlugin, "stdplug", ["lorene", myplug"] + gyoto.requirePlugin() and gyoto.loadPlugin() accept an aribtrary + number of positional arguments, each a string or string array + naming individual Gyoto plug-ins. For instance, all of the + following attempt to load the plug-ins, stdplug, lorene and myplug: + + gyoto.requirePlugin, "stdplug", "lorene", myplug" + gyoto.requirePlugin, ["stdplug", "lorene", myplug"] + gyoto.requirePlugin, "stdplug", ["lorene", myplug"] + + In the first (preferred) form, each plug-in is loaded only if it is + not already. In the second form, each plug-in is forcibly loaded, + which has the effect that the classes it implements will be + registered twice. The only use of this feature is to put the + classes of this plug-in first in the registers to make sure they + are the version that is used when instanciating a class without + specifying it's plug-in. In short, this should not be used. + + gyoto.havePlugin("myplug") returns 1 if myplug has already been + loaded, 0 otherwise. KEYWORDS: nofail= if set and true, failure to load a plug-in will not trigger an error. It applies to _all_ plug-ins in the list. EXAMPLE: - gyoto.loadPlugin, "stdplug" - gyoto.loadPlugin, "lorene", nofail=1 + gyoto.requirePlugin, "stdplug" + gyoto.requirePlugin, "lorene", nofail=1 */ extern __gyoto_initRegister; @@ -242,7 +258,13 @@ local gyoto; Arbitrary derived classes can also be instantiated using the base class constructor: - gg = gyoto.Metric("KerrBL"); + gg = gyoto.Metric("KerrBL", [plugin]); + The PLUGIN argument is optional and has two effects: + - it ensures the plug-in PLUGIN is loaded before attempting to + instantiate the object; + - it ensures the class of the newly created object comes from + this plug-in and that another class by the same name in + another plug-in is not inadvertently used. Finally, it is possible to instantiate an object using a buffer containing XML data: @@ -253,7 +275,6 @@ local gyoto; This should be equivalent to gg2 == gg.clone(), see COPYING vs. CLONIG below. - GYOTO OBJECTS BEHAVE LIKE FUNCTIONS ----------------------------------- diff --git a/yorick/gyoto_namespace.i b/yorick/gyoto_namespace.i index 0a5ca46c..4ad4f3f6 100644 --- a/yorick/gyoto_namespace.i +++ b/yorick/gyoto_namespace.i @@ -11,6 +11,8 @@ gyoto=save( MPI_Initialized=gyoto_MPI_Initialized, MPI_Finalized=gyoto_MPI_Finalized, loadPlugin=gyoto_loadPlugin, + requirePlugin=gyoto_requirePlugin, + havePlugin=gyoto_havePlugin, Scenery=gyoto_Scenery, Scenery_rayTrace=gyoto_Scenery_rayTrace, diff --git a/yorick/gyoto_utils.C b/yorick/gyoto_utils.C index 3d4f42c0..2308fdc6 100644 --- a/yorick/gyoto_utils.C +++ b/yorick/gyoto_utils.C @@ -162,6 +162,12 @@ extern "C" { } + void + Y_gyoto_havePlugin(int argc) + { + ypush_long(Gyoto::havePlugin(ygets_q(0))); + } + void Y_gyoto_loadPlugin(int argc) { @@ -194,6 +200,38 @@ extern "C" { // Gyoto::Register::init(); } + void + Y_gyoto_requirePlugin(int argc) + { + // Step 1: determine whether nofail is set (to true) + int nofail=0; + static char const * knames[2] = { "nofail", 0 }; + static long kglobs[2]; + int kiargs[1]; + yarg_kw_init(const_cast(knames), kglobs, kiargs); + int iarg=argc-1; + while (iarg>=0) { + iarg = yarg_kw(iarg, kglobs, kiargs); + iarg--; + } + if (kiargs[0]>=0) {// nofail= present + nofail=yarg_true(kiargs[0]); + } + + // Step 2: load plug-ins + long ntot=0; + long dims[Y_DIMSIZE]; + ystring_t * plugins = 0; + for (iarg=argc-1; iarg>=0; iarg--) { + if (kiargs[0]<0 ||(iarg!=kiargs[0] && iarg!=kiargs[0]+1)) { + plugins = ygeta_q(iarg, &ntot, dims); + for (long i=0; i plugin; \ + if (argc >= 2 && yarg_string(argc-2)) { \ + long ntot=0; \ + ystring_t * plugs = ygeta_q(argc-2, &ntot, NULL); \ + for (size_t i=0; i