#include <SpreadingCopier.H>
This is a specialized Copier designed to copy from a smaller-dimensional DisjointBoxLayout to a larger-dimensional one by copying all of the data in the transverse direction across the destination boxLayout. It is assumed that this will be used with a different sort of operator (like a spreading operator, for example), since a straight copy operation wouldn't make much sense. Anyway, this just defines the intersection regions; what you do with them is your problem.
Note also that both the Spreading and Reduction Copiers ignore periodicity, since it can lead to unintended side-effects and multiple-counting of data. The way to handle periodicity is to do an exchange on the source data before calling the copyTo which does the spreading.
Public Member Functions | |
SpreadingCopier () | |
null constructor, copy constructor and operator= can be compiler defined. | |
SpreadingCopier (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, int a_transverseDir, bool a_exchange=false) | |
a_level is the lower-dimensional DBL, dest is the higher-dimensional one | |
SpreadingCopier (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const ProblemDomain &a_domain, int a_transverseDir, bool a_exchange=false) | |
Note that periodic BC's are meaningless for the spreading copier. | |
SpreadingCopier (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const IntVect &a_destGhost, int a_transverseDir, bool a_exchange=false) | |
Copier to copy data into the valid and invalid regions of a_dest from a_level. | |
SpreadingCopier (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const ProblemDomain &a_domain, const IntVect &a_destGhost, int a_transverseDir, bool a_exchange=false) | |
Copier to copy data into the valid and invalid regions of a_dest from a_level with support for periodic BCs. | |
SpreadingCopier (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const Vector< int > &a_transverseDir, bool a_exchange=false) | |
SpreadingCopier (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const ProblemDomain &a_domain, const Vector< int > &a_transverseDir, bool a_exchange=false) | |
this constructor contains support for periodic BC's | |
SpreadingCopier (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const IntVect &a_destGhost, const Vector< int > &a_transverseDir, bool a_exchange=false) | |
Copier to copy data into the valid and invalid regions of a_dest from a_level. | |
SpreadingCopier (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const ProblemDomain &a_domain, const IntVect &a_destGhost, const Vector< int > &a_transverseDir, bool a_exchange=false) | |
Copier to copy data into the valid and invalid regions of a_dest from a_level. | |
virtual | ~SpreadingCopier () |
virtual void | define (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, int a_transverseDir, bool a_exchange=false) |
virtual void | define (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const ProblemDomain &a_domain, int a_transverseDir, bool a_exchange=false) |
contains support for periodic BCs | |
virtual void | define (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const IntVect &a_destGhost, int a_transverseDir, bool a_exchange=false) |
virtual void | define (const BoxLayout &a_level, const BoxLayout &a_dest, const ProblemDomain &a_domain, const IntVect &a_destGhost, int a_transverseDir, bool a_exchange=false) |
contains support for periodic BCs | |
virtual void | define (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const Vector< int > &a_transverseDir, bool a_exchange=false) |
virtual void | define (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const ProblemDomain &a_domain, const Vector< int > &a_transverseDir, bool a_exchange=false) |
contains support for periodic BCs | |
virtual void | define (const DisjointBoxLayout &a_level, const BoxLayout &a_dest, const IntVect &a_destGhost, const Vector< int > &a_transverseDir, bool a_exchange=false) |
virtual void | define (const BoxLayout &a_level, const BoxLayout &a_dest, const ProblemDomain &a_domain, const IntVect &a_destGhost, const Vector< int > &a_transverseDir, bool a_exchange=false) |
contains support for periodic BCs | |
void | reverse () |
reverse the direction of copy for an already-defined SpreadingCopier | |
bool | check (const DisjointBoxLayout &from, const BoxLayout &to) const |
check that this Copier object corresponds to these two BoxLayouts. | |
int | print () const |
Private Attributes | |
Vector< int > | m_transverseDir |
Friends | |
class | CopyIterator |
void | dumpmemoryatexit () |
SpreadingCopier::SpreadingCopier | ( | ) | [inline] |
null constructor, copy constructor and operator= can be compiler defined.
SpreadingCopier::SpreadingCopier | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
int | a_transverseDir, | |||
bool | a_exchange = false | |||
) |
a_level is the lower-dimensional DBL, dest is the higher-dimensional one
SpreadingCopier::SpreadingCopier | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const ProblemDomain & | a_domain, | |||
int | a_transverseDir, | |||
bool | a_exchange = false | |||
) |
Note that periodic BC's are meaningless for the spreading copier.
SpreadingCopier::SpreadingCopier | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const IntVect & | a_destGhost, | |||
int | a_transverseDir, | |||
bool | a_exchange = false | |||
) |
Copier to copy data into the valid and invalid regions of a_dest from a_level.
SpreadingCopier::SpreadingCopier | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const ProblemDomain & | a_domain, | |||
const IntVect & | a_destGhost, | |||
int | a_transverseDir, | |||
bool | a_exchange = false | |||
) |
Copier to copy data into the valid and invalid regions of a_dest from a_level with support for periodic BCs.
SpreadingCopier::SpreadingCopier | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const Vector< int > & | a_transverseDir, | |||
bool | a_exchange = false | |||
) |
SpreadingCopier::SpreadingCopier | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const ProblemDomain & | a_domain, | |||
const Vector< int > & | a_transverseDir, | |||
bool | a_exchange = false | |||
) |
this constructor contains support for periodic BC's
SpreadingCopier::SpreadingCopier | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const IntVect & | a_destGhost, | |||
const Vector< int > & | a_transverseDir, | |||
bool | a_exchange = false | |||
) |
Copier to copy data into the valid and invalid regions of a_dest from a_level.
SpreadingCopier::SpreadingCopier | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const ProblemDomain & | a_domain, | |||
const IntVect & | a_destGhost, | |||
const Vector< int > & | a_transverseDir, | |||
bool | a_exchange = false | |||
) |
Copier to copy data into the valid and invalid regions of a_dest from a_level.
note that we ignore periodicity for the SpreadingCopier. Do an exchange of the src data before the copyTo which uses this Copier
virtual SpreadingCopier::~SpreadingCopier | ( | ) | [virtual] |
virtual void SpreadingCopier::define | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
int | a_transverseDir, | |||
bool | a_exchange = false | |||
) | [virtual] |
virtual void SpreadingCopier::define | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const ProblemDomain & | a_domain, | |||
int | a_transverseDir, | |||
bool | a_exchange = false | |||
) | [virtual] |
contains support for periodic BCs
virtual void SpreadingCopier::define | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const IntVect & | a_destGhost, | |||
int | a_transverseDir, | |||
bool | a_exchange = false | |||
) | [virtual] |
virtual void SpreadingCopier::define | ( | const BoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const ProblemDomain & | a_domain, | |||
const IntVect & | a_destGhost, | |||
int | a_transverseDir, | |||
bool | a_exchange = false | |||
) | [virtual] |
contains support for periodic BCs
virtual void SpreadingCopier::define | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const Vector< int > & | a_transverseDir, | |||
bool | a_exchange = false | |||
) | [virtual] |
virtual void SpreadingCopier::define | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const ProblemDomain & | a_domain, | |||
const Vector< int > & | a_transverseDir, | |||
bool | a_exchange = false | |||
) | [virtual] |
contains support for periodic BCs
virtual void SpreadingCopier::define | ( | const DisjointBoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const IntVect & | a_destGhost, | |||
const Vector< int > & | a_transverseDir, | |||
bool | a_exchange = false | |||
) | [virtual] |
virtual void SpreadingCopier::define | ( | const BoxLayout & | a_level, | |
const BoxLayout & | a_dest, | |||
const ProblemDomain & | a_domain, | |||
const IntVect & | a_destGhost, | |||
const Vector< int > & | a_transverseDir, | |||
bool | a_exchange = false | |||
) | [virtual] |
contains support for periodic BCs
void SpreadingCopier::reverse | ( | ) |
reverse the direction of copy for an already-defined SpreadingCopier
This function simply replaces the from data with the to-data for the already-defined copy operation. For now, this function heads right into a MayDay::Error, since what you probably want is to use a ReductionCopier rather than a reversed SpreadingCopier
Reimplemented from Copier.
bool SpreadingCopier::check | ( | const DisjointBoxLayout & | from, | |
const BoxLayout & | to | |||
) | const |
check that this Copier object corresponds to these two BoxLayouts.
int SpreadingCopier::print | ( | ) | const |
Reimplemented from Copier.
friend class CopyIterator [friend] |
Reimplemented from Copier.
void dumpmemoryatexit | ( | ) | [friend] |
Reimplemented from Copier.
Vector<int> SpreadingCopier::m_transverseDir [private] |