Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
Namespaces | Functions
magnetic_divergence.h File Reference

Contains the declaration for the functions that compute the magnetic divergence. More...

#include "../global/global.h"
#include "../global/global_cuda.h"
#include "../grid/grid3D.h"
#include "../utils/gpu.hpp"
Include dependency graph for magnetic_divergence.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mhd
 Namespace for MHD code.
 

Functions

__global__ void mhd::calculateMagneticDivergence (Real const *dev_conserved, Real *maxDivergence, Real const dx, Real const dy, Real const dz, int const nx, int const ny, int const nz, int const n_cells)
 Kernel to compute the maximum divergence of the magnetic field in the grid. Uses reduction_utilities::gridReduceMax and as such should be called with the minimum number of blocks. Recommend using the occupancy API.
 
Real mhd::checkMagneticDivergence (Grid3D const &G)
 Compute the maximum magnetic divergence in the grid and report an error if it exceeds the magnetic divergence limit or is negative. The magnetic divergence limit is 1E-14 as determined by Athena as a reasonable upper bound for correctness.
 

Detailed Description

Contains the declaration for the functions that compute the magnetic divergence.

Author
Robert 'Bob' Caddy (rvc@p.nosp@m.itt..nosp@m.edu)