Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
waLBerla
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Zikeli
waLBerla
Commits
24b97bf9
Commit
24b97bf9
authored
4 months ago
by
Philipp Suffa
Browse files
Options
Downloads
Patches
Plain Diff
Fixed Callback Segfault in the python coupling
parent
fdf956a2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AUTHORS.txt
+1
-0
1 addition, 0 deletions
AUTHORS.txt
src/python_coupling/PythonCallback.cpp
+6
-4
6 additions, 4 deletions
src/python_coupling/PythonCallback.cpp
with
7 additions
and
4 deletions
AUTHORS.txt
+
1
−
0
View file @
24b97bf9
...
...
@@ -31,6 +31,7 @@ Matthias Markl
Michael Kuron
Nils Kohl
Paulo Carvalho
Philipp Suffa
Regina Ammer
Sagar Dolas
Sebastian Eibl
...
...
This diff is collapsed.
Click to expand it.
src/python_coupling/PythonCallback.cpp
+
6
−
4
View file @
24b97bf9
...
...
@@ -87,10 +87,11 @@ namespace python_coupling {
PythonCallback
::
PythonCallback
(
const
std
::
string
&
fileOrModuleName
,
const
std
::
string
&
functionName
,
const
std
::
vector
<
std
::
string
>
&
argv
)
:
functionName_
(
functionName
)
,
exposedVars_
(
new
DictWrapper
()
),
callbackDict_
(
new
DictWrapper
()
)
:
functionName_
(
functionName
)
{
Manager
::
instance
()
->
triggerInitialization
();
exposedVars_
=
make_shared
<
DictWrapper
>
();
callbackDict_
=
make_shared
<
DictWrapper
>
();
namespace
py
=
pybind11
;
// Add empty callbacks module
...
...
@@ -102,10 +103,11 @@ namespace python_coupling {
PythonCallback
::
PythonCallback
(
const
std
::
string
&
functionName
)
:
functionName_
(
functionName
)
,
exposedVars_
(
new
DictWrapper
()
),
callbackDict_
(
new
DictWrapper
()
)
:
functionName_
(
functionName
)
{
Manager
::
instance
()
->
triggerInitialization
();
exposedVars_
=
make_shared
<
DictWrapper
>
();
callbackDict_
=
make_shared
<
DictWrapper
>
();
// Add empty callbacks module
py
::
object
callbackModule
=
py
::
module
::
import
(
"walberla_cpp.callbacks"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment