Block-Structured AMR Software Framework
AMReX.H File Reference
#include <AMReX_Config.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_GpuPrint.H>
#include <AMReX_GpuAssert.H>
#include <AMReX_ccse-mpi.H>
#include <AMReX_Exception.H>
#include <AMReX_Extension.H>
#include <cstdint>
#include <functional>
#include <iostream>
#include <memory>
#include <string>
#include <type_traits>
#include <vector>

Go to the source code of this file.

Classes

class  amrex::AMReX
 

Namespaces

 amrex
 
 amrex::system
 

Typedefs

using amrex::PTR_TO_VOID_FUNC = void(*)()
 
using amrex::ErrorHandler = void(*)(const char *)
 

Enumerations

enum class  amrex::FPExcept : std::uint8_t {
  amrex::none = 0B0000 , amrex::invalid = 0B0001 , amrex::zero = 0B0010 , amrex::overflow = 0B0100 ,
  amrex::all = 0B0111
}
 

Functions

std::string amrex::Version ()
 
AMReX * amrex::Initialize (MPI_Comm mpi_comm, std::ostream &a_osout=std::cout, std::ostream &a_oserr=std::cerr, ErrorHandler a_errhandler=nullptr)
 
AMReX * amrex::Initialize (int &argc, char **&argv, bool build_parm_parse=true, MPI_Comm mpi_comm=MPI_COMM_WORLD, const std::function< void()> &func_parm_parse={}, std::ostream &a_osout=std::cout, std::ostream &a_oserr=std::cerr, ErrorHandler a_errhandler=nullptr)
 
bool amrex::Initialized ()
 Returns true if there are any currently-active and initialized AMReX instances (i.e. one for which amrex::Initialize has been called, and amrex::Finalize has not). Otherwise false. More...
 
void amrex::Finalize (AMReX *pamrex)
 
void amrex::Finalize ()
 
void amrex::ExecOnFinalize (std::function< void()>)
 We maintain a stack of functions that need to be called in Finalize(). The functions are called in LIFO order. The idea here is to allow classes to clean up any "global" state that they maintain when we're exiting from AMReX. More...
 
void amrex::ExecOnInitialize (std::function< void()>)
 
template<class... Ts>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::ignore_unused (const Ts &...)
 This shuts up the compiler about unused variables. More...
 
void amrex::Error (const std::string &msg)
 Print out message to cerr and exit via amrex::Abort(). More...
 
void amrex::Error_host (const char *type, const char *msg)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::Error (const char *msg=nullptr)
 
void amrex::Warning (const std::string &msg)
 Print out warning message to cerr. More...
 
void amrex::Warning_host (const char *msg)
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::Warning (const char *msg)
 
void amrex::Abort (const std::string &msg)
 Print out message to cerr and exit via abort(). More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::Abort (const char *msg=nullptr)
 
void amrex::Assert_host (const char *EX, const char *file, int line, const char *msg)
 Prints assertion failed messages to cerr and exits via abort(). Intended for use by the BL_ASSERT() macro in <AMReX_BLassert.H>. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void amrex::Assert (const char *EX, const char *file, int line, const char *msg=nullptr)
 
void amrex::write_to_stderr_without_buffering (const char *str)
 This is used by amrex::Error(), amrex::Abort(), and amrex::Assert() to ensure that when writing the message to stderr, that no additional heap-based memory is allocated. More...
 
void amrex::SetErrorHandler (ErrorHandler f)
 
std::ostream & amrex::OutStream ()
 
std::ostream & amrex::ErrorStream ()
 
int amrex::Verbose () noexcept
 
void amrex::SetVerbose (int v) noexcept
 
bool amrex::InitSNaN () noexcept
 
void amrex::SetInitSNaN (bool v) noexcept
 
std::string amrex::get_command ()
 
int amrex::command_argument_count ()
 
std::string amrex::get_command_argument (int number)
 Get command line arguments. The executable name is the zero-th argument. Return empty string if there are not that many arguments. std::string. More...
 
void amrex::GccPlacater ()
 
bool amrex::any (FPExcept a)
 
FPExcept amrex::operator| (FPExcept a, FPExcept b)
 
FPExcept amrex::operator& (FPExcept a, FPExcept b)
 
FPExcept amrex::getFPExcept ()
 Return currently enabled FP exceptions. Linux only. More...
 
FPExcept amrex::setFPExcept (FPExcept excepts)
 
FPExcept amrex::disableFPExcept (FPExcept excepts)
 Disable FP exceptions. Linux Only. More...
 
FPExcept amrex::enableFPExcept (FPExcept excepts)
 Enable FP exceptions. Linux Only. More...
 

Variables

constexpr bool amrex::system::NDebug = true
 
constexpr bool amrex::system::Debug = false