$extrastylesheet
Dakota
Version 6.2
|
Public Member Functions | |
PythonInterface (const ProblemDescDB &problem_db) | |
constructor | |
~PythonInterface () | |
destructor | |
Protected Member Functions | |
virtual int | derived_map_ac (const String &ac_name) |
execute an analysis code portion of a direct evaluation invocation | |
int | python_run (const String &ac_name) |
direct interface to Python via API, BMA 07/02/07 | |
template<class ArrayT , class Size > | |
bool | python_convert_int (const ArrayT &src, Size size, PyObject **dst) |
convert arrays of integer types to Python list or numpy array | |
bool | python_convert (const RealVector &src, PyObject **dst) |
convert RealVector to Python list or numpy array | |
bool | python_convert (const RealVector &c_src, const IntVector &di_src, const RealVector &dr_src, PyObject **dst) |
convert RealVector + IntVector + RealVector to Python mixed list or numpy double array | |
template<class StringArrayT > | |
bool | python_convert_strlist (const StringArrayT &src, PyObject **dst) |
convert labels | |
bool | python_convert (const StringMultiArray &c_src, const StringMultiArray &di_src, const StringMultiArray &dr_src, PyObject **dst) |
convert all labels to single list | |
bool | python_convert (PyObject *pyv, RealVector &rv, const int &dim) |
convert python [list of int or float] or [numpy array of double] to RealVector (for fns) | |
bool | python_convert (PyObject *pyv, double *rv, const int &dim) |
convert python [list of int or float] or [numpy array of double] to double[], for use as helper in converting gradients | |
bool | python_convert (PyObject *pym, RealMatrix &rm) |
convert python [list of lists of int or float] or [numpy array of dbl] to RealMatrix (for gradients) | |
bool | python_convert (PyObject *pym, RealSymMatrix &rm) |
convert python [list of lists of int or float] or [numpy array of dbl] to RealMatrix (used as helper in Hessian conversion) | |
bool | python_convert (PyObject *pyma, RealSymMatrixArray &rma) |
convert python [list of lists of lists of int or float] or [numpy array of double] to RealSymMatrixArray (for Hessians) | |
Protected Attributes | |
bool | userNumpyFlag |
whether the user requested numpy data structures in the input file | |
bool | ownPython |
true if this class created the interpreter instance |
Specialization of DirectApplicInterface to link to Python analysis drivers. Includes convenience functions to map data to/from Python
int derived_map_ac | ( | const String & | ac_name | ) | [protected, virtual] |
execute an analysis code portion of a direct evaluation invocation
Python specialization of derived analysis components.
Reimplemented from DirectApplicInterface.
References ApplicationInterface::analysisServerId, and PythonInterface::python_run().
bool python_convert_int | ( | const ArrayT & | src, |
Size | sz, | ||
PyObject ** | dst | ||
) | [protected] |
convert arrays of integer types to Python list or numpy array
convert all integer array types including IntVector, ShortArray, and SizetArray to Python list of ints or numpy array of ints
References PythonInterface::userNumpyFlag.
Referenced by PythonInterface::python_run().