KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Namespaces | Macros | Typedefs | Functions
smart_pointers.h File Reference
#include <iostream>
#include <utility>
#include <memory>
#include "intrusive_ptr/intrusive_ptr.hpp"
Include dependency graph for smart_pointers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Kratos
 REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
 

Macros

#define KRATOS_CLASS_POINTER_DEFINITION(a)
 
#define KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(a)
 

Typedefs

template<class T >
using Kratos::shared_ptr = std::shared_ptr< T >
 
template<class T >
using Kratos::weak_ptr = std::weak_ptr< T >
 
template<class T >
using Kratos::unique_ptr = std::unique_ptr< T >
 

Functions

template<typename C , typename... Args>
intrusive_ptr< C > Kratos::make_intrusive (Args &&...args)
 
template<typename C , typename... Args>
shared_ptr< C > Kratos::make_shared (Args &&...args)
 
template<typename C , typename... Args>
unique_ptr< C > Kratos::make_unique (Args &&...args)
 
template<class T >
std::ostream & Kratos::operator<< (std::ostream &rOStream, const Kratos::weak_ptr< T > &rData)
 
template<class T >
std::ostream & Kratos::operator<< (std::ostream &rOStream, const Kratos::intrusive_ptr< T > &rData)
 

Macro Definition Documentation

◆ KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION

#define KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION (   a)
Value:
typedef typename Kratos::intrusive_ptr<a > Pointer; \
typedef Kratos::GlobalPointer<a > WeakPointer; \
typedef Kratos::unique_ptr<a > UniquePointer; \
typename a::Pointer shared_from_this(){ return a::Pointer(this); }
This class is a wrapper for a pointer to a data that is located in a different rank.
Definition: global_pointer.h:44
std::unique_ptr< T > unique_ptr
Definition: smart_pointers.h:33

◆ KRATOS_CLASS_POINTER_DEFINITION

#define KRATOS_CLASS_POINTER_DEFINITION (   a)
Value:
typedef Kratos::shared_ptr<a > Pointer; \
typedef Kratos::shared_ptr<a > SharedPointer; \
typedef Kratos::weak_ptr<a > WeakPointer; \
typedef Kratos::unique_ptr<a > UniquePointer
std::weak_ptr< T > weak_ptr
Definition: smart_pointers.h:30
std::shared_ptr< T > shared_ptr
Definition: smart_pointers.h:27