- Thank you received: 0
Integral over product space
4 years 5 months ago - 4 years 5 months ago #2751
by philipp
Replied by philipp on topic Integral over product space
Hi,
that is exactly what I was expecting, thus the confusion.
The zip is attached. I kept all paths as in my configuration and
commented out a "fix" (namely explicitely binding CoefficientFunction)
that shouldn't be necessary.
To my further confusion, importing ngsolve in python doesn't help.
All the best,
Philipp
that is exactly what I was expecting, thus the confusion.
The zip is attached. I kept all paths as in my configuration and
commented out a "fix" (namely explicitely binding CoefficientFunction)
that shouldn't be necessary.
To my further confusion, importing ngsolve in python doesn't help.
All the best,
Philipp
Attachments:
Last edit: 4 years 5 months ago by philipp.
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 5 months ago - 4 years 5 months ago #2753
by christopher
Replied by christopher on topic Integral over product space
Hi, after commenting out your stuff in the CMakeLists.txt it worked for me.
Do you use a self compiled ngsolve or the installer?
Do you use a self compiled ngsolve or the installer?
Last edit: 4 years 5 months ago by christopher.
4 years 5 months ago - 4 years 5 months ago #2754
by philipp
Replied by philipp on topic Integral over product space
Do you mean the CoefficientFunction export? With this, it works for me too, but this should be done with the ngsolve import already, right? It was just a "dirty" fix of mine and was not part of the "mylittlengsolve" example.
I compiled my own version.
It is okay for me to export the ngsolve core classes manually. I just thought this might later cause problems since I got something wrong.
I compiled my own version.
It is okay for me to export the ngsolve core classes manually. I just thought this might later cause problems since I got something wrong.
Last edit: 4 years 5 months ago by philipp.
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 5 months ago - 4 years 5 months ago #2755
by christopher
Replied by christopher on topic Integral over product space
No, what I mean I just commented out the setting of the python executable with your hard paths and so (this should actually automatically be set correctly with the find_package(NGSolve))
You should only need this in your CMakeLists.txt:
There should be no need to export any of the ngsolve core functionality
You should only need this in your CMakeLists.txt:
Code:
project(mylittlengsolve)
cmake_minimum_required(VERSION 3.1)
find_package(NGSolve CONFIG REQUIRED
HINTS path_to_ngsolve_dir)
add_ngsolve_python_module(myngspy myngspy.cpp
1_myFEM/myCoefficient.cpp
)
install(TARGETS myngspy DESTINATION .)
There should be no need to export any of the ngsolve core functionality
Last edit: 4 years 5 months ago by christopher.
4 years 5 months ago #2756
by philipp
Replied by philipp on topic Integral over product space
Ah, sorry. It's been a long day. You already stated that quite clearly.
I have to check this. I added the python paths
since my system is on python 3.8, but my ngsolve is based on python 3.7.
The python paths I specify are all correct (I just checked). Removing them causes me another error
I think this is highly related to my setup and so I don't want to bother you with this anymore. Can you maybe just tell me what python path(s) would be responsible for the correct loading of the pybind11 code for the ngsolve internal classes?
Thank you very much for your time!
Philipp
I have to check this. I added the python paths
since my system is on python 3.8, but my ngsolve is based on python 3.7.
The python paths I specify are all correct (I just checked). Removing them causes me another error
Code:
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): SystemError: <built-in method __contains__ of dict object at 0x7fccec96fc80> returned a result with an error set
Caught SIGABRT: usually caused by abort() or assert()
Thank you very much for your time!
Philipp
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 5 months ago #2757
by christopher
Replied by christopher on topic Integral over product space
If you use python 3.8 you should build ngsolve against 3.8 as well, since ngsolve/pybind needs to link against the correct python libraries.
I guess you have 2 python versions around and ngsolve and your module find different ones which messes everything up
I guess you have 2 python versions around and ngsolve and your module find different ones which messes everything up
The following user(s) said Thank You: philipp
Time to create page: 0.128 seconds