AMR Grid.
More...
#include <Proto_AMRGrid.H>
|
| AMRGrid () |
| Trivial Constructor. More...
|
|
| AMRGrid (const std::vector< DisjointBoxLayout > &a_layouts, const std::vector< Point > &a_refRatios, int a_maxLevels) |
| Multi-Level Constructor. More...
|
|
| AMRGrid (const DisjointBoxLayout &a_layout, const std::vector< Point > &a_refRatios, int a_maxLevels) |
| Single-Level Constructor. More...
|
|
void | define (const std::vector< DisjointBoxLayout > &a_layouts, const std::vector< Point > &a_refRatios, int a_maxLevels) |
| Multi-Level Define. More...
|
|
void | define (const DisjointBoxLayout &a_layout, const std::vector< Point > &a_refRatios, int a_maxLevels) |
| Single-Level Define. More...
|
|
const DisjointBoxLayout & | operator[] (unsigned int a_level) const |
| Layout Access (Const) More...
|
|
DisjointBoxLayout & | operator[] (unsigned int a_level) |
| Layout Access (Non-Const) More...
|
|
void | regrid (LevelTagData &a_tags, unsigned int a_level, Point a_boxSize) |
| Regrid. More...
|
|
void | regrid (LevelTagData &a_tags, unsigned int a_level) |
|
void | enforceNesting (unsigned int a_level, int a_nestingDistance=1) |
| Enforce Nesting. More...
|
|
void | enforceNesting2 (unsigned int a_level, int a_nestingDistance=1) |
| Trim a_level grids so that they properly nest in a_level-1 grids. More...
|
|
int | numLevels () const |
| Query Number of Levels. More...
|
|
int | maxLevels () const |
| Query Max Number of Levels. More...
|
|
Point | refRatio (int a_level) const |
| Query Refinement Ratio. More...
|
|
bool | compatible (const AMRGrid &a_grid) const |
| Query Compatibility. More...
|
|
void | addFinerGrids (LevelTagData &a_tags, int a_level) |
| Augments set of a_level tags by set intersecting a_level+2 grids. More...
|
|
void | addFinerTags (LevelTagData &a_tags, unsigned int a_level) |
|
void | print () const |
|
|
template<typename T , unsigned int C = 1, MemType MEM = MEMTYPE_DEFAULT, Centering CTR = PR_CELL> |
static void | computeTags (LevelTagData &a_tags, LevelBoxData< T, C, MEM, CTR > &a_data, Point a_bufferSize, T a_threshold, unsigned int a_comp=0) |
| Compute Tags. More...
|
|
template<typename T , unsigned int C = 1, MemType MEM = MEMTYPE_DEFAULT, Centering CTR = PR_CELL> |
static void | computeTags (LevelTagData &a_tags, LevelBoxData< T, C, MEM, CTR > &a_data, int a_bufferSize, T a_threshold, unsigned int a_comp=0) |
| Compute Tags (Isotropic) More...
|
|
static void | buffer (LevelTagData &a_tags, Point a_bufferSize) |
| Buffer Tags. More...
|
|
static void | buffer (LevelTagData &a_tags, int a_bufferSize) |
| Buffer Tags (Isotropic) More...
|
|
AMR Grid.
AMRGrid is a collection of DisjointBoxLayout objects that define properly nested unions of logically rectangular space.
◆ AMRGrid() [1/3]
Proto::AMRGrid::AMRGrid |
( |
| ) |
|
|
inline |
◆ AMRGrid() [2/3]
Proto::AMRGrid::AMRGrid |
( |
const std::vector< DisjointBoxLayout > & |
a_layouts, |
|
|
const std::vector< Point > & |
a_refRatios, |
|
|
int |
a_maxLevels |
|
) |
| |
|
inline |
Multi-Level Constructor.
Create an AMRGrid using a vector of DisjointBoxLayouts. TODO: What to do if the DBLs are not properly nested?
- Parameters
-
layouts | A vector of DisjointBoxLayouts. |
refRatios | Refinement ratios for each coarse level. |
maxLevels | The maximum number of levels allowable in this grid. |
◆ AMRGrid() [3/3]
Proto::AMRGrid::AMRGrid |
( |
const DisjointBoxLayout & |
a_layout, |
|
|
const std::vector< Point > & |
a_refRatios, |
|
|
int |
a_maxLevels |
|
) |
| |
|
inline |
Single-Level Constructor.
Create an AMRGrid by initializing only the coarsest level.
- Parameters
-
layout | Layout of the coarsest level. |
refRatios | Refinement ratios for each coarse level. |
maxLevels | The maximum number of levels allowable in this grid. |
◆ computeTags() [1/2]
template<typename T , unsigned int C, MemType MEM, Centering CTR>
void Proto::AMRGrid::computeTags |
( |
LevelTagData & |
a_tags, |
|
|
LevelBoxData< T, C, MEM, CTR > & |
a_data, |
|
|
Point |
a_bufferSize, |
|
|
T |
a_threshold, |
|
|
unsigned int |
a_comp = 0 |
|
) |
| |
|
inlinestatic |
Compute Tags.
Populate tags using the magnitude of the undivided difference of the a specified component of a dataset.
- Parameters
-
tags | The tag data to be populated. Must have compatible layout with the level being checked. |
data | The level of data to compute tags on |
comp | Component of data to use |
bufferSize | Distance to buffer the computed tags by |
threshold | Threshold above whcih a tag is generated |
◆ computeTags() [2/2]
template<typename T , unsigned int C, MemType MEM, Centering CTR>
void Proto::AMRGrid::computeTags |
( |
LevelTagData & |
a_tags, |
|
|
LevelBoxData< T, C, MEM, CTR > & |
a_data, |
|
|
int |
a_bufferSize, |
|
|
T |
a_threshold, |
|
|
unsigned int |
a_comp = 0 |
|
) |
| |
|
inlinestatic |
Compute Tags (Isotropic)
Computes tags with an isotropic buffer radius.
◆ buffer() [1/2]
Buffer Tags.
Grows a level of tag data by bufferSize.
◆ buffer() [2/2]
void Proto::AMRGrid::buffer |
( |
LevelTagData & |
a_tags, |
|
|
int |
a_bufferSize |
|
) |
| |
|
inlinestatic |
Buffer Tags (Isotropic)
Grows a level of tag data by bufferSize.
◆ define() [1/2]
void Proto::AMRGrid::define |
( |
const std::vector< DisjointBoxLayout > & |
a_layouts, |
|
|
const std::vector< Point > & |
a_refRatios, |
|
|
int |
a_maxLevels |
|
) |
| |
|
inline |
Multi-Level Define.
Lazy multi-level construction
- Parameters
-
layouts | A vector of DisjointBoxLayouts. |
refRatios | Refinement ratios for each coarse level. |
maxLevels | The maximum number of levels allowable in this grid. |
◆ define() [2/2]
void Proto::AMRGrid::define |
( |
const DisjointBoxLayout & |
a_layout, |
|
|
const std::vector< Point > & |
a_refRatios, |
|
|
int |
a_maxLevels |
|
) |
| |
|
inline |
Single-Level Define.
Lazy single-level construction
- Parameters
-
layout | Layout of the coarsest level. |
refRatios | Refinement ratios for each coarse level. |
maxLevels | The maximum number of levels allowable in this grid. |
◆ operator[]() [1/2]
◆ operator[]() [2/2]
Layout Access (Non-Const)
◆ regrid() [1/2]
void Proto::AMRGrid::regrid |
( |
LevelTagData & |
a_tags, |
|
|
unsigned int |
a_level, |
|
|
Point |
a_boxSize |
|
) |
| |
|
inline |
Regrid.
Given tag data on a level, modify or generate a grid on the next finer level. Input level must correspond to the grid on which input tags are defined. Input level must be coarser than the finest permissible level in the grid. For grids with fewer than their predefined max number of levels, this function can add at most one level of grid. Proper nesting is NOT enforced by this function (see enforceNesting).
◆ regrid() [2/2]
void Proto::AMRGrid::regrid |
( |
LevelTagData & |
a_tags, |
|
|
unsigned int |
a_level |
|
) |
| |
|
inline |
◆ enforceNesting()
void Proto::AMRGrid::enforceNesting |
( |
unsigned int |
a_level, |
|
|
int |
a_nestingDistance = 1 |
|
) |
| |
|
inline |
Enforce Nesting.
Enforce the proper nesting criteria on a given level. Input level must be an "internal" level. That is to say, greater than 0 and finer than the finest level in the grid.
◆ enforceNesting2()
void Proto::AMRGrid::enforceNesting2 |
( |
unsigned int |
a_level, |
|
|
int |
a_nestingDistance = 1 |
|
) |
| |
|
inline |
Trim a_level grids so that they properly nest in a_level-1 grids.
◆ numLevels()
int Proto::AMRGrid::numLevels |
( |
| ) |
const |
|
inline |
Query Number of Levels.
References m_layouts.
◆ maxLevels()
int Proto::AMRGrid::maxLevels |
( |
| ) |
const |
|
inline |
◆ refRatio()
Point Proto::AMRGrid::refRatio |
( |
int |
a_level | ) |
const |
|
inline |
◆ compatible()
bool Proto::AMRGrid::compatible |
( |
const AMRGrid & |
a_grid | ) |
const |
|
inline |
Query Compatibility.
Determines if the layouts are compatible in a data iterator sence on each level of this and another grid. If the two grids have different numbers of levels, this check is only performed for levels that are defined for both grids.
- Parameters
-
◆ addFinerGrids()
void Proto::AMRGrid::addFinerGrids |
( |
LevelTagData & |
a_tags, |
|
|
int |
a_level |
|
) |
| |
|
inline |
Augments set of a_level tags by set intersecting a_level+2 grids.
◆ addFinerTags()
void Proto::AMRGrid::addFinerTags |
( |
LevelTagData & |
a_tags, |
|
|
unsigned int |
a_level |
|
) |
| |
|
inline |
◆ print()
void Proto::AMRGrid::print |
( |
| ) |
const |
|
inline |
◆ m_defined
bool Proto::AMRGrid::m_defined |
|
private |
◆ m_layouts
◆ m_refRatios
std::vector<Point> Proto::AMRGrid::m_refRatios |
|
private |
◆ m_maxLevels
int Proto::AMRGrid::m_maxLevels |
|
private |
The documentation for this class was generated from the following file: