1010#include < bout/physicsmodel.hxx>
1111#include < bout/smoothing.hxx>
1212
13-
1413#include < chrono>
1514using namespace std ::chrono;
1615
17-
1816void initPythonModule (PyObject **pModule, PyObject **pInitFlow, PyObject **pFindLESTerms) {
1917
2018
@@ -25,7 +23,19 @@ void initPythonModule(PyObject **pModule, PyObject **pInitFlow, PyObject **pFind
2523
2624 // set Python system path
2725 PyObject *sys_path = PySys_GetObject (" path" );
28- PyList_Append (sys_path, PyUnicode_FromString (" ../../../../StylES/bout_interfaces/" ));
26+
27+ PyObject *repr = PyObject_Repr (sys_path); // sys_path -> string object
28+ // const char *str = PyUnicode_AsUTF8(repr); // get UTF-8 C string
29+ // printf("current sys_path %s\n", str);
30+ Py_XDECREF (repr);
31+
32+ PyList_Append (sys_path,
33+ PyUnicode_FromString (" /lus/lfs1aip2/home/u5ai/jcastagna.u5ai/Turbulence_with_Style/PhaseV_FCL1/codes/StylES-PyTorch/bout_interfaces/" ));
34+
35+ repr = PyObject_Repr (sys_path);
36+ // str = PyUnicode_AsUTF8(repr);
37+ // printf("modified sys_path %s\n", str);
38+ Py_XDECREF (repr);
2939
3040 // Import Python module
3141 *pModule = PyImport_ImportModule (" pBOUT" );
@@ -54,14 +64,17 @@ void initPythonModule(PyObject **pModule, PyObject **pInitFlow, PyObject **pFind
5464 fprintf (stderr, " Python function not found!\n " );
5565 }
5666
57-
5867 return ;
5968
6069}
6170
6271
6372
6473
74+
75+
76+
77+
6578double * initFlow (double dx, double dy, Field3D n, Field3D phi, Field3D vort, PyObject *pModule, PyObject *pInitFlow) {
6679
6780 // local variables
0 commit comments