Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::AMReX Class Reference

Runtime context stored for each active amrex::Initialize() call. More...

#include <AMReX.H>

Public Member Functions

 AMReX ()
 ~AMReX ()
 AMReX (AMReX const &)=delete
 AMReX (AMReX &&)=delete
AMReX & operator= (AMReX const &)=delete
AMReX & operator= (AMReX &&)=delete
Geometry * getDefaultGeometry () noexcept
 Geometry owned by this context (constructed with the AMReX object).

Static Public Member Functions

static bool empty () noexcept
 True if no AMReX instances are registered on the stack.
static int size () noexcept
 Number of managed instances currently tracked (Initialize depth).
static AMReX * top () noexcept
 Pointer to the most recently pushed instance.
static void push (AMReX *pamrex)
 Transfer ownership of an existing AMReX* into the stack.
static void push (std::unique_ptr< AMReX > pamrex)
 Push a freshly created AMReX instance stored in a unique_ptr.
static void erase (AMReX *pamrex)
 Remove a specific instance pointer from the internal stack.

Detailed Description

Runtime context stored for each active amrex::Initialize() call.

Instances live on an internal stack so nested initialization sequences can cooperate.

Constructor & Destructor Documentation

◆ AMReX() [1/3]

amrex::AMReX::AMReX ( )

◆ ~AMReX()

amrex::AMReX::~AMReX ( )

◆ AMReX() [2/3]

amrex::AMReX::AMReX ( AMReX const & )
delete

◆ AMReX() [3/3]

amrex::AMReX::AMReX ( AMReX && )
delete

Member Function Documentation

◆ empty()

bool amrex::AMReX::empty ( )
inlinestaticnoexcept

True if no AMReX instances are registered on the stack.

◆ erase()

void amrex::AMReX::erase ( AMReX * pamrex)
static

Remove a specific instance pointer from the internal stack.

◆ getDefaultGeometry()

Geometry * amrex::AMReX::getDefaultGeometry ( )
inlinenodiscardnoexcept

Geometry owned by this context (constructed with the AMReX object).

◆ operator=() [1/2]

AMReX & amrex::AMReX::operator= ( AMReX && )
delete

◆ operator=() [2/2]

AMReX & amrex::AMReX::operator= ( AMReX const & )
delete

◆ push() [1/2]

void amrex::AMReX::push ( AMReX * pamrex)
static

Transfer ownership of an existing AMReX* into the stack.

If the pointer already lives in the stack, it is rotated to the top.

Parameters
pamrexRaw pointer previously allocated with new AMReX.

◆ push() [2/2]

void amrex::AMReX::push ( std::unique_ptr< AMReX > pamrex)
static

Push a freshly created AMReX instance stored in a unique_ptr.

◆ size()

int amrex::AMReX::size ( )
inlinestaticnoexcept

Number of managed instances currently tracked (Initialize depth).

◆ top()

AMReX * amrex::AMReX::top ( )
inlinestaticnoexcept

Pointer to the most recently pushed instance.


The documentation for this class was generated from the following files:
  • /home/runner/work/amrex/amrex/Src/Base/AMReX.H
  • /home/runner/work/amrex/amrex/Src/Base/AMReX.cpp