Chombo + EB  3.0
Classes | Macros | Functions
LevelData.H File Reference
#include "IntVect.H"
#include "BoxLayoutData.H"
#include "DisjointBoxLayout.H"
#include "Copier.H"
#include "SPMD.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
#include "LevelDataI.H"
Include dependency graph for LevelData.H:

Go to the source code of this file.


class  LevelData< T >
struct  LevelData< T >::ApplyFunctor


#define _LEVELDATA_H_


template<class T >
void aliasLevelData (LevelData< T > &a_alias, LevelData< T > *a_original, const Interval &a_interval)
 Data over a disjoint union of rectangles. More...

Macro Definition Documentation


#define _LEVELDATA_H_

Function Documentation

◆ aliasLevelData()

template<class T >
void aliasLevelData ( LevelData< T > &  a_alias,
LevelData< T > *  a_original,
const Interval a_interval 

Data over a disjoint union of rectangles.

LevelData aliasing function.

LevelData is-a BoxLayoutData. It is built from a DisjointBoxLayout instead though, thus making the data in a DisjointBoxLayout uniquely defined for all spatial indices defined by the underlying DisjointBoxLayout. It carries within it an inherent concept of ghost cells (which the user can choose to be empty).

Since LevelData is-a BoxLayoutData, all the methods required of the template class T for BoxLayoutData are also required for LevelData. LevelData does not have any extra requirements.

a_aliasaliased LevelData<T> object. original data in a_alias is destroyed and new aliasing role assumed.
a_originalpointer to LevelData<T> that will be aliased.
a_intervalrange of components of each T in a_original that will be created in the a_alias argument.
LevelData<FArrayBox> original(dbl, 4, 2*IntVect::Unit);
Interval subcomps(2, 3);
aliasLevelData<FArrayBox>(alias, &original, subcomps);
// component 0 of every FArrayBox in alias references the same data as
// component 2 in original

The template class T must have an 'alias' constructor

class A
A(const Interval& subcomps, A& original);// alias constructor

References LevelData< T >::define(), LevelData< T >::disjointBoxLayout(), LevelData< T >::ghostVect(), and Interval::size().