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 67 of file AuxPETSc.hpp.

Constructor & Destructor Documentation

◆ PairNameFEMethodPtr() [1/2]

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

Definition at line 69 of file AuxPETSc.hpp.

70  : 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 72 of file AuxPETSc.hpp.

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

◆ ~PairNameFEMethodPtr()

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

Definition at line 74 of file AuxPETSc.hpp.

74 {}

Member Function Documentation

◆ getSharedPtr()

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

Definition at line 76 of file AuxPETSc.hpp.

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

Member Data Documentation

◆ fePtr

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

Definition at line 84 of file AuxPETSc.hpp.


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