Block-Structured AMR Software Framework
amrex::MFUtil Namespace Reference

Classes

struct  SymmetricGhost
 General collection of MultiFab utilities. More...
 
struct  AsymmetricGhost
 

Functions

template<typename T , template< typename > class Cpy>
duplicate (const BoxArray &ba, const DistributionMapping &dm, const T &mf_in)
 
template<typename T , template< typename > class Cpy>
duplicate (const BoxArray &ba, const DistributionMapping &dm, const T &mf_in, const Periodicity &periodicity)
 
template<typename T >
regrid (const BoxArray &ba, const DistributionMapping &dm, const T &mf_in, bool regrid_ghost=false)
 
template<typename T >
void regrid (T &mf_out, const BoxArray &ba, const DistributionMapping &dm, const T &mf_in, bool regrid_ghost=false)
 
template<typename T >
void regrid (T &mf_out, const BoxArray &ba, const DistributionMapping &dm, const FabFactory< FArrayBox > &eb_factory, const T &mf_in, bool regrid_ghost=false)
 

Function Documentation

◆ duplicate() [1/2]

template<typename T , template< typename > class Cpy>
T amrex::MFUtil::duplicate ( const BoxArray ba,
const DistributionMapping dm,
const T &  mf_in 
)

Duplicate class T (which must be either of type MultiFab or iMultiFab) using a new BoxArray and DistributionMapping. Data from the source (mf_in) is copied using a ParallelCopy (ghost cells are treated based on the Cpy class (which is either SymmetricGhost or AsymmetricGhost)).

◆ duplicate() [2/2]

template<typename T , template< typename > class Cpy>
T amrex::MFUtil::duplicate ( const BoxArray ba,
const DistributionMapping dm,
const T &  mf_in,
const Periodicity periodicity 
)

Duplicate class T (which must be either of type MultiFab or iMultiFab) using a new BoxArray and DistributionMapping. Data from the source (mf_in) is copied using a ParallelCopy (ghost cells are treated based on the Cpy class (which is either SymmetricGhost or AsymmetricGhost)). Following the copy operation, a FillBoundary operation is called.

◆ regrid() [1/3]

template<typename T >
T amrex::MFUtil::regrid ( const BoxArray ba,
const DistributionMapping dm,
const T &  mf_in,
bool  regrid_ghost = false 
)

Regrid (by duplication) class T (which must be either of type MultiFab or iMultiFab) using the new BoxArray and DistributionMapping. The boolean flag regrid_ghost switched between the SymmetricGhost and AsymmetricGhost copy functions.

◆ regrid() [2/3]

template<typename T >
void amrex::MFUtil::regrid ( T &  mf_out,
const BoxArray ba,
const DistributionMapping dm,
const FabFactory< FArrayBox > &  eb_factory,
const T &  mf_in,
bool  regrid_ghost = false 
)

Regrid (by duplication) class T. The T-object at the end of the reference mf_out is re-defined using the EBFArrayBoxFactory provided by eb_factory. The boolean flag regrid_ghost switched between the SymmetricGhost and AsymmetricGhost copy functions.

◆ regrid() [3/3]

template<typename T >
void amrex::MFUtil::regrid ( T &  mf_out,
const BoxArray ba,
const DistributionMapping dm,
const T &  mf_in,
bool  regrid_ghost = false 
)

Regrid (by duplication) class T (which must be either of type MultiFab or iMultiFab) using the new BoxArray and DistributionMapping. The T-object at the end of the pointer mf_out is re-defined. The boolean flag regrid_ghost switched between the SymmetricGhost and AsymmetricGhost copy functions.