Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

NodeFArrayBox.H

Go to the documentation of this file.
00001 /*  _______              __
00002    / ___/ /  ___  __ _  / /  ___
00003   / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004   \___/_//_/\___/_/_/_/_.__/\___/ 
00005 */
00006 //
00007 // This software is copyright (C) by the Lawrence Berkeley
00008 // National Laboratory.  Permission is granted to reproduce
00009 // this software for non-commercial purposes provided that
00010 // this notice is left intact.
00011 // 
00012 // It is acknowledged that the U.S. Government has rights to
00013 // this software under Contract DE-AC03-765F00098 between
00014 // the U.S.  Department of Energy and the University of
00015 // California.
00016 //
00017 // This software is provided as a professional and academic
00018 // contribution for joint exchange. Thus it is experimental,
00019 // is provided ``as is'', with no warranties of any kind
00020 // whatsoever, no support, no promise of updates, or printed
00021 // documentation. By using this software, you acknowledge
00022 // that the Lawrence Berkeley National Laboratory and
00023 // Regents of the University of California shall have no
00024 // liability with respect to the infringement of other
00025 // copyrights by any part of this software.
00026 //
00027 
00028 // NodeFArrayBox.H
00029 // adapted from dMartin/Chombo-IAMR/util/FluxBox.H
00030 // by Dan Martin, Fri, Jan 14, 2000
00031 // petermc, 1 Nov 2000
00032 // 8 Jan 2001 added 
00033 
00034 #ifndef NODEFARRAYBOX_H
00035 #define NODEFARRAYBOX_H
00036 
00037 #include "ProblemDomain.H"
00038 #include "FArrayBox.H"
00039 #include "LevelData.H"
00040 #include "Tuple.H"
00041 // #include "ArrayViewData.H"
00042 // #include "AMRIO.H"
00043 // avoid including this because then InitWriteFAB gets multiply defined
00044 // #include "FABView.H"
00045 
00047 
00048 class NodeFArrayBox
00105 {
00106 
00107 public:
00108 
00110 
00112 
00114   NodeFArrayBox();
00115 
00117 
00120   NodeFArrayBox(const Box& a_bx, int a_nComp=1);
00121 
00123 
00125   ~NodeFArrayBox();
00126 
00128 
00130   void define(const Box& a_bx, int a_nComp=1);
00131 
00133 
00135 
00137   const Box& box() const;
00138 
00140 
00143   FArrayBox& getFab();
00144 
00146 
00149   const FArrayBox& getFab() const;
00150 
00152 
00154   Real norm(const Real a_dx,
00155             const Box& a_subbox, // CELL-centered
00156             const int a_p=2,
00157             const int a_startComp=0, const int a_numComp=1) const;
00158             
00160 
00162   Real norm(const Real a_dx,
00163             const BaseFab<int>& a_mask,
00164             const Box& a_subbox, // CELL-centered
00165             const int a_p=2,
00166             const int a_startComp=0, const int a_numComp=1) const;
00167             
00169 
00171   Real norm(const Real a_dx,
00172             const int a_p=2,
00173             const int a_startComp=0, const int a_numComp=1) const;
00174 
00176 
00178   Real norm(const Real a_dx,
00179             const BaseFab<int>& a_mask,
00180             const int a_p=2,
00181             const int a_startComp=0, const int a_numComp=1) const;
00182 
00184 
00186   Real maxnorm(const Real a_dx,
00187                const Box& a_subbox, // CELL-centered
00188                const int a_startComp=0, const int a_numComp=1) const;
00189 
00191 
00193   Real maxnorm(const BaseFab<int>& a_mask,
00194                const Box& a_subbox, // CELL-centered
00195                const int a_startComp=0, const int a_numComp=1) const;
00196 
00198 
00200   Real maxnorm(const Real a_dx,
00201                const int a_startComp=0, const int a_numComp=1) const;
00202 
00204 
00206   Real maxnorm(const BaseFab<int>& a_mask,
00207                const int a_startComp=0, const int a_numComp=1) const;
00208 
00210 
00212 
00232   void copy(const NodeFArrayBox& a_src);
00233 
00235 
00247   void copy(const Box& a_regionFrom,
00248             const Interval& a_Cdest,
00249             const Box& a_regionTo,
00250             const NodeFArrayBox& a_src,
00251             const Interval& a_Csrc);
00252 
00254   
00256 
00263   int size(const Box& a_R, const Interval& a_comps) const;
00264 
00266 
00274   void linearOut(void* a_buf, const Box& a_R, const Interval& a_comps) const;
00275   
00277   void linearIn(void* a_buf);
00278 
00280   void linearIn(void* a_buf, const Box& a_R, const Interval& a_comps);
00281 
00283   static bool preAllocatable() {return true;}
00284   
00285 protected:
00286 
00287   // CELL-centered box. data are defined on the surrounding nodes.
00288   Box m_box;
00289 
00290   // NODE-centered data
00291   FArrayBox m_fab;
00292 
00293 private:
00295   
00296   NodeFArrayBox (const NodeFArrayBox&);
00297   NodeFArrayBox& operator = (const NodeFArrayBox&);
00298 
00299 };
00300 
00302 
00308 void interiorNodes(IntVectSet& a_ivs,
00309                    const ProblemDomain& a_base_domain,
00310                    const DisjointBoxLayout& a_boxes,
00311                    const Box& a_box);
00312 
00313 void interiorNodes(IntVectSet& a_ivs,
00314                    const Box& a_base_domain,
00315                    const DisjointBoxLayout& a_boxes,
00316                    const Box& a_box);
00317 
00319 
00357 void interiorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00358                            const DisjointBoxLayout& a_boxes,
00359                            const ProblemDomain& a_domain);
00360 
00361 void interiorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00362                            const DisjointBoxLayout& a_boxes,
00363                            const Box& a_domain);
00364 
00366 
00383 void interiorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00384                            const DisjointBoxLayout& a_dest,
00385                            const DisjointBoxLayout& a_src,
00386                            const ProblemDomain& a_domain);
00387 
00388 void interiorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00389                            const DisjointBoxLayout& a_dest,
00390                            const DisjointBoxLayout& a_src,
00391                            const Box& a_domain);
00392 
00394 
00406 void exteriorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_exterior,
00407                            const LayoutData< Vector<IntVectSet> >& a_interior,
00408                            const DisjointBoxLayout& a_boxes);
00409 
00411 
00419 void copyInteriorNodesOld(BoxLayoutData<NodeFArrayBox> & a_dest,
00420                           const LevelData<NodeFArrayBox> & a_src,
00421                           const Box& a_domain);
00422 
00424 
00439 void zeroBoundaryNodes(BoxLayoutData<NodeFArrayBox>& a_dest,
00440                        const LayoutData< Vector<IntVectSet> >& a_IVSV);
00441 
00443 
00485 void copyInteriorNodes(LevelData<NodeFArrayBox>& a_dest,
00486                        const LevelData<NodeFArrayBox>& a_src,
00487                        const LayoutData< Vector<IntVectSet> >& a_IVSV);
00488 
00490 
00504 Real DotProductNodes(const BoxLayoutData<NodeFArrayBox>& a_dataOne,
00505                      const BoxLayoutData<NodeFArrayBox>& a_dataTwo,
00506                      const BoxLayoutData< BaseFab<int> >& a_mask,
00507                      const BoxLayout& a_dblIn);
00508 
00509 
00511 
00526 Real DotProductNodes(const BoxLayoutData<NodeFArrayBox>& a_dataOne,
00527                      const BoxLayoutData<NodeFArrayBox>& a_dataTwo,
00528                      const BoxLayoutData< BaseFab<int> >& a_mask,
00529                      const BoxLayout& a_dblIn,
00530                      const Interval& a_comps);
00531 
00533 
00550 Real DotProductNodes(const LevelData<NodeFArrayBox>& a_dataOne,
00551                      const LevelData<NodeFArrayBox>& a_dataTwo,
00552                      const BoxLayoutData< BaseFab<int> >& a_mask,
00553                      const ProblemDomain& a_domain,
00554                      const LayoutData< Vector<IntVectSet> >& a_IVSVext,
00555                      const Interval& a_comps);
00556 
00557 Real DotProductNodes(const LevelData<NodeFArrayBox>& a_dataOne,
00558                      const LevelData<NodeFArrayBox>& a_dataTwo,
00559                      const BoxLayoutData< BaseFab<int> >& a_mask,
00560                      const Box& a_domain,
00561                      const LayoutData< Vector<IntVectSet> >& a_IVSVext,
00562                      const Interval& a_comps);
00563 
00564 
00566 
00581 Real DotProductNodes(const LevelData<NodeFArrayBox>& a_dataOne,
00582                      const LevelData<NodeFArrayBox>& a_dataTwo,
00583                      const BoxLayoutData< BaseFab<int> >& a_mask,
00584                      const ProblemDomain& a_domain,
00585                      const Interval& a_comps);
00586 
00587 Real DotProductNodes(const LevelData<NodeFArrayBox>& a_dataOne,
00588                      const LevelData<NodeFArrayBox>& a_dataTwo,
00589                      const BoxLayoutData< BaseFab<int> >& a_mask,
00590                      const Box& a_domain,
00591                      const Interval& a_comps);
00592 
00593 #endif

Generated on Tue Apr 15 18:31:55 2003 for AMRNodeElliptic by doxygen1.2.16