-
Notifications
You must be signed in to change notification settings - Fork 2
Questions and Answers
Jacob Fields edited this page Jun 10, 2020
·
4 revisions
- I keep getting Python errors when trying to compile OOPS-2D or run the
genParams.pyscript!- OOPS-2D requires Python 3.0 or later to compile because of the
genParams.pyscript. Python 2.7 will not work. If you're getting errors with a more recent version of Python, please let me know.
- OOPS-2D requires Python 3.0 or later to compile because of the
- Why do you use smart pointers like
std::shared_ptrin some places? Don't they slow down the code?-
Not really. Allocation and destruction are marginally slower with
std::make_sharedthan a complex pointer, but it's not enough to make much of a difference. Memory in OOPS-2D is already structured to minimize the number of times it gets allocated or deallocated because it's painfully slow, even with raw pointers. If it makes you feel any better, raw pointers are still used in complex data structures likeSolverDataandODEData, and MPI communication (which has the most frequent allocations and deallocations) is done with raw pointers out of necessity. In my opinion, the better safety for a marginally slower allocation is worth the trade-off.
-
Not really. Allocation and destruction are marginally slower with
- Can you add (random feature)?
- Possibly. My goal is to keep OOPS-2D simple and easy-to-use. If it enhances ease-of-use, sure. If it doesn't, you're better off forking the project and adding it yourself.