20 #ifndef FIELD_PYTHON_HH_ 21 #define FIELD_PYTHON_HH_ 45 template <
int spacedim,
class Value>
56 DECLARE_EXCEPTION( ExcNoPythonSupport, <<
"Flow123d compiled without support for Python, FieldPython can not be used.\n" );
57 DECLARE_EXCEPTION( ExcNoPythonInit, <<
"Either 'script_string' or 'script_file' has to be specified in PythonField initialization.\n" );
58 DECLARE_EXCEPTION( ExcInvalidCompNumber, <<
"Field " << EI_FuncName::qval <<
" from the python module: " << EI_PModule::val
59 <<
" returns " << EI_Size::val <<
" components but should return " << EI_ValueSize::val <<
" components.\n" );
71 void set_python_field_from_file(
const FilePath &file_name,
const string &func_name);
76 void set_python_field_from_string(
const string &python_source,
const string &func_name);
99 void set_func(
const string &func_name);
106 #ifdef FLOW123D_HAVE_PYTHON 109 mutable PyObject *p_args_;
110 mutable PyObject *p_value_;
111 #endif // FLOW123D_HAVE_PYTHON FieldAlgorithmBase< spacedim, Value >::Point Point
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
static constexpr bool value
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
Space< spacedim >::Point Point
static const int registrar
Registrar of class to factory.
Dedicated class for storing path to input and output files.
FieldAlgorithmBase< spacedim, Value > FactoryBaseType