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

#include <src/petsc/AuxPETSc.hpp>

Inheritance diagram for MoFEM::PairNameFEMethodPtr:
[legend]
Collaboration diagram for MoFEM::PairNameFEMethodPtr:
[legend]

Public Member Functions

 PairNameFEMethodPtr (std::string name, FEMethod *ptr)
 
template<typename FEMETHOD >
 PairNameFEMethodPtr (std::string name, boost::shared_ptr< FEMETHOD > ptr)
 
virtual ~PairNameFEMethodPtr ()=default
 
boost::shared_ptr< BasicMethodgetSharedPtr () const
 

Private Attributes

boost::shared_ptr< FEMethodfePtr
 

Detailed Description

Examples
EshelbianPlasticity.cpp, and nonlinear_dynamics.cpp.

Definition at line 12 of file AuxPETSc.hpp.

Constructor & Destructor Documentation

◆ PairNameFEMethodPtr() [1/2]

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

Definition at line 14 of file AuxPETSc.hpp.

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

◆ PairNameFEMethodPtr() [2/2]

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

Definition at line 17 of file AuxPETSc.hpp.

18  : std::pair<std::string, FEMethod *>(name, ptr.get()), fePtr(ptr) {}

◆ ~PairNameFEMethodPtr()

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

Member Function Documentation

◆ getSharedPtr()

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

Definition at line 22 of file AuxPETSc.hpp.

22  {
23  if (!fePtr)
24  THROW_MESSAGE("Shared pointer not set. You have to be using raw "
25  "pointer, that is unsafe.");
26  return fePtr;
27  }

Member Data Documentation

◆ fePtr

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

Definition at line 30 of file AuxPETSc.hpp.


The documentation for this struct was generated from the following file:
MoFEM::PairNameFEMethodPtr::fePtr
boost::shared_ptr< FEMethod > fePtr
Definition: AuxPETSc.hpp:30
THROW_MESSAGE
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:574