Chombo + EB + MF  3.2
Public Member Functions | Private Attributes | List of all members
ArSp::ArrayOfVectorAlloc Class Reference

Allocator for an array of vectors contiguous in memory. More...

#include <CHArray.H>

Public Member Functions

 ArrayOfVectorAlloc ()
 
void define (const USz_t a_n)
 
CHVectorallocate (const USz_t size)
 
void deallocate (CHVector *p, const USz_t size)
 

Private Attributes

RealvectorData
 
USz_t n
 
bool defined
 

Detailed Description

Allocator for an array of vectors contiguous in memory.

Useful for allocating an array of vectors which can be easily passed to Fortran, etc.

Example - 1D Array of 2 size 3 vectors

*
*     CHArray<CHVector, 1, ArZeroRow, ArSp::ArrayOfVectorAlloc> AV;
*     AV.getAllocator().define(3);
*     AV.define(2);
*     AV(0) = 1.1;
*     AV(1) = 1.9;
*     std::cout << AV << std::endl;
*                                                        

Constructor & Destructor Documentation

ArSp::ArrayOfVectorAlloc::ArrayOfVectorAlloc ( )
inline

Member Function Documentation

void ArSp::ArrayOfVectorAlloc::define ( const USz_t  a_n)
inline
CHVector* ArSp::ArrayOfVectorAlloc::allocate ( const USz_t  size)
inline
void ArSp::ArrayOfVectorAlloc::deallocate ( CHVector p,
const USz_t  size 
)
inline

References IntVect::p().

Member Data Documentation

Real* ArSp::ArrayOfVectorAlloc::vectorData
private
USz_t ArSp::ArrayOfVectorAlloc::n
private
bool ArSp::ArrayOfVectorAlloc::defined
private

The documentation for this class was generated from the following file: