18 #ifndef LIBMESH_WRAPPED_PETSC_H 19 #define LIBMESH_WRAPPED_PETSC_H 21 #include "libmesh/libmesh_config.h" 23 #ifdef LIBMESH_HAVE_PETSC 105 std::swap(tmp, *
this);
117 T *
get() {
return &
obj; }
125 operator T()
const {
return obj; }
147 operator bool()
const {
return obj !=
nullptr; }
180 #endif // LIBMESH_HAVE_PETSC void reset_to_zero()
Calls destroy() and sets the managed object to nullptr.
WrappedPetsc()
Default constructor.
The libMesh namespace provides an interface to certain functionality in the library.
~WrappedPetsc()
Destructor.
WrappedPetsc & operator=(const WrappedPetsc &)=delete
T & operator*()
The "dereferencing" operator.
WrappedPetsc(WrappedPetsc &&other) noexcept
Move constructor.
WrappedPetsc(T obj_in)
Constructor which initializes obj to a specific passed-in value.
void destroy()
Must be specialized to call the appropriate XXXDestroy() routine in order for a WrappedPetsc<T> objec...