Block-Structured AMR Software Framework
AMReX_MultiFabUtil.cpp File Reference
#include <AMReX_MultiFabUtil.H>
#include <AMReX_Random.H>
#include <sstream>
#include <iostream>

Namespaces

 amrex
 

Functions

void amrex::average_node_to_cellcenter (MultiFab &cc, int dcomp, const MultiFab &nd, int scomp, int ncomp, int ngrow=0)
 Average nodal-based MultiFab onto cell-centered MultiFab. More...
 
void amrex::average_edge_to_cellcenter (MultiFab &cc, int dcomp, const Vector< const MultiFab * > &edge, int ngrow=0)
 Average edge-based MultiFab onto cell-centered MultiFab. More...
 
void amrex::average_face_to_cellcenter (MultiFab &cc, int dcomp, const Vector< const MultiFab * > &fc, int ngrow=0)
 Average face-based MultiFab onto cell-centered MultiFab. More...
 
void amrex::average_face_to_cellcenter (MultiFab &cc, const Vector< const MultiFab * > &fc, const Geometry &geom)
 Average face-based MultiFab onto cell-centered MultiFab with geometric weighting. More...
 
void amrex::average_face_to_cellcenter (MultiFab &cc, const Array< const MultiFab *, AMREX_SPACEDIM > &fc, const Geometry &geom)
 Average face-based MultiFab onto cell-centered MultiFab with geometric weighting. More...
 
void amrex::average_cellcenter_to_face (const Vector< MultiFab * > &fc, const MultiFab &cc, const Geometry &geom, int ncomp=1, bool use_harmonic_averaging=false)
 Average cell-centered MultiFab onto face-based MultiFab with geometric weighting. More...
 
void amrex::average_cellcenter_to_face (const Array< MultiFab *, AMREX_SPACEDIM > &fc, const MultiFab &cc, const Geometry &geom, int ncomp=1, bool use_harmonic_averaging=false)
 Average cell-centered MultiFab onto face-based MultiFab with geometric weighting. More...
 
void amrex::average_down (const MultiFab &S_fine, MultiFab &S_crse, const Geometry &fgeom, const Geometry &cgeom, int scomp, int ncomp, int rr)
 
void amrex::average_down (const MultiFab &S_fine, MultiFab &S_crse, const Geometry &fgeom, const Geometry &cgeom, int scomp, int ncomp, const IntVect &ratio)
 Volume weighed average of fine MultiFab onto coarse MultiFab. More...
 
void amrex::sum_fine_to_coarse (const MultiFab &S_fine, MultiFab &S_crse, int scomp, int ncomp, const IntVect &ratio, const Geometry &cgeom, const Geometry &)
 
void amrex::average_down_edges (const Vector< const MultiFab * > &fine, const Vector< MultiFab * > &crse, const IntVect &ratio, int ngcrse=0)
 Average fine edge-based MultiFab onto crse edge-based MultiFab. More...
 
void amrex::average_down_edges (const Array< const MultiFab *, AMREX_SPACEDIM > &fine, const Array< MultiFab *, AMREX_SPACEDIM > &crse, const IntVect &ratio, int ngcrse)
 
void amrex::average_down_edges (const MultiFab &fine, MultiFab &crse, const IntVect &ratio, int ngcrse)
 
void amrex::print_state (const MultiFab &mf, const IntVect &cell, int n=-1, const IntVect &ng=IntVect::TheZeroVector())
 Output state data for a single zone. More...
 
void amrex::writeFabs (const MultiFab &mf, const std::string &name)
 Write each fab individually. More...
 
void amrex::writeFabs (const MultiFab &mf, int comp, int ncomp, const std::string &name)
 
MultiFab amrex::ToMultiFab (const iMultiFab &imf)
 Convert iMultiFab to MultiFab. More...
 
FabArray< BaseFab< Long > > amrex::ToLongMultiFab (const iMultiFab &imf)
 Convert iMultiFab to Long. More...
 
std::unique_ptr< MultiFabamrex::get_slice_data (int dir, Real coord, const MultiFab &cc, const Geometry &geom, int start_comp, int ncomp, bool interpolate, RealBox const &bnd_rbx)
 
iMultiFab amrex::makeFineMask (const BoxArray &cba, const DistributionMapping &cdm, const BoxArray &fba, const IntVect &ratio, int crse_value, int fine_value)
 
template<typename FAB >
void amrex::makeFineMask_doit (FabArray< FAB > &mask, const BoxArray &fba, const IntVect &ratio, Periodicity const &period, typename FAB::value_type crse_value, typename FAB::value_type fine_value)
 
iMultiFab amrex::makeFineMask (const BoxArray &cba, const DistributionMapping &cdm, const IntVect &cnghost, const BoxArray &fba, const IntVect &ratio, Periodicity const &period, int crse_value, int fine_value)
 
MultiFab amrex::makeFineMask (const BoxArray &cba, const DistributionMapping &cdm, const BoxArray &fba, const IntVect &ratio, Real crse_value, Real fine_value)
 
void amrex::computeDivergence (MultiFab &divu, const Array< MultiFab const *, AMREX_SPACEDIM > &umac, const Geometry &geom)
 Computes divergence of face-data stored in the umac MultiFab. More...
 
void amrex::computeGradient (MultiFab &grad, const Array< MultiFab const *, AMREX_SPACEDIM > &umac, const Geometry &geom)
 Computes gradient of face-data stored in the umac MultiFab. More...
 
MultiFab amrex::periodicShift (MultiFab const &mf, IntVect const &offset, Periodicity const &period)
 Periodic shift MultiFab. More...
 
Gpu::HostVector< Real > amrex::sumToLine (MultiFab const &mf, int icomp, int ncomp, Box const &domain, int direction, bool local=false)
 Sum MultiFab data to line. More...
 
Real amrex::volumeWeightedSum (Vector< MultiFab const * > const &mf, int icomp, Vector< Geometry > const &geom, Vector< IntVect > const &ratio, bool local=false)
 Volume weighted sum for a vector of MultiFabs. More...
 
void amrex::FourthOrderInterpFromFineToCoarse (MultiFab &cmf, int scomp, int ncomp, MultiFab const &fmf, IntVect const &ratio)
 Fourth-order interpolation from fine to coarse level. More...
 
void amrex::FillRandom (MultiFab &mf, int scomp, int ncomp)
 Fill MultiFab with random numbers from uniform distribution. More...
 
void amrex::FillRandomNormal (MultiFab &mf, int scomp, int ncomp, Real mean, Real stddev)
 Fill MultiFab with random numbers from normal distribution. More...
 
Vector< MultiFabamrex::convexify (Vector< MultiFab const * > const &mf, Vector< IntVect > const &refinement_ratio)
 Convexify AMR data. More...