Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan714 committed Oct 24, 2024
1 parent 3a5f42c commit 6699d27
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
12 changes: 12 additions & 0 deletions notebooks/Test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
15 changes: 11 additions & 4 deletions notebooks/multipatch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down Expand Up @@ -117,7 +117,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion pyiga/fast_assemble_cy.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions pyiga/fastasm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -698,7 +698,7 @@ void inflate_3d(const Array3D<double>& X,
// Main entry points
////////////////////////////////////////////////////////////////////////////////

extern "C" void fast_assemble_2d(
extern void fast_assemble_2d(
// matrix specification
MatrixEntryFn entryfunc,
void * data,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -757,4 +757,4 @@ extern "C" void fast_assemble_3d(

inflate_3d(X, sparsidx0, sparsidx1, sparsidx2, block_sizes,
entries_i, entries_j, entries);
}
}

0 comments on commit 6699d27

Please sign in to comment.