ArSp::ArrayOfMatrixAlloc Class Reference

#include <CHArray.H>

List of all members.

Detailed Description

Allocator for an array of matrices contiguous in memory.

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

Example - 1D Array of 2 3x3 matrices

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

Public Member Functions

 ArrayOfMatrixAlloc ()
void define (const USz_t a_m, const USz_t a_n)
CHMatrixallocate (const USz_t size)
void deallocate (CHMatrix *p, const USz_t size)

Private Attributes

USz_t m
USz_t n
bool defined

Constructor & Destructor Documentation

ArSp::ArrayOfMatrixAlloc::ArrayOfMatrixAlloc (  )  [inline]

Member Function Documentation

void ArSp::ArrayOfMatrixAlloc::define ( const USz_t  a_m,
const USz_t  a_n 
) [inline]

CHMatrix* ArSp::ArrayOfMatrixAlloc::allocate ( const USz_t  size  )  [inline]

void ArSp::ArrayOfMatrixAlloc::deallocate ( CHMatrix p,
const USz_t  size 
) [inline]

Member Data Documentation

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

Generated on Sat Jul 22 03:28:12 2017 for Chombo + EB + MF by  doxygen 1.5.5