Main Page | Modules | Namespace List | 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 "FArrayBox.H"
00038 
00040 
00103 class NodeFArrayBox
00104 {
00105 
00106 public:
00107 
00112 
00114 
00116   NodeFArrayBox();
00117 
00119 
00123   NodeFArrayBox(const Box& a_bx, int a_nComp=1);
00124 
00126 
00128   ~NodeFArrayBox();
00129 
00131 
00134   void define(const Box& a_bx, int a_nComp=1);
00135 
00142 
00144 
00146   const Box& box() const;
00147 
00149 
00152   FArrayBox& getFab();
00153 
00155 
00158   const FArrayBox& getFab() const;
00159 
00166 
00168 
00189   void copy(const NodeFArrayBox& a_src);
00190 
00192 
00205   void copy(const Box& a_regionFrom,
00206             const Interval& a_Cdest,
00207             const Box& a_regionTo,
00208             const NodeFArrayBox& a_src,
00209             const Interval& a_Csrc);
00210 
00217   
00219 
00226   int size(const Box& a_R, const Interval& a_comps) const;
00227 
00229 
00238   void linearOut(void* a_buf, const Box& a_R, const Interval& a_comps) const;
00239   
00241   void linearIn(void* a_buf);
00242 
00244   void linearIn(void* a_buf, const Box& a_R, const Interval& a_comps);
00245 
00247   static int preAllocatable() {return 0;}
00248 
00251 protected:
00252 
00253   // CELL-centered box. data are defined on the surrounding nodes.
00254   Box m_box;
00255 
00256   // NODE-centered data
00257   FArrayBox m_fab;
00258 
00259 private:
00261   
00262   NodeFArrayBox (const NodeFArrayBox&);
00263   NodeFArrayBox& operator = (const NodeFArrayBox&);
00264 
00265 };
00266 
00267 #endif

Generated on Fri Jul 2 17:53:42 2004 for Chombo by doxygen 1.3.2