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 "Box.H"
00038 #include "FArrayBox.H"
00039 #include "LevelData.H"
00040 #include "Tuple.H"
00041 #include "IntVectSet.H"
00042 // #include "ArrayViewData.H"
00043 // #include "AMRIO.H"
00044 // avoid including this because then InitWriteFAB gets multiply defined
00045 // #include "FABView.H"
00046 
00048 
00049 class NodeFArrayBox
00112 {
00113 
00114 public:
00115 
00117 
00119 
00121   NodeFArrayBox();
00122 
00124 
00127   NodeFArrayBox(const Box& a_bx, int a_nComp=1);
00128 
00130 
00132   ~NodeFArrayBox();
00133 
00135 
00137   void define(const Box& a_bx, int a_nComp=1);
00138 
00140 
00142 
00144   const Box& box() const;
00145 
00147 
00150   FArrayBox& getFab();
00151 
00153 
00156   const FArrayBox& getFab() const;
00157 
00159 
00161   Real integral(const Real a_dx,
00162                 const Box& a_subbox, // CELL-centered
00163                 const int a_startComp=0, const int a_numComp=1) const;
00164             
00166 
00168   Real integral(const Real a_dx,
00169                 const int a_startComp=0, const int a_numComp=1) const;
00170 
00172 
00174   Real norm(const Real a_dx,
00175             const Box& a_subbox, // CELL-centered
00176             const int a_p=2,
00177             const int a_startComp=0, const int a_numComp=1) const;
00178             
00180 
00182   Real norm(const Real a_dx,
00183             const int a_p=2,
00184             const int a_startComp=0, const int a_numComp=1) const;
00185 
00187 
00189   Real maxnorm(const Box& a_subbox, // CELL-centered
00190                const int a_startComp=0, const int a_numComp=1) const;
00191 
00193 
00195   Real maxnorm(const int a_startComp=0, const int a_numComp=1) const;
00196 
00198 
00200 
00220   void copy(const NodeFArrayBox& a_src);
00221 
00223 
00235   void copy(const Box& a_regionFrom,
00236             const Interval& a_Cdest,
00237             const Box& a_regionTo,
00238             const NodeFArrayBox& a_src,
00239             const Interval& a_Csrc);
00240 
00242   
00244 
00251   int size(const Box& a_R, const Interval& a_comps) const;
00252 
00254 
00262   void linearOut(void* a_buf, const Box& a_R, const Interval& a_comps) const;
00263   
00265   void linearIn(void* a_buf);
00266 
00268   void linearIn(void* a_buf, const Box& a_R, const Interval& a_comps);
00269 
00271   static bool preAllocatable() {return true;}
00272   
00273 protected:
00274 
00275   // CELL-centered box. data are defined on the surrounding nodes.
00276   Box m_box;
00277 
00278   // NODE-centered data
00279   FArrayBox m_fab;
00280 
00281 private:
00283   
00284   NodeFArrayBox (const NodeFArrayBox&);
00285   NodeFArrayBox& operator = (const NodeFArrayBox&);
00286 
00287 };
00288 
00290 
00320 void interiorNodes(IntVectSet& a_ivs,
00321                    const ProblemDomain& a_base_domain,
00322                    const DisjointBoxLayout& a_boxes,
00323                    const Box& a_box);
00324 
00325 void interiorNodes(IntVectSet& a_ivs,
00326                    const Box& a_base_domain,
00327                    const DisjointBoxLayout& a_boxes,
00328                    const Box& a_box);
00329 
00331 
00373 void interiorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00374                            const DisjointBoxLayout& a_boxes,
00375                            const ProblemDomain& a_domain);
00376 
00377 void interiorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00378                            const DisjointBoxLayout& a_boxes,
00379                            const Box& a_domain);
00380 
00381 
00383 
00400 void interiorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00401                            const DisjointBoxLayout& a_dest,
00402                            const DisjointBoxLayout& a_src,
00403                            const ProblemDomain& a_domain);
00404 
00405 void interiorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00406                            const DisjointBoxLayout& a_dest,
00407                            const DisjointBoxLayout& a_src,
00408                            const Box& a_domain);
00409 
00410 
00412 
00453 void exteriorBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_exterior,
00454                            const LayoutData< Vector<IntVectSet> >& a_interior,
00455                            const DisjointBoxLayout& a_boxes);
00456 
00457 
00459 
00506 void physicalBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00507                            const DisjointBoxLayout& a_boxes,
00508                            const ProblemDomain& a_domain);
00509 
00510 void physicalBoundaryNodes(LayoutData< Vector<IntVectSet> >& a_IVSV,
00511                            const DisjointBoxLayout& a_boxes,
00512                            const Box& a_domain);
00513 
00514 
00516 
00524 void copyInteriorNodesOld(BoxLayoutData<NodeFArrayBox> & a_dest,
00525                        const LevelData<NodeFArrayBox> & a_src,
00526                        const Box& a_domain);
00527 
00529 
00544 void zeroBoundaryNodes(BoxLayoutData<NodeFArrayBox>& a_dest,
00545                        const LayoutData< Vector<IntVectSet> >& a_IVSV);
00546 
00548 
00593 void copyInteriorNodes(LevelData<NodeFArrayBox>& a_dest,
00594                        const LevelData<NodeFArrayBox>& a_src,
00595                        const LayoutData< Vector<IntVectSet> >& a_IVSV);
00596 
00597 
00599 
00612 Real DotProductNodes(const BoxLayoutData<NodeFArrayBox>& a_dataOne,
00613                      const BoxLayoutData<NodeFArrayBox>& a_dataTwo,
00614                      const BoxLayout& a_dblIn);
00615 
00616 
00618 
00632 Real DotProductNodes(const BoxLayoutData<NodeFArrayBox>& a_dataOne,
00633                      const BoxLayoutData<NodeFArrayBox>& a_dataTwo,
00634                      const BoxLayout& a_dblIn,
00635                      const Interval& a_comps);
00636 
00637 
00639 
00656 Real DotProductNodes(const LevelData<NodeFArrayBox>& a_dataOne,
00657                      const LevelData<NodeFArrayBox>& a_dataTwo,
00658                      const ProblemDomain& a_domain,
00659                      const LayoutData< Vector<IntVectSet> >& a_IVSVext,
00660                      const Interval& a_comps);
00661 
00662 Real DotProductNodes(const LevelData<NodeFArrayBox>& a_dataOne,
00663                      const LevelData<NodeFArrayBox>& a_dataTwo,
00664                      const Box& a_domain,
00665                      const LayoutData< Vector<IntVectSet> >& a_IVSVext,
00666                      const Interval& a_comps);
00667 
00668 
00670 
00685 Real DotProductNodes(const LevelData<NodeFArrayBox>& a_dataOne,
00686                      const LevelData<NodeFArrayBox>& a_dataTwo,
00687                      const ProblemDomain& a_domain,
00688                      const Interval& a_comps);
00689 
00690 Real DotProductNodes(const LevelData<NodeFArrayBox>& a_dataOne,
00691                      const LevelData<NodeFArrayBox>& a_dataTwo,
00692                      const Box& a_domain,
00693                      const Interval& a_comps);
00694 
00695 #endif

Generated on Tue Apr 15 18:34:51 2003 for AMRNodeElliptic by doxygen1.2.16