Flow123d
JS_before_hm-1709-g5393e92e3
|
Go to the documentation of this file.
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
static constexpr bool value
Dedicated class for storing path to input and output files.
Space< spacedim >::Point Point
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
static const int registrar
Registrar of class to factory.
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
FieldAlgorithmBase< spacedim, Value > FactoryBaseType
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
FieldAlgorithmBase< spacedim, Value >::Point Point