On 08/24/2018 08:22 AM, [email protected] wrote:

Thank you. Is there any particular reason that these raw pointers are not exposed outside ? It would make it much easier for people who would like to solve using their own solvers on gpu's and hybrid systems much easier, right ?

But it would also make it far easier for people to shoot themselves in the foot by relying on internal data structures :-)

One of the principles of object oriented programming is "encapsulation". That means offering a well-designed interface to internal data structures. This way, *how* exactly the data is internally stored is not something a user has to know; indeed, if we wanted to change the way data is stored internally, users would not even notice because they cannot see these internals anyway. As a consequence, your program will continue to work even though the internals changed -- something that happens all the time in deal.II and most other software packages.

https://en.wikipedia.org/wiki/Encapsulation_(computer_programming)
https://en.wikipedia.org/wiki/Information_hiding

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to