Block-Structured AMR Software Framework
amrex::btUnit Class Reference

#include <AMReX_Bittree.H>

Static Public Member Functions

static int btRefine (bittree::BittreeAmr *mesh, std::vector< int > &btTags, int max_crse, int lbase, Vector< BoxArray > &grids, Vector< DistributionMapping > &dmap, MPI_Comm comm)
 
static void btCalculateGrids (bittree::BittreeAmr *mesh, int lbase, int &new_finest, Vector< BoxArray > &new_grids, Vector< IntVect > const &max_grid_size)
 
static void btCalculateLevel (bittree::BittreeAmr *mesh, int lev, BoxArray &ba, IntVect const &max_grid_size)
 
static int getBitid (bittree::BittreeAmr *mesh, bool updated, int lev, int idx_on_lev)
 
static int getIndex (bittree::BittreeAmr *mesh, bool updated, int lev, int bitid)
 

Static Public Attributes

static bool bcPeriodic [AMREX_SPACEDIM]
 

Static Private Member Functions

static void btCheckRefine (bittree::BittreeAmr *mesh, std::vector< int > &btTags, int max_crse, int lbase, Vector< BoxArray > &grids, Vector< DistributionMapping > &dmap, MPI_Comm comm)
 
static void btCheckDerefine (bittree::BittreeAmr *mesh, std::vector< int > &btTags, int max_crse, int lbase, Vector< BoxArray > &grids, Vector< DistributionMapping > &dmap, MPI_Comm comm)
 
static bool checkNeighborsRefine (bittree::BittreeAmr *mesh, bittree::MortonTree::Block b)
 
static std::vector< intneighIntCoords (bittree::BittreeAmr *mesh, unsigned lev, unsigned const *lcoord, int const *gCell)
 

Member Function Documentation

◆ btCalculateGrids()

void amrex::btUnit::btCalculateGrids ( bittree::BittreeAmr *  mesh,
int  lbase,
int new_finest,
Vector< BoxArray > &  new_grids,
Vector< IntVect > const &  max_grid_size 
)
static

Creates new box arrays to match the new Bittree mesh.

◆ btCalculateLevel()

void amrex::btUnit::btCalculateLevel ( bittree::BittreeAmr *  mesh,
int  lev,
BoxArray ba,
IntVect const &  max_grid_size 
)
static

Creates a box array based on Bittree.

◆ btCheckDerefine()

void amrex::btUnit::btCheckDerefine ( bittree::BittreeAmr *  mesh,
std::vector< int > &  btTags,
int  max_crse,
int  lbase,
Vector< BoxArray > &  grids,
Vector< DistributionMapping > &  dmap,
MPI_Comm  comm 
)
staticprivate

Implements the logic which ensures the generated Bittree adheres to a strict octree structure with no more than one level difference between surrounding leaf blocks.

◆ btCheckRefine()

void amrex::btUnit::btCheckRefine ( bittree::BittreeAmr *  mesh,
std::vector< int > &  btTags,
int  max_crse,
int  lbase,
Vector< BoxArray > &  grids,
Vector< DistributionMapping > &  dmap,
MPI_Comm  comm 
)
staticprivate

Implements the logic which ensures the generated Bittree adheres to a strict octree structure with no more than one level difference between surrounding leaf blocks.

◆ btRefine()

int amrex::btUnit::btRefine ( bittree::BittreeAmr *  mesh,
std::vector< int > &  btTags,
int  max_crse,
int  lbase,
Vector< BoxArray > &  grids,
Vector< DistributionMapping > &  dmap,
MPI_Comm  comm 
)
static

New Bittree mesh is generated.

This makes use of BT library functions and as well as routines adapted from Flash-X that enforce Octree nesting.

◆ checkNeighborsRefine()

bool amrex::btUnit::checkNeighborsRefine ( bittree::BittreeAmr *  mesh,
bittree::MortonTree::Block  b 
)
staticprivate

◆ getBitid()

int amrex::btUnit::getBitid ( bittree::BittreeAmr *  mesh,
bool  updated,
int  lev,
int  idx_on_lev 
)
static

◆ getIndex()

int amrex::btUnit::getIndex ( bittree::BittreeAmr *  mesh,
bool  updated,
int  lev,
int  bitid 
)
static

◆ neighIntCoords()

std::vector< int > amrex::btUnit::neighIntCoords ( bittree::BittreeAmr *  mesh,
unsigned  lev,
unsigned const *  lcoord,
int const *  gCell 
)
staticprivate

Calculate integer coordinates of neighbors, taking into account BCs. Currently assuming Periodic in all directions.

Member Data Documentation

◆ bcPeriodic

bool amrex::btUnit::bcPeriodic
static

The documentation for this class was generated from the following files: