fcFEM - FEA from start to finish
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: fcFEM - FEA from start to finish
Awesome!!!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: fcFEM - FEA from start to finish
Tried on Win10.
First it needs numba.
Then It needs sksparse. I found https://scikit-sparse.readthedocs.io/en ... olmod.html#
It is hosted at https://github.com/scikit-sparse/scikit-sparse.
scikit-sparse needs suite-sparse.
Tried to install suite-sparse as admin like this and the error is:
Then tried to install scikit-sparse and the error is:
The main error above is:
Is this Python.h file from Python?
Anyone has an idea to install scikit-sparse?
First it needs numba.
Then It needs sksparse. I found https://scikit-sparse.readthedocs.io/en ... olmod.html#
It is hosted at https://github.com/scikit-sparse/scikit-sparse.
scikit-sparse needs suite-sparse.
Tried to install suite-sparse as admin like this and the error is:
Code: Select all
D:\FreeCAD_weekly-builds-29485-2022-07-11-conda-Windows-x86_64-py38\bin>python -m pip install suite-sparse
ERROR: Could not find a version that satisfies the requirement suite-sparse (from versions: none)
ERROR: No matching distribution found for suite-sparse
Code: Select all
D:\FreeCAD_weekly-builds-29485-2022-07-11-conda-Windows-x86_64-py38\bin>python -m pip install scikit-sparse
Collecting scikit-sparse
Using cached scikit-sparse-0.4.6.tar.gz (209 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.13.3 in d:\freecad_weekly-builds-29485-2022-07-11-conda-windows-x86_64-py38\bin\lib\site-packages (from scikit-sparse) (1.22.4)
Requirement already satisfied: scipy>=0.19 in d:\freecad_weekly-builds-29485-2022-07-11-conda-windows-x86_64-py38\bin\lib\site-packages (from scikit-sparse) (1.8.1)
Building wheels for collected packages: scikit-sparse
Building wheel for scikit-sparse (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for scikit-sparse (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\sksparse
copying sksparse\test_cholmod.py -> build\lib.win-amd64-cpython-38\sksparse
copying sksparse\__init__.py -> build\lib.win-amd64-cpython-38\sksparse
creating build\lib.win-amd64-cpython-38\sksparse\test_data
copying sksparse\test_data\illc1033.mtx.gz -> build\lib.win-amd64-cpython-38\sksparse\test_data
copying sksparse\test_data\illc1033_rhs1.mtx.gz -> build\lib.win-amd64-cpython-38\sksparse\test_data
copying sksparse\test_data\illc1850.mtx.gz -> build\lib.win-amd64-cpython-38\sksparse\test_data
copying sksparse\test_data\illc1850_rhs1.mtx.gz -> build\lib.win-amd64-cpython-38\sksparse\test_data
copying sksparse\test_data\well1033.mtx.gz -> build\lib.win-amd64-cpython-38\sksparse\test_data
copying sksparse\test_data\well1033_rhs1.mtx.gz -> build\lib.win-amd64-cpython-38\sksparse\test_data
copying sksparse\test_data\well1850.mtx.gz -> build\lib.win-amd64-cpython-38\sksparse\test_data
copying sksparse\test_data\well1850_rhs1.mtx.gz -> build\lib.win-amd64-cpython-38\sksparse\test_data
running build_ext
building 'sksparse.cholmod' extension
creating build\temp.win-amd64-cpython-38
creating build\temp.win-amd64-cpython-38\Release
creating build\temp.win-amd64-cpython-38\Release\sksparse
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Isksparse -IC:\Users\Pete\AppData\Local\Temp\pip-build-env-hgja2bc3\overlay\Lib\site-packages\numpy\core\include -ID:\FreeCAD_weekly-builds-29485-2022-07-11-conda-Windows-x86_64-py38\bin/include -I/usr/include/suitesparse -ID:\FreeCAD_weekly-builds-29485-2022-07-11-conda-Windows-x86_64-py38\bin\include -ID:\FreeCAD_weekly-builds-29485-2022-07-11-conda-Windows-x86_64-py38\bin\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" /Tcsksparse/cholmod.c /Fobuild\temp.win-amd64-cpython-38\Release\sksparse/cholmod.obj
cholmod.c
sksparse/cholmod.c(32): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scikit-sparse
Failed to build scikit-sparse
ERROR: Could not build wheels for scikit-sparse, which is required to install pyproject.toml-based projects
D:\FreeCAD_weekly-builds-29485-2022-07-11-conda-Windows-x86_64-py38\bin>
Code: Select all
sksparse/cholmod.c(32): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
Anyone has an idea to install scikit-sparse?
Re: fcFEM - FEA from start to finish
No responses yet. Assuming this is still a problem, from memory, I just got it from https://libraries.io/pypi/scikit-sparse with
Code: Select all
pip install scikit-sparse==0.4.6
This worked for me out of the box (but I am on Ubuntu)
Re: fcFEM - FEA from start to finish
scikit-sparse not working under Windows.
Re: fcFEM - FEA from start to finish
I will make a version that does not depend on it.
Re: fcFEM - FEA from start to finish
Thank you very much.
Re: fcFEM - FEA from start to finish
I tried numpy.linalg.solve(matrix,vector) instead and find that in a simple elastic analysis the solution time increases by a factor 120.
So, we really need to use Cholesky decomposition of the stiffness matrix with forward/back substitution in subsequent iterations. I looked around but can't find any ready-made libraries apart from CHOLMOD, which unfortunately requires SCIKIT-SPARSE. There are some helpful websites that explain how to build this for Windows, but I can't try those because I don't have a Windows machine (anymore).
Alternatively, you could run this on a Linux emulator for Windows. That's how I used to work before I switched to a Linux machine.
Sorry, not much else I can do to remedy this.
Re: fcFEM - FEA from start to finish
hm, is there not a conda fc-version also for windows?
that should make it possible to install the sparse with conda-forge channel.
that should make it possible to install the sparse with conda-forge channel.
-
- Posts: 23
- Joined: Wed Apr 20, 2022 9:06 pm
Re: fcFEM - FEA from start to finish
I would be interested in testing this on Windows as well, if someone manages to get this working, any tips will be apriciated.