Box
.
More...
#include <BinFab.H>
Inheritance diagram for BinFab< T >:
Public Methods | |
BinFab () | |
Null constructor, copy constructor and operator= can be compiler defined. | |
BinFab (const Box &a_domain, const RealVect &a_mesh_spacing, const RealVect &a_origin) | |
Constructs an empty BinFab on a_domain. | |
BinFab (const BinFab &a_binfab) | |
Copy constructor. | |
virtual | ~BinFab () |
Destructor. | |
virtual void | define (const Box &a_domain, const RealVect &a_mesh_spacing, const RealVect &a_origin) |
Same as the constructor. | |
virtual void | reBin () |
Sort all the items into the appropriate bins, losing items not in the FAB's domain. | |
virtual void | reBin (List< T > &a_lost, const Box &a_valid=Box(), bool a_in=true) |
Sort all the items into the appropriate bins and return items in (or not in) the Box . | |
virtual void | addItem (const T &a_item) |
Copy one item into the appropriate bin. | |
virtual void | addItem (const T &a_item, const IntVect &a_bin) |
Copy one item into the specified bin. | |
virtual void | addItems (const List< T > &a_list) |
Copy items into the appropriate bins. | |
virtual void | addItemsDestructive (List< T > &a_list) |
Copy items into the appropriate bins and remove them from the List . | |
virtual void | addItemsDestructive (List< T > &a_list, const Box &a_valid, bool a_in=true) |
Copy items into the appropriate bins. Remove items that are in (or not in) the Box from the List . | |
virtual void | transfer (BinFab< T > &a_src, const Box &a_srcBox, const Box &a_destBox) |
Move particles from a BinFab to the overlapping cells in this one. | |
virtual void | clear () |
Delete all the items in this BinFab and reset it to the null Box . | |
virtual int | numItems (const Box &a_box=Box()) const |
Count the number of items in this BinFab in the specified Box . | |
virtual RealVect | meshSpacing () const |
Retrieve the mesh cell size, in physical coordinates. | |
virtual void | meshSpacing (const RealVect &a_mesh_spacing) |
Set the mesh cell size, in physical coordinates. | |
RealVect | origin () const |
Retrieve the physical coordinates of the lower corner of cell zero. | |
void | origin (const RealVect &a_origin) |
Set the physical coordinates of the lower corner of cell zero. | |
virtual int | size (const Box &a_box, const Interval &a_comps=Interval(0, 0)) const |
The number of bytes used by linearIn()/linearOut(). | |
virtual void | linearOut (void *a_buf, const Box &a_box, const Interval &a_comps) const |
Write a serialized (packed) representation into a_buf. | |
virtual void | linearOutDestructive (void *buf, const Box &a_box, const Interval &a_comps=Interval(0, 0)) |
Write a serialized (packed) representation into a_buf and remove from *this. | |
virtual void | linearIn (void *a_buf, const Box &a_box, const Interval &a_comps=Interval(0, 0)) |
Extract a serialized (packed) representation from a_buf. | |
const int * | size () const |
Should be inherited from BaseFab but it isn't, sigh; code is the same. | |
Static Public Methods | |
int | preAllocatable () |
Protected Methods | |
IntVect | locateBin (const T &a_item) const |
compute the cell index containing the physical position of the item | |
Protected Attributes | |
RealVect | m_origin |
location in physical space of the 0 index | |
RealVect | m_mesh_spacing |
cell size in physical space |
Box
.
This is a class for holding and sorting particle items. Class <T> must have a RealVect
<T>::position() const function which is used to place the item in an appropriate bin. See class BinItem
for a base class for particles. All BinFabs are assumed to have 1 component.
|
Null constructor, copy constructor and operator= can be compiler defined.
|
|
Constructs an empty
|
|
Copy constructor.
|
|
Destructor.
|
|
Copy one item into the specified bin.
|
|
Copy one item into the appropriate bin.
|
|
Copy items into the appropriate bins.
|
|
Copy items into the appropriate bins. Remove items that are in (or not in) the
|
|
Copy items into the appropriate bins and remove them from the
|
|
Delete all the items in this
Reimplemented from BaseFab< List< T > >. |
|
Same as the constructor.
|
|
Extract a serialized (packed) representation from a_buf.
Given a linear representation of the class data previously made using linearIn() in a_buf, set the data for this class on the specified Reimplemented from BaseFab< List< T > >. |
|
Write a serialized (packed) representation into a_buf.
Write a linear representation of the items in the specified Reimplemented from BaseFab< List< T > >. |
|
Write a serialized (packed) representation into a_buf and remove from *this.
Write a linear representation of the items in the specified |
|
compute the cell index containing the physical position of the item
|
|
Set the mesh cell size, in physical coordinates.
|
|
Retrieve the mesh cell size, in physical coordinates.
|
|
Count the number of items in this The default is to do the whole FAB. This is slow, so use it sparingly. |
|
Set the physical coordinates of the lower corner of cell zero.
|
|
Retrieve the physical coordinates of the lower corner of cell zero.
|
|
Reimplemented from BaseFab< List< T > >. |
|
Sort all the items into the appropriate bins and return items in (or not in) the This is used after "pushing" particles, to find which have left the domain of the BinFab. |
|
Sort all the items into the appropriate bins, losing items not in the FAB's domain. This is used after "pushing" particles (i.e. updating physical positions). |
|
Should be inherited from BaseFab but it isn't, sigh; code is the same. needed for loop-unroll macro Reimplemented from BaseFab< List< T > >. |
|
The number of bytes used by linearIn()/linearOut().
Returns the size, in number of bytes, of a flat linear representation of the items in the specified Reimplemented from BaseFab< List< T > >. |
|
Move particles from a
Performs a point-wise transfer of the whole |
|
cell size in physical space
|
|
location in physical space of the 0 index
|