WarpX
Functions | Variables
callbacks.cpp File Reference
#include "callbacks.H"
#include <cstdlib>
#include <exception>
#include <iostream>

Functions

void InstallPythonCallback (const std::string &name, std::function< void()> callback)
 Function to install the given name and function in warpx_callback_py_map. More...
 
bool IsPythonCallbackInstalled (const std::string &name)
 Function to check if the given name is a key in warpx_callback_py_map. More...
 
void ExecutePythonCallback (const std::string &name)
 Function to look for and execute Python callbacks. More...
 
void ClearPythonCallback (const std::string &name)
 Function to clear the given callback name from warpx_callback_py_map. More...
 

Variables

std::map< std::string, std::function< void()> > warpx_callback_py_map
 

Function Documentation

◆ ClearPythonCallback()

void ClearPythonCallback ( const std::string &  name)

Function to clear the given callback name from warpx_callback_py_map.

◆ ExecutePythonCallback()

void ExecutePythonCallback ( const std::string &  name)

Function to look for and execute Python callbacks.

◆ InstallPythonCallback()

void InstallPythonCallback ( const std::string &  name,
std::function< void()>  callback 
)

Function to install the given name and function in warpx_callback_py_map.

◆ IsPythonCallbackInstalled()

bool IsPythonCallbackInstalled ( const std::string &  name)

Function to check if the given name is a key in warpx_callback_py_map.

Variable Documentation

◆ warpx_callback_py_map

std::map< std::string, std::function<void()> > warpx_callback_py_map

Declare global map to hold python callback functions.

The keys of the map describe at what point in the simulation the python functions will be called. See WarpX/Python/pywarpx/callbacks.py for a list of currently supported callback names.