00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef DISJOINTBOXLAYOUT_H
00029 #define DISJOINTBOXLAYOUT_H
00030
00031 #ifndef WRAPPER
00032 #include "Vector.H"
00033 #include "BoxLayout.H"
00034 #include "ProblemDomain.H"
00035 #endif
00036
00038
00046 class DisjointBoxLayout: public BoxLayout
00047 {
00048
00049 public:
00050
00051 friend class Copier;
00052
00057
00059
00062 DisjointBoxLayout();
00063
00065
00070 DisjointBoxLayout(const Vector<Box>& a_boxes,
00071 const Vector<int>& a_procIDs);
00072
00074
00079 DisjointBoxLayout(const Vector<Box>& a_boxes,
00080 const Vector<int>& a_procIDs,
00081 const ProblemDomain& a_physDomain);
00082
00084
00089 virtual
00090 ~DisjointBoxLayout(){;}
00091
00093
00098 virtual void
00099 define(const Vector<Box>& a_boxes,
00100 const Vector<int>& a_procIDs);
00101
00103
00108 void
00109 define(BoxLayout& a_layout);
00110
00112
00117 void
00118 define(BoxLayout& a_layout, const ProblemDomain& a_physDomain);
00119
00121
00126 virtual void
00127 define(const Vector<Box>& a_boxes,
00128 const Vector<int>& a_procIDs,
00129 const ProblemDomain& a_physDomain);
00130
00132
00135 virtual void
00136 define_pd(const Vector<Box>& a_boxes,
00137 const Vector<int>& a_procIDs,
00138 const ProblemDomain& a_physDomain)
00139 {define(a_boxes, a_procIDs, a_physDomain);}
00140
00147
00149
00156 bool
00157 isDisjoint() const;
00158
00160
00171 bool checkPeriodic(const ProblemDomain& a_domain) const;
00172
00179 bool checkDomains(const DisjointBoxLayout& a_dbl) const;
00180
00187
00189
00191 virtual void
00192 close();
00193
00195
00200 virtual void
00201 deepCopy(const DisjointBoxLayout& a_source);
00202
00204
00208 virtual void
00209 deepCopy(const BoxLayout& a_source);
00210
00212
00216 virtual void
00217 deepCopy(const BoxLayout& a_source, const ProblemDomain& a_physDomain);
00218
00220
00236 friend void coarsen(DisjointBoxLayout& output,
00237 const DisjointBoxLayout& input,
00238 int refinement);
00239
00241
00256 friend void refine(DisjointBoxLayout& output,
00257 const DisjointBoxLayout& input,
00258 int refinement);
00259
00266
00268
00272 friend void adjCellLo(DisjointBoxLayout& a_output,
00273 const DisjointBoxLayout& a_input,
00274 int a_dir, int a_len=1);
00275
00276
00278
00282 friend void adjCellHi(DisjointBoxLayout& a_output,
00283 const DisjointBoxLayout& a_input,
00284 int a_dir, int a_len=1);
00285
00286
00289 protected:
00290 const ProblemDomain& physDomain() const;
00291
00292 private:
00294 ProblemDomain m_physDomain;
00295
00296 };
00297 void adjCellLo_dbl(DisjointBoxLayout& a_output,
00298 const DisjointBoxLayout& a_input,
00299 int a_dir, int a_len);
00300 void adjCellHi_dbl(DisjointBoxLayout& a_output,
00301 const DisjointBoxLayout& a_input,
00302 int a_dir, int a_len);
00303 void coarsen_dbl(DisjointBoxLayout& output,
00304 const DisjointBoxLayout& input,
00305 int refinement);
00306 void refine_dbl(DisjointBoxLayout& output,
00307 const DisjointBoxLayout& input,
00308 int refinement);
00309
00310 #ifndef WRAPPER
00311 inline
00312 void adjCellLo_dbl(DisjointBoxLayout& a_output,
00313 const DisjointBoxLayout& a_input,
00314 int a_dir, int a_len)
00315 { adjCellLo(a_output,a_input,a_dir,a_len);}
00316 inline
00317 void adjCellHi_dbl(DisjointBoxLayout& a_output,
00318 const DisjointBoxLayout& a_input,
00319 int a_dir, int a_len)
00320 { adjCellHi(a_output,a_input,a_dir,a_len);}
00321 inline
00322 void coarsen_dbl(DisjointBoxLayout& output,
00323 const DisjointBoxLayout& input,
00324 int refinement)
00325 { coarsen(output, input, refinement);}
00326 inline
00327 void refine_dbl(DisjointBoxLayout& output,
00328 const DisjointBoxLayout& input,
00329 int refinement)
00330 { refine(output, input, refinement);}
00331 #endif
00332
00333 #endif