intrusive_ptr for managing petsc objects
More...
#include <include/PetscSmartObj.hpp>
|
using | Derived = boost::intrusive_ptr< typename std::remove_pointer< OBJ >::type > |
|
template<typename OBJ>
struct MoFEM::SmartPetscObj< OBJ >
intrusive_ptr for managing petsc objects
It manages destruction, referencing and dereferencing petsc objects. It is similar how smart_ptr pointers works, but applied for petsc objects like Vec, DM, Mat, etc.
- Template Parameters
-
- Examples
- approx_sphere.cpp, dynamic_first_order_con_law.cpp, plastic.cpp, schur_test_diag_mat.cpp, shallow_wave.cpp, and test_broken_space.cpp.
Definition at line 82 of file PetscSmartObj.hpp.
◆ Derived
◆ SmartPetscObj() [1/2]
◆ SmartPetscObj() [2/2]
Construct a new Smart Petsc Obj object.
- Note
- If add_red is set to true, you have to destroy OBJ.
- Parameters
-
Definition at line 99 of file PetscSmartObj.hpp.
◆ operator OBJ()
◆ operator PetscObject()
Definition at line 105 of file PetscSmartObj.hpp.
106 return reinterpret_cast<PetscObject
>(this->get());
◆ use_count()
The documentation for this struct was generated from the following file: