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 46 template <
class T>
inline 51 define(a_ivsin, a_ebgraph, a_nvarin);
54 template <
class T>
inline 70 for (ivsit.
reset(); ivsit.
ok(); ++ivsit)
72 nVoFs += a_ebGraph.
numVoFs(ivsit());
96 template <
class T>
inline 109 for(
unsigned int i=0; i<
m_vofs->size(); i++, to++)
116 for(
unsigned int c=0; c<a_srcInterval.
size(); c++)
127 template <
class T>
inline 135 for (
unsigned int i=0; i<
m_vofs->size(); i++)
147 template <
class T>
inline 152 char* buffer = (
char*)a_buf;
153 buffer +=
sizeof(int);
157 const T* ptr = &(this->
m_data[0]);
158 for (
unsigned int i=0; i<
m_vofs->size(); i++, ptr++)
166 for (
int c=a_comps.
begin(); c<=a_comps.
end(); c++)
174 int* b = (
int*)a_buf;
178 template <
class T>
inline 181 int* b = (
int*)a_buf;
183 char* buffer = (
char*)a_buf;
184 buffer +=
sizeof(int);
185 for (
int i=0; i<count; i++)
190 for (
int c=a_comps.
begin(); c<=a_comps.
end(); c++)
199 template <
class T>
inline 207 for (
unsigned int i=0; i<
m_vofs->size(); ++i)
209 if (a_vof == (*
m_vofs)[i])
break;
212 dataPtr += a_comp*
m_vofs->size();
217 template <
class T>
inline 224 template <
class T>
inline 232 template <
class T>
inline 236 forall(*
this, a_region, a_startcomp, a_startcomp, a_ncomp,
false, [a_val](T& d,
const T& s){d=a_val;});
242 template <
class T>
inline 250 template <
class T>
inline 266 template <
typename F>
268 int a_numcomp,
bool sameRegBox,
const F& func)
275 int nvof =
m_vofs->size();
276 for (
int i=0; i<a_numcomp*nvof; i++)
284 for(
int i=0; i<vofs.
size(); i++)
289 for (
int icomp = 0; icomp < a_numcomp; ++icomp)
291 func(this->
operator()(vof, a_destcomp+icomp), a_src(vof, a_srccomp+icomp));
299 #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:56
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:128
int size() const
Definition: Interval.H:75
int numVoFs() const
Definition: MiniIVFABI.H:243
void forall(const MiniIVFAB &a_src, const Box &a_box, int a_srccomp, int a_destcomp, int a_numcomp, bool sameRegBox, const F &func)
Definition: MiniIVFABI.H:267
int begin() const
Definition: Interval.H:99
const IntVect & gridIndex() const
Definition: VolIndex.H:125
const Vector< VolIndex > getVector() const
bool contains(const IntVect &p) const
Definition: Box.H:1887
void reset()
same as begin()
Definition: IntVectSet.H:722
void copy(const Box &a_fromBox, const Interval &a_dstInterval, const Box &a_toBox, const MiniIVFAB< T > &a_src, const Interval &a_srcInterval)
Definition: MiniIVFABI.H:98
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:427
virtual T * getIndex(const VolIndex &a_vof, const int &a_comp) const
get index into vector
Definition: MiniIVFABI.H:201
long long numVoFs(const IntVect &a_iv) const
Definition: EBGraph.H:989
void setVal(const T &a_val)
Definition: MiniIVFABI.H:218
Structure for passing component ranges in code.
Definition: Interval.H:23
int m_nComp
Definition: MiniIVFAB.H:164
void linearIn(void *buf, const Box &R, const Interval &comps)
Definition: MiniIVFABI.H:179
void linearOut(void *buf, const Box &R, const Interval &comps) const
Definition: MiniIVFABI.H:148
void linearOut(void *const a_outBuf, const T &inputT)
Definition: SPMDI.H:33
double Real
Definition: REAL.H:33
int linearSize(const T &inputT)
Definition: SPMDI.H:21
size_t size() const
Definition: Vector.H:192
shared_ptr< Vector< VolIndex > > m_vofs
Definition: MiniIVFAB.H:162
T * dataPtr(int a_ivar)
Definition: MiniIVFAB.H:105
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
T * m_data
Definition: MiniIVFAB.H:165
Iterator for all vofs within an IntVectSet and an Ebgraph.
Definition: VoFIterator.H:27
Volume of Fluid Index.
Definition: VolIndex.H:31
Vector< VolIndex > getVoFs() const
Definition: MiniIVFABI.H:252
int end() const
Definition: Interval.H:104
shared_ptr< Vector< T > > m_Memory
Definition: MiniIVFAB.H:163
Iterator for an IntVectSet.
Definition: IntVectSet.H:640
void linearIn(T &a_outputT, const void *const inBuf)
Definition: SPMDI.H:27
bool isEmpty() const
Returns true if no IntVects are in this IntVectSet.
Definition: MiniIVFAB.H:37