Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class 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 "FArrayBox.H"
00038 
00040 
00103 class NodeFArrayBox
00104 {
00105 
00106 public:
00107 
00112 
00114 
00116   NodeFArrayBox();
00117 
00119 
00122   NodeFArrayBox(const Box& a_bx, int a_nComp, Real* a_alias = NULL);
00123 
00125 
00127   NodeFArrayBox(const Interval& a_comps, NodeFArrayBox& a_original);
00128 
00130 
00132   ~NodeFArrayBox();
00133 
00135 
00138   void define(const Box& a_bx, int a_nComp=1);
00139 
00146 
00148 
00150   const Box& box() const;
00151 
00153 
00156   FArrayBox& getFab();
00157 
00159 
00162   const FArrayBox& getFab() const;
00163 
00170 
00172 
00193   void copy(const NodeFArrayBox& a_src);
00194 
00196 
00209   void copy(const Box& a_regionFrom,
00210             const Interval& a_Cdest,
00211             const Box& a_regionTo,
00212             const NodeFArrayBox& a_src,
00213             const Interval& a_Csrc);
00214 
00221   
00223 
00230   int size(const Box& a_R, const Interval& a_comps) const;
00231 
00233 
00242   void linearOut(void* a_buf, const Box& a_R, const Interval& a_comps) const;
00243 
00245   void linearIn(void* a_buf, const Box& a_R, const Interval& a_comps);
00246 
00247 
00249   void linearOut(void* a_buf) const;
00251   void linearIn(const void* const a_buf);
00253   int linearSize(void) const;
00254 
00256   static int preAllocatable() {return 0;}
00257 
00260 protected:
00261 
00262   // CELL-centered box. data are defined on the surrounding nodes.
00263   Box m_box;
00264 
00265   // NODE-centered data
00266   FArrayBox m_fab;
00267 
00268 private:
00270   
00271   NodeFArrayBox (const NodeFArrayBox&);
00272   NodeFArrayBox& operator = (const NodeFArrayBox&);
00273 
00274 };
00275 
00276 #endif

Generated on Wed Oct 5 13:52:09 2005 for Chombo&AMRSelfGravity by  doxygen 1.4.1