00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _REDUCTIONCOPIER_H_
00012 #define _REDUCTIONCOPIER_H_
00013
00014
00015 #include "DisjointBoxLayout.H"
00016 #include "Pool.H"
00017 #include "Vector.H"
00018 #include "ProblemDomain.H"
00019 #include "Copier.H"
00020 #include "NamespaceHeader.H"
00021
00023
00038 class ReductionCopier : public Copier
00039 {
00040 public:
00041
00043 ReductionCopier()
00044 {}
00045
00047 ReductionCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
00048 int a_transverseDir, bool a_exchange = false);
00049
00051 ReductionCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
00052 const ProblemDomain& a_domain,
00053 int a_transverseDir,
00054 bool a_exchange = false);
00055
00057 ReductionCopier(const DisjointBoxLayout& a_level,
00058 const BoxLayout& a_dest,
00059 const IntVect& a_destGhost,
00060 int a_transverseDir,
00061 bool a_exchange = false);
00062
00064 ReductionCopier(const DisjointBoxLayout& a_level,
00065 const BoxLayout& a_dest,
00066 const ProblemDomain& a_domain,
00067 const IntVect& a_destGhost,
00068 int a_transverseDir,
00069 bool a_exchange = false);
00070
00072 ReductionCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
00073 const Vector<int>& a_transverseDir, bool a_exchange = false);
00074
00076 ReductionCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
00077 const ProblemDomain& a_domain,
00078 const Vector<int>& a_transverseDir,
00079 bool a_exchange = false);
00080
00082 ReductionCopier(const DisjointBoxLayout& a_level,
00083 const BoxLayout& a_dest,
00084 const IntVect& a_destGhost,
00085 const Vector<int>& a_transverseDir,
00086 bool a_exchange = false);
00087
00089 ReductionCopier(const DisjointBoxLayout& a_level,
00090 const BoxLayout& a_dest,
00091 const ProblemDomain& a_domain,
00092 const IntVect& a_destGhost,
00093 const Vector<int>& a_transverseDir,
00094 bool a_exchange = false);
00095
00097 virtual ~ReductionCopier();
00098
00100 virtual void define(const DisjointBoxLayout& a_level,
00101 const BoxLayout& a_dest,
00102 int a_transverseDir,
00103 bool a_exchange = false);
00104
00106 virtual void define(const DisjointBoxLayout& a_level,
00107 const BoxLayout& a_dest,
00108 const ProblemDomain& a_domain,
00109 int a_transverseDir,
00110 bool a_exchange = false);
00111
00113 virtual void define(const DisjointBoxLayout& a_level,
00114 const BoxLayout& a_dest,
00115 const IntVect& a_destGhost,
00116 int a_transverseDir,
00117 bool a_exchange = false);
00118
00120 virtual void define(const BoxLayout& a_level,
00121 const BoxLayout& a_dest,
00122 const ProblemDomain& a_domain,
00123 const IntVect& a_destGhost,
00124 int a_transverseDir,
00125 bool a_exchange = false);
00126
00128 virtual void define(const DisjointBoxLayout& a_level,
00129 const BoxLayout& a_dest,
00130 const Vector<int>& a_transverseDir,
00131 bool a_exchange = false);
00132
00134 virtual void define(const DisjointBoxLayout& a_level,
00135 const BoxLayout& a_dest,
00136 const ProblemDomain& a_domain,
00137 const Vector<int>& a_transverseDir,
00138 bool a_exchange = false);
00139
00141 virtual void define(const DisjointBoxLayout& a_level,
00142 const BoxLayout& a_dest,
00143 const IntVect& a_destGhost,
00144 const Vector<int>& a_transverseDir,
00145 bool a_exchange = false);
00146
00148 virtual void define(const BoxLayout& a_level,
00149 const BoxLayout& a_dest,
00150 const ProblemDomain& a_domain,
00151 const IntVect& a_destGhost,
00152 const Vector<int>& a_transverseDir,
00153 bool a_exchange = false);
00154
00156
00163 void reverse();
00164
00165
00167 bool check(const DisjointBoxLayout& from, const BoxLayout& to) const;
00168
00169 int print() const;
00170
00171
00172 protected:
00173
00174 friend class CopyIterator;
00175
00176 friend void dumpmemoryatexit();
00177
00178 private:
00179
00180
00181 Vector<int> m_transverseDir;
00182
00183 };
00184
00185
00186
00187
00188
00189
00190
00191 #include "NamespaceFooter.H"
00192
00193 #endif