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

#include <src/petsc/AuxPETSc.hpp>

Inherits std::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, and nonlinear_dynamics.cpp.

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]

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

Definition at line 29 of file AuxPETSc.hpp.

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

◆ ~PairNameFEMethodPtr()

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

Definition at line 31 of file AuxPETSc.hpp.

31{}

Member Function Documentation

◆ getSharedPtr()

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

Definition at line 33 of file AuxPETSc.hpp.

33 {
34 if (!fePtr)
35 THROW_MESSAGE("Shared pointer not set. You have to be using raw "
36 "pointer, that is unsafe.");
37 return fePtr;
38 }
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:574

Member Data Documentation

◆ fePtr

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

Definition at line 41 of file AuxPETSc.hpp.


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