11 #ifndef _MINIIVFABI_H_ 12 #define _MINIIVFABI_H_ 21 #include "NamespaceHeader.H" 25 template <
class T>
inline 31 template <
class T>
inline 37 template <
class T>
inline 43 define(a_ivsin, a_ebgraph, a_nvarin);
46 template <
class T>
inline 53 this->m_isDefined =
true;
56 this->m_ivs = a_ivsin;
57 this->m_nComp = a_nvarin;
58 this->m_ebgraph = a_ebGraph;
65 for (ivsit.
reset(); ivsit.
ok(); ++ivsit)
67 this->m_nVoFs += this->m_ebgraph.numVoFs(ivsit());
72 if (this->m_nVoFs > 0)
75 this->m_data.resize(this->m_nVoFs*this->m_nComp);
84 template <
class T>
inline 92 for (
int i=0; i<m_vofs.size(); i++)
94 if (a_region.
contains(m_vofs[i].gridIndex())) count++;
103 template <
class T>
inline 109 char* buffer = (
char*)a_buf;
110 buffer +=
sizeof(int);
114 const T* ptr = &(this->m_data[0]);
115 for (
int i=0; i<m_vofs.size(); i++, ptr++)
123 for (
int c=a_comps.
begin(); c<=a_comps.
end(); c++)
131 int* b = (
int*)a_buf;
135 template <
class T>
inline 139 int* b = (
int*)a_buf;
141 char* buffer = (
char*)a_buf;
142 buffer +=
sizeof(int);
143 for (
int i=0; i<count; i++)
148 for (
int c=a_comps.
begin(); c<=a_comps.
end(); c++)
150 T* ptr = getIndex(v, c);
157 template <
class T>
inline 163 CH_assert((a_comp >= 0) && (a_comp < this->m_nComp));
165 T* dataPtr = (T*)&(this->m_data[0]);
166 for (
int i=0; i<m_vofs.size(); ++i)
168 if (a_vof == m_vofs[i])
break;
171 dataPtr += a_comp*this->m_nVoFs;
175 template <
class T>
inline 186 template <
class T>
inline 195 template <
class T>
inline 203 #include "NamespaceFooter.H" MiniIVFAB()
Definition: MiniIVFABI.H:26
virtual void define(const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_nvarin)
Definition: MiniIVFABI.H:48
virtual void clear()
Definition: MiniIVFABI.H:177
virtual ~MiniIVFAB()
Definition: MiniIVFABI.H:32
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
#define CH_assert(cond)
Definition: CHArray.H:37
int size(const Box &R, const Interval &comps) const
Definition: MiniIVFABI.H:85
virtual void setDefaultValues()
Definition: BaseIVFABI.H:435
int size() const
Definition: Interval.H:64
int begin() const
Definition: Interval.H:86
const IntVect & gridIndex() const
Definition: VolIndex.H:119
const Vector< VolIndex > getVector() const
bool contains(const IntVect &p) const
Definition: Box.H:1888
void reset()
same as begin()
Definition: IntVectSet.H:722
bool ok() const
returns true if this iterator is still in its IntVectSet
Definition: IntVectSet.H:711
Geometric description within a box.
Definition: EBGraph.H:432
virtual T * getIndex(const VolIndex &a_vof, const int &a_comp) const
get index into vector
Definition: MiniIVFABI.H:159
Structure for passing component ranges in code.
Definition: Interval.H:23
void linearIn(void *buf, const Box &R, const Interval &comps)
Definition: MiniIVFABI.H:136
void linearOut(void *buf, const Box &R, const Interval &comps) const
Definition: MiniIVFABI.H:104
const Vector< VolIndex > & getVoFs() const
Definition: MiniIVFABI.H:188
void linearOut(void *const a_outBuf, const T &inputT)
Definition: SPMDI.H:32
int linearSize(const T &inputT)
Definition: SPMDI.H:20
virtual void clear()
Definition: BaseIVFABI.H:347
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
Iterator for all vofs within an IntVectSet and an Ebgraph.
Definition: VoFIterator.H:27
Volume of Fluid Index.
Definition: VolIndex.H:31
int end() const
Definition: Interval.H:91
virtual void setDefaultValues()
Definition: MiniIVFABI.H:197
Iterator for an IntVectSet.
Definition: IntVectSet.H:640
void linearIn(T &a_outputT, const void *const inBuf)
Definition: SPMDI.H:26
bool isEmpty() const
Returns true if no IntVects are in this IntVectSet.