ARTEMIS
Functions
WarpXSumGuardCells.H File Reference
#include "Utils/WarpXAlgorithmSelection.H"
#include <ablastr/utils/Communication.H>
#include <AMReX_MultiFab.H>

Go to the source code of this file.

Functions

void WarpXSumGuardCells (amrex::MultiFab &mf, const amrex::Periodicity &period, const amrex::IntVect &src_ngrow, const int icomp=0, const int ncomp=1)
 Sum the values of mf, where the different boxes overlap (i.e. in the guard cells) More...
 
void WarpXSumGuardCells (amrex::MultiFab &dst, amrex::MultiFab &src, const amrex::Periodicity &period, const amrex::IntVect &src_ngrow, const int icomp=0, const int ncomp=1)
 Sum the values of src where the different boxes overlap (i.e. in the guard cells) and copy them into dst More...
 

Function Documentation

◆ WarpXSumGuardCells() [1/2]

void WarpXSumGuardCells ( amrex::MultiFab dst,
amrex::MultiFab src,
const amrex::Periodicity period,
const amrex::IntVect src_ngrow,
const int  icomp = 0,
const int  ncomp = 1 
)
inline

Sum the values of src where the different boxes overlap (i.e. in the guard cells) and copy them into dst

This is typically called for the sources of the Maxwell equations (J/rho) after deposition from the macroparticles + filtering.

  • When WarpX is used with a finite-difference scheme: this only updates the valid cells of dst
  • When WarpX is used with a spectral scheme (PSATD): this updates both the valid cells and guard cells. (This is because a spectral solver requires the value of the sources over a large stencil.)

Note: i_comp is the component where the results will be stored in dst; The component from which we copy in src is always 0.

◆ WarpXSumGuardCells() [2/2]

void WarpXSumGuardCells ( amrex::MultiFab mf,
const amrex::Periodicity period,
const amrex::IntVect src_ngrow,
const int  icomp = 0,
const int  ncomp = 1 
)
inline

Sum the values of mf, where the different boxes overlap (i.e. in the guard cells)

This is typically called for the sources of the Maxwell equations (J/rho) after deposition from the macroparticles.

  • When WarpX is used with a finite-difference scheme: this only updates the valid cells of mf
  • When WarpX is used with a spectral scheme (PSATD): this updates both the valid cells and guard cells. (This is because a spectral solver requires the value of the sources over a large stencil.)