diff --git a/notebooks/Test.ipynb b/notebooks/Test.ipynb index ea85feac..6283e47e 100644 --- a/notebooks/Test.ipynb +++ b/notebooks/Test.ipynb @@ -13,6 +13,18 @@ "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", "Populating the interactive namespace from numpy and matplotlib\n" ] + }, + { + "ename": "ImportError", + "evalue": "/home/wolfman/miniconda3/lib/python3.12/site-packages/pyiga-0.1.0-py3.12-linux-x86_64.egg/pyiga/fast_assemble_cy.cpython-312-x86_64-linux-gnu.so: undefined symbol: _Z16fast_assemble_2dPFdmmPvES_mimidiiiiRSt6vectorImSaImEES5_RS2_IdSaIdEE", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[1], line 5\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mscipy\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msparse\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m coo_matrix, csr_matrix, csc_matrix, block_diag, identity, hstack\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmatplotlib\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpyplot\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mplt\u001b[39;00m\n\u001b[0;32m----> 5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpyiga\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m assemble, bspline, vform, geometry, vis, solvers, utils, topology, algebra, quadrature\n\u001b[1;32m 6\u001b[0m \u001b[38;5;66;03m#from sksparse.cholmod import cholesky\u001b[39;00m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mpyiga\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m adaptive \u001b[38;5;28;01mas\u001b[39;00m adap\n", + "File \u001b[0;32m~/miniconda3/lib/python3.12/site-packages/pyiga-0.1.0-py3.12-linux-x86_64.egg/pyiga/assemble.py:115\u001b[0m\n\u001b[1;32m 113\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m assemble_tools\n\u001b[1;32m 114\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m assemblers\n\u001b[0;32m--> 115\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m fast_assemble_cy\n\u001b[1;32m 116\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m tensor\n\u001b[1;32m 117\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m operators\n", + "\u001b[0;31mImportError\u001b[0m: /home/wolfman/miniconda3/lib/python3.12/site-packages/pyiga-0.1.0-py3.12-linux-x86_64.egg/pyiga/fast_assemble_cy.cpython-312-x86_64-linux-gnu.so: undefined symbol: _Z16fast_assemble_2dPFdmmPvES_mimidiiiiRSt6vectorImSaImEES5_RS2_IdSaIdEE" + ] } ], "source": [ diff --git a/notebooks/multipatch.ipynb b/notebooks/multipatch.ipynb index 1d850ae2..ef29c4ed 100755 --- a/notebooks/multipatch.ipynb +++ b/notebooks/multipatch.ipynb @@ -58,15 +58,15 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "setting up constraints took 0.00635981559753418 seconds.\n", - "Basis setup took 0.0038449764251708984 seconds\n" + "setting up constraints took 0.006209373474121094 seconds.\n", + "Basis setup took 0.022143125534057617 seconds\n" ] }, { @@ -117,7 +117,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -141,6 +141,13 @@ "MP.plot(u, range = (0, 1.5e-1), cmap='viridis')" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null, diff --git a/pyiga/fast_assemble_cy.pyx b/pyiga/fast_assemble_cy.pyx index cc39a6f2..0a90a67e 100644 --- a/pyiga/fast_assemble_cy.pyx +++ b/pyiga/fast_assemble_cy.pyx @@ -32,7 +32,6 @@ cdef extern void fast_assemble_3d_cimpl "fast_assemble_3d"( # # Imports end # - # this is so that IPython notebooks can capture the output cdef void _stdout_log_func(const char * s, size_t nbytes) noexcept: import sys diff --git a/pyiga/fastasm.cc b/pyiga/fastasm.cc index 687a3a07..cf936bea 100644 --- a/pyiga/fastasm.cc +++ b/pyiga/fastasm.cc @@ -55,7 +55,7 @@ void cout_logfunc(const char * str, size_t) FunctionStringBuf log_stringbuf(cout_logfunc); std::ostream logger(&log_stringbuf); -extern "C" void set_log_func(LogFuncPtr logfunc) +extern void set_log_func(LogFuncPtr logfunc) { if (logfunc) log_stringbuf.set_func(logfunc); @@ -698,7 +698,7 @@ void inflate_3d(const Array3D& X, // Main entry points //////////////////////////////////////////////////////////////////////////////// -extern "C" void fast_assemble_2d( +extern void fast_assemble_2d( // matrix specification MatrixEntryFn entryfunc, void * data, @@ -728,7 +728,7 @@ extern "C" void fast_assemble_2d( } -extern "C" void fast_assemble_3d( +extern void fast_assemble_3d( // matrix specification MatrixEntryFn entryfunc, void * data, @@ -757,4 +757,4 @@ extern "C" void fast_assemble_3d( inflate_3d(X, sparsidx0, sparsidx1, sparsidx2, block_sizes, entries_i, entries_j, entries); -} +} \ No newline at end of file