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 #include "DisjointBoxLayout.H"
00015 #include "Pool.H"
00016 #include "Vector.H"
00017 #include "ProblemDomain.H"
00018 #include "Copier.H"
00019 #include "NamespaceHeader.H"
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 class ReductionCopier : public Copier
00038 {
00039 public:
00040
00041
00042 ReductionCopier()
00043 {}
00044
00045
00046 ReductionCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
00047 int a_transverseDir, bool a_exchange = false);
00048
00049
00050 ReductionCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
00051 const ProblemDomain& a_domain,
00052 int a_transverseDir,
00053 bool a_exchange = false);
00054
00055
00056 ReductionCopier(const DisjointBoxLayout& a_level,
00057 const BoxLayout& a_dest,
00058 const IntVect& a_destGhost,
00059 int a_transverseDir,
00060 bool a_exchange = false);
00061
00062
00063 ReductionCopier(const DisjointBoxLayout& a_level,
00064 const BoxLayout& a_dest,
00065 const ProblemDomain& a_domain,
00066 const IntVect& a_destGhost,
00067 int a_transverseDir,
00068 bool a_exchange = false);
00069
00070
00071 ReductionCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
00072 const Vector<int>& a_transverseDir, bool a_exchange = false);
00073
00074
00075 ReductionCopier(const DisjointBoxLayout& a_level, const BoxLayout& a_dest,
00076 const ProblemDomain& a_domain,
00077 const Vector<int>& a_transverseDir,
00078 bool a_exchange = false);
00079
00080
00081 ReductionCopier(const DisjointBoxLayout& a_level,
00082 const BoxLayout& a_dest,
00083 const IntVect& a_destGhost,
00084 const Vector<int>& a_transverseDir,
00085 bool a_exchange = false);
00086
00087
00088 ReductionCopier(const DisjointBoxLayout& a_level,
00089 const BoxLayout& a_dest,
00090 const ProblemDomain& a_domain,
00091 const IntVect& a_destGhost,
00092 const Vector<int>& a_transverseDir,
00093 bool a_exchange = false);
00094
00095
00096 virtual ~ReductionCopier();
00097
00098
00099 virtual void define(const DisjointBoxLayout& a_level,
00100 const BoxLayout& a_dest,
00101 int a_transverseDir,
00102 bool a_exchange = false);
00103
00104
00105 virtual void define(const DisjointBoxLayout& a_level,
00106 const BoxLayout& a_dest,
00107 const ProblemDomain& a_domain,
00108 int a_transverseDir,
00109 bool a_exchange = false);
00110
00111
00112 virtual void define(const DisjointBoxLayout& a_level,
00113 const BoxLayout& a_dest,
00114 const IntVect& a_destGhost,
00115 int a_transverseDir,
00116 bool a_exchange = false);
00117
00118
00119 virtual void define(const BoxLayout& a_level,
00120 const BoxLayout& a_dest,
00121 const ProblemDomain& a_domain,
00122 const IntVect& a_destGhost,
00123 int a_transverseDir,
00124 bool a_exchange = false);
00125
00126
00127 virtual void define(const DisjointBoxLayout& a_level,
00128 const BoxLayout& a_dest,
00129 const Vector<int>& a_transverseDir,
00130 bool a_exchange = false);
00131
00132
00133 virtual void define(const DisjointBoxLayout& a_level,
00134 const BoxLayout& a_dest,
00135 const ProblemDomain& a_domain,
00136 const Vector<int>& a_transverseDir,
00137 bool a_exchange = false);
00138
00139
00140 virtual void define(const DisjointBoxLayout& a_level,
00141 const BoxLayout& a_dest,
00142 const IntVect& a_destGhost,
00143 const Vector<int>& a_transverseDir,
00144 bool a_exchange = false);
00145
00146
00147 virtual void define(const BoxLayout& a_level,
00148 const BoxLayout& a_dest,
00149 const ProblemDomain& a_domain,
00150 const IntVect& a_destGhost,
00151 const Vector<int>& a_transverseDir,
00152 bool a_exchange = false);
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162 void reverse();
00163
00164
00165 bool check(const DisjointBoxLayout& from, const BoxLayout& to) const;
00166
00167 int print() const;
00168
00169
00170 protected:
00171
00172 friend class CopyIterator;
00173
00174 friend void dumpmemoryatexit();
00175
00176 private:
00177
00178
00179 Vector<int> m_transverseDir;
00180
00181 };
00182
00183
00184
00185
00186
00187 #include "NamespaceFooter.H"
00188
00189 #endif