... | ... | @@ -84,34 +84,28 @@ Looking at the imports of other bindings, we note |
|
|
py::module::import("dune.xt.functions._functions_interfaces_grid_function_3d");
|
|
|
```
|
|
|
which might be the source of the error.
|
|
|
This is easily checked by running the imports in an ipython shell
|
|
|
~~This is easily checked by running the imports in an ipython shell~~
|
|
|
```python
|
|
|
import dune.xt.functions._functions_interfaces_grid_function_1d
|
|
|
import dune.xt.functions._functions_interfaces_grid_function_2d
|
|
|
import dune.xt.functions._functions_interfaces_grid_function_3d
|
|
|
```
|
|
|
|
|
|
In our example, the first line already triggers the failure, so the actual problem is already in the `_functions_interfaces_grid_function_1d` target.
|
|
|
This is of course weird, since that target is supposed to bind the interface for 1d grids, while the name `GridFunctionInterface2dSimplexAlunonconformgridTo1d` suggest a 2d grid.
|
|
|
|
|
|
## start over
|
|
|
|
|
|
Now we more or less start the same process again, but using the `_functions_interfaces_grid_function_1d` target instead of `_functions_checkerboard`.
|
|
|
|
|
|
I will continue the concrete example but being more brief, the ideas are similar to above.
|
|
|
|
|
|
* look at `python/dune/xt/functions/CMakeLists.txt`
|
|
|
* find that the `_functions_interfaces_grid_function_1d` target is built by `python/dune/xt/functions/interfaces/grid-function_1d.cc`
|
|
|
|
|
|
### make sure we import the correct `.so`
|
|
|
|
|
|
* make some whitespace change to `python/dune/xt/functions/interfaces/grid-function_1d.cc`
|
|
|
* compile the `_functions_interfaces_grid_function_1d` target again
|
|
|
**Edit: the above is wrong**. We just see the same error when importing `dune.xt.functions` here.
|
|
|
So we need to find the location of the `.so`s, in my example I can simply
|
|
|
* go to the build dir, e.g. `cd envs/$DXT_ENVIRONMENT/build-$OPTS/dune-xt/python/dune/xt/functions`
|
|
|
* make sure there is something like `_functions_interfaces_grid_function_1d.cpython-38-x86_64-linux-gnu.so` with a recent date
|
|
|
* import the `.so` directly in that folder:
|
|
|
```python
|
|
|
python -c "import _functions_interfaces_grid_function_1d"
|
|
|
import _functions_interfaces_grid_function_1d
|
|
|
import _functions_interfaces_grid_function_2d
|
|
|
import _functions_interfaces_grid_function_2d
|
|
|
```
|
|
|
|
|
|
In my example, this works without error, *sigh*. |
|
|
\ No newline at end of file |
|
|
I now get the error when importing `_functions_interfaces_grid_function_2d`, so
|
|
|
* either the `_functions_interfaces_grid_function_1d` target binds 2d stuff, or
|
|
|
* the `_functions_interfaces_grid_function_2d` target binds something twice.
|
|
|
|
|
|
|
|
|
## start over
|
|
|
|
|
|
Now we more or less start the same process again, but using the `_functions_interfaces_grid_function_1d` target or `_functions_interfaces_grid_function_2d` instead of `_functions_checkerboard`. |
|
|
\ No newline at end of file |