Comments (5)
I think that the problem you are having is that you create the cylinder as a local variable in fill_parts()
, so it gets destroyed at the end of the function. Try making the cylinder a member of the class instead.
from gpusph.
I tried to duplicate the pattern of defining objects like what exists in "OdeObjects" example (because I am totally newbie in GPUSPH!). So, why the objects in OdeObjects examples are not destroyed and the example runs well?
from gpusph.
Because in OdeObjects
the Sphere and Cylinder are declared as members of the class (see OdeObjects.h
), and only initialized in fill_parts()
; hence, the object persists as long as OdeObjects
is instantiated (which is throughout the whole simulation). Instead, in your example you declare the object in fill_parts()
, so by C++ scoping rules it gets destroyed at the end of the function.
from gpusph.
I already declared the cylinder in the header file (look at the Gprobe.hh file in the repository I created). However for being sure, even I declared the parameters for mass, radius, ect of cylinder in the header and assigned them in the class of the example in the cc file (not in the fill_parts() ).
However, I still get this error.
Maybe I am doing something like newbie mistake!?
from gpusph.
If it's still segfaulting you'll have to compile the host code in debug mode (add a CXXFLAGS=-g to your Makefile.local, then run a make cpuclean and then make again) and use gdb to track the cause of segmentation fault.
from gpusph.
Related Issues (20)
- How to reference GPUSPH properly for a paper? HOT 2
- Formulation for wave height is wrong in WaveMaker.cu (NEXT branch)
- DEM does not work with "DUMMY_BOUNDARY" (NEXT branch)
- DEM shift does not behave as it should HOT 1
- Errors about running the examples HOT 3
- How to set up the paddle motions for irregular waves?
- about the function addSTLmesh() HOT 6
- about floating and boundary with addXYZFile HOT 2
- Compile gpusph in nsight eclipse(cuda toolkit) HOT 1
- About the makefile problem. HOT 7
- Segment fault in `IntializeChrono()` HOT 3
- About the gpu-architecture HOT 2
- About the moored floating bodies HOT 2
- cannot open the .vtp file using paraview. HOT 3
- Illegal memory access was encountered HOT 4
- I have too many errors about the cuh file , when i "make test" this source code. HOT 7
- About inlet and outlet bounddaries
- An compile error: Texture is not a template HOT 3
- GPUSPH compiling-"SetMaxItersSolverSpeed" error HOT 10
- WaveTank fails on next and spheric2022 branches HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpusph.