v0.8.23
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)
 
template<typename FEMETHOD >
 PairNameFEMethodPtr (std::string name, boost::shared_ptr< FEMETHOD > ptr)
 
virtual ~PairNameFEMethodPtr ()
 
boost::shared_ptr< BasicMethodgetSharedPtr () const
 

Private Attributes

boost::shared_ptr< FEMethodfePtr
 

Detailed Description

Examples
EshelbianPlasticity.cpp.

Definition at line 71 of file AuxPETSc.hpp.

Constructor & Destructor Documentation

◆ PairNameFEMethodPtr() [1/2]

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

Definition at line 73 of file AuxPETSc.hpp.

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

◆ PairNameFEMethodPtr() [2/2]

template<typename FEMETHOD >
MoFEM::PairNameFEMethodPtr::PairNameFEMethodPtr ( std::string  name,
boost::shared_ptr< FEMETHOD >  ptr 
)

Definition at line 76 of file AuxPETSc.hpp.

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

◆ ~PairNameFEMethodPtr()

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

Definition at line 78 of file AuxPETSc.hpp.

78 {}

Member Function Documentation

◆ getSharedPtr()

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

Definition at line 80 of file AuxPETSc.hpp.

80  {
81  if (!fePtr)
82  THROW_MESSAGE("Shared pointer not set. You have to be using raw "
83  "pointer, that is unsafe.");
84  return fePtr;
85  }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620
boost::shared_ptr< FEMethod > fePtr
Definition: AuxPETSc.hpp:88

Member Data Documentation

◆ fePtr

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

Definition at line 88 of file AuxPETSc.hpp.


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