20 #include "NamespaceHeader.H" 31 m_mesh_spacing(
D_DECL6(0, 0, 0, 0, 0, 0)),
32 m_origin(
D_DECL6(0, 0, 0, 0, 0, 0))
42 define(a_box, a_meshSpacing, a_origin);
62 #ifdef CH_USE_MEMORY_TRACKING 83 #ifdef CH_USE_MEMORY_TRACKING 85 if (this->
s_Arena->bytes > this->s_Arena->peak)
111 #ifdef CH_USE_MEMORY_TRACKING 141 if (a_valid ==
m_box)
163 if (a_valid ==
m_box)
281 const Box& a_destBox,
283 const int a_destComp,
302 const Box& a_RegionTo,
309 a_src.
getItems(tmpList, a_RegionFrom);
365 const int totalSize =
numItems(a_box) * T().size() +
sizeof(size_t);
370 template <
class T>
void 379 const size_t tsize = T().size();
382 char* ch_buf = (
char*)a_buf;
388 *(
size_t*)ch_buf = items.
length();
389 ch_buf +=
sizeof(size_t);
393 li().linearOut(ch_buf);
398 template <
class T>
void 407 const size_t tsize = T().size();
410 char* ch_buf = (
char*)a_buf;
416 *(
size_t*)ch_buf = items.
length();
417 ch_buf +=
sizeof(size_t);
421 li().linearOut(ch_buf);
432 const size_t tsize = T().size();
435 char* ch_buf = (
char*)a_buf;
439 size_t numItems = *((
size_t*)ch_buf);
440 ch_buf +=
sizeof(size_t);
445 item.linearIn( ch_buf );
480 std::string rtn = (
typeid(T)).name();
496 bool is_in =
D_TERM6( (x[0]>=loEnd[0]*dx[0] && x[0]<(hiEnd[0]+1)*dx[0]),
497 && (x[1]>=loEnd[1]*dx[1] && x[1]<(hiEnd[1]+1)*dx[1]),
498 && (x[2]>=loEnd[2]*dx[2] && x[2]<(hiEnd[2]+1)*dx[2]),
499 && (x[3]>=loEnd[3]*dx[3] && x[3]<(hiEnd[3]+1)*dx[3]),
500 && (x[4]>=loEnd[4]*dx[4] && x[4]<(hiEnd[4]+1)*dx[4]),
501 && (x[5]>=loEnd[5]*dx[5] && x[5]<(hiEnd[5]+1)*dx[5]));
506 #include "NamespaceFooter.H" #define D_DECL6(a, b, c, d, e, f)
Definition: CHArray.H:39
void catenate(List< T > &src)
Appends a copy of all items in List<T> src to this List<T>.
Definition: ListImplem.H:211
RealVect m_mesh_spacing
The cell size in physical space.
Definition: ListBox.H:181
List< T > & listItems()
Returns the list of items contained in this ListBox.
Definition: ListBoxI.H:121
IntVect size() const
as in BaseFab; needed for loop-unroll macro
Definition: ListBox.H:163
#define D_TERM6(a, b, c, d, e, f)
Definition: CHArray.H:40
virtual void transfer(ListBox< T > &a_src, const Box &a_srcBox, const Box &a_destBox, const int a_srcComp=0, const int a_destComp=0, const int a_numComp=1)
Definition: ListBoxI.H:279
#define CH_assert(cond)
Definition: CHArray.H:37
virtual void addItems(const List< T > &a_list)
Definition: ListBoxI.H:235
void transfer(ListIterator< T > &lit)
Transfer the object pointed to by lit from the List<T> lit is associated with to this one...
Definition: ListImplem.H:317
Box m_box
The Box that defines the valid region of this ListBox.
Definition: ListBox.H:175
bool sameSize(const Box &b) const
Definition: Box.H:1912
virtual void linearOut(void *a_buf, const Box &a_box, const Interval &a_comps=Interval()) const
Write a serialized (packed) representation into a_buf.
Definition: ListBoxI.H:371
void append(const T &value)
Adds a copy of the value to the end of the List<T>.
Definition: List.H:582
bool contains(const IntVect &p) const
Definition: Box.H:1887
virtual bool isEnclosed(const T &a_item, const Box &a_box) const
Determines whether a_item is enclosed in a_box.
Definition: ListBoxI.H:486
RealVect m_origin
The center of our coordinate system. Used for binning our items.
Definition: ListBox.H:184
A Concrete Class for Dynamic Memory Management.
Definition: Arena.H:124
virtual void * alloc(size_t a_sz)=0
void join(const List< T > &src)
Appends a copy of all items in List<T> src to this List<T>.
Definition: ListImplem.H:203
virtual void define(const Box &a_box, const RealVect &a_meshSpacing, const RealVect &a_origin)
Same as the constructor.
Definition: ListBoxI.H:55
bool ok() const
Return true if the iterator is not past the end of the list.
Definition: List.H:465
virtual void free(void *a_pt)=0
const IntVect & bigEnd() const
Definition: Box.H:1784
static const RealVect Zero
Definition: RealVect.H:421
virtual ~ListBox()
Destructor.
Definition: ListBoxI.H:49
virtual void undefine()
Free the memory associated with this ListBox.
Definition: ListBoxI.H:99
Structure for passing component ranges in code.
Definition: Interval.H:23
A Doubly-Linked List Class.
Definition: List.H:21
Iterator over a List.
Definition: List.H:20
void add(const T &value)
Adds a copy of the value to the end of the List<T>.
Definition: ListImplem.H:49
const IntVect & smallEnd() const
{ Accessors}
Definition: Box.H:1770
A Virtual Base Class for Dynamic Memory Managemen.
Definition: Arena.H:40
virtual void getItemsDestructive(List< T > &a_list, const Box &a_valid)
Definition: ListBoxI.H:159
const Box & box() const
Retrieve the box.
Definition: ListBoxI.H:462
ListBox()
Null constructor.
Definition: ListBoxI.H:27
virtual void clear()
Delete all items in this ListBox and reset it to the null Box.
Definition: ListBoxI.H:468
bool isNotEmpty() const
Returns true if the List<T> is not empty.
Definition: List.H:627
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
static Arena * s_Arena
Definition: ListBox.H:170
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
virtual void getInvalidDestructive(List< T > &a_list, const Box &a_valid)
Definition: ListBoxI.H:204
int length() const
Returns the number of objects in the List<T>.
Definition: ListImplem.H:56
static std::string name()
Definition: ListBoxI.H:478
virtual const RealVect & meshSpacing() const
Retrieve the mesh size.
Definition: ListBoxI.H:456
virtual void addItem(const T &a_item)
Add a_item to this ListBox if it is contained within m_box.
Definition: ListBoxI.H:226
virtual void addItemsDestructive(List< T > &a_list)
Definition: ListBoxI.H:252
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
virtual void linearOutDestructive(void *buf, const Box &a_box, const Interval &a_comps=Interval())
Definition: ListBoxI.H:399
virtual size_t numItems() const
Return the number of items in this ListBox.
Definition: ListBoxI.H:314
virtual void getInvalid(List< T > &a_list, const Box &a_valid) const
Definition: ListBoxI.H:189
bool isEmpty() const
{ Comparison Functions}
Definition: Box.H:1862
List< T > * m_dptr
Pointer to the List that stores our items.
Definition: ListBox.H:178
virtual void getItems(List< T > &a_list, const Box &a_valid) const
Definition: ListBoxI.H:137
virtual void copy(const Box &a_RegionFrom, const Interval &a_Cdest, const Box &a_RegionTo, const ListBox< T > &a_src, const Interval &a_Csrc)
Definition: ListBoxI.H:300
virtual void linearIn(void *a_buf, const Box &a_box, const Interval &a_comps=Interval())
Extract a serialized (packed) representation from a_buf.
Definition: ListBoxI.H:427