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);
125 operator T()
const {
return obj; }
147 operator bool()
const {
return obj !=
nullptr; }
The libMesh namespace provides an interface to certain functionality in the library.
void reset_to_zero()
Calls destroy() and sets the managed object to nullptr.
T & operator*()
The "dereferencing" operator.
WrappedPetsc(T obj_in)
Constructor which initializes obj to a specific passed-in value.
WrappedPetsc(const WrappedPetsc &other)=delete
Copy constructor and copy assignment operator.
WrappedPetsc(WrappedPetsc &&other) noexcept
Move constructor.
WrappedPetsc()
Default constructor.
void destroy()
Must be specialized to call the appropriate XXXDestroy() routine in order for a WrappedPetsc<T> objec...
WrappedPetsc & operator=(const WrappedPetsc &)=delete
~WrappedPetsc()
Destructor.