Block-Structured AMR Software Framework
 
Loading...
Searching...
No Matches
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 <cstring>
#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

namespace  amrex
 
namespace  amrex::system
 

Typedefs

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

Enumerations

enum struct  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 ()
 
AMReXamrex::Initialize (MPI_Comm mpi_comm, std::ostream &a_osout=std::cout, std::ostream &a_oserr=std::cerr, ErrorHandler a_errhandler=nullptr, int a_device_id=-1)
 
AMReXamrex::Initialize (int &argc, char **&argv, const std::function< void()> &func_parm_parse, std::ostream &a_osout=std::cout, std::ostream &a_oserr=std::cerr, ErrorHandler a_errhandler=nullptr, int a_device_id=-1)
 
AMReXamrex::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, int a_device_id=-1)
 
void amrex::Init_minimal (MPI_Comm mpi_comm)
 
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.
 
void amrex::Finalize (AMReX *pamrex)
 
void amrex::Finalize ()
 
void amrex::Finalize_minimal ()
 
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.
 
void amrex::ExecOnInitialize (std::function< void()>)
 
template<class... Ts>
__host__ __device__ void amrex::ignore_unused (const Ts &...)
 This shuts up the compiler about unused variables.
 
void amrex::Error (const std::string &msg)
 Print out message to cerr and exit via amrex::Abort().
 
void amrex::Error_host (const char *type, const char *msg)
 
__host__ __device__ void amrex::Error (const char *msg=nullptr)
 
void amrex::Warning (const std::string &msg)
 Print out warning message to cerr.
 
void amrex::Warning_host (const char *msg)
 
__host__ __device__ void amrex::Warning (const char *msg)
 
void amrex::Abort (const std::string &msg)
 Print out message to cerr and exit via abort().
 
__host__ __device__ void amrex::Abort (const char *msg=nullptr)
 
void amrex::Assert_host (const char *EX, const char *file, int line, const char *msg, std::size_t msg_size=0)
 Prints assertion failed messages to cerr and exits via abort(). Intended for use by the BL_ASSERT() macro in <AMReX_BLassert.H>.
 
__host__ __device__ void amrex::Assert (const char *EX, const char *file, int line)
 
__host__ __device__ void amrex::Assert (const char *EX, const char *file, int line, const char *msg)
 
void amrex::Assert (const char *EX, const char *file, int line, const std::string &msg)
 
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.
 
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.
 
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.
 
FPExcept amrex::setFPExcept (FPExcept excepts)
 
FPExcept amrex::disableFPExcept (FPExcept excepts)
 Disable FP exceptions. Linux Only.
 
FPExcept amrex::enableFPExcept (FPExcept excepts)
 Enable FP exceptions. Linux Only.
 

Variables

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