v0.8.20
Public Member Functions | Private Attributes | List of all members
MoFEM::PairNameFEMethodPtr Struct Reference

#include <src/petsc/AuxPETSc.hpp>

Inherits pair< std::string, FEMethod *>.

Public Member Functions

 PairNameFEMethodPtr (std::string name, FEMethod *ptr)
 
 PairNameFEMethodPtr (std::string name, boost::shared_ptr< FEMethod > &ptr)
 
virtual ~PairNameFEMethodPtr ()
 
boost::shared_ptr< BasicMethodgetSharedPtr () const
 

Private Attributes

boost::shared_ptr< FEMethodfePtr
 

Detailed Description

Definition at line 24 of file AuxPETSc.hpp.

Constructor & Destructor Documentation

◆ PairNameFEMethodPtr() [1/2]

MoFEM::PairNameFEMethodPtr::PairNameFEMethodPtr ( std::string  name,
FEMethod ptr 
)

Definition at line 26 of file AuxPETSc.hpp.

27  : std::pair<std::string, FEMethod *>(name, ptr) {}

◆ PairNameFEMethodPtr() [2/2]

MoFEM::PairNameFEMethodPtr::PairNameFEMethodPtr ( std::string  name,
boost::shared_ptr< FEMethod > &  ptr 
)

Definition at line 28 of file AuxPETSc.hpp.

29  : std::pair<std::string, FEMethod *>(name, ptr.get()), fePtr(ptr) {}
boost::shared_ptr< FEMethod > fePtr
Definition: AuxPETSc.hpp:40

◆ ~PairNameFEMethodPtr()

virtual MoFEM::PairNameFEMethodPtr::~PairNameFEMethodPtr ( )
virtual

Definition at line 30 of file AuxPETSc.hpp.

30 {}

Member Function Documentation

◆ getSharedPtr()

boost::shared_ptr<BasicMethod> MoFEM::PairNameFEMethodPtr::getSharedPtr ( ) const

Definition at line 32 of file AuxPETSc.hpp.

32  {
33  if (!fePtr)
34  THROW_MESSAGE("Shared pointer not set. You have to be using raw "
35  "pointer, that is unsafe.");
36  return fePtr;
37  }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:618
boost::shared_ptr< FEMethod > fePtr
Definition: AuxPETSc.hpp:40

Member Data Documentation

◆ fePtr

boost::shared_ptr<FEMethod> MoFEM::PairNameFEMethodPtr::fePtr
private

Definition at line 40 of file AuxPETSc.hpp.


The documentation for this struct was generated from the following file: