FreeFem 3.5.x
Public Member Functions | Public Attributes | List of all members
fem::Acmat Class Reference

Public Member Functions

 Acmat (long=0)
 
 Acmat (const Acmat &)
 
void destroy ()
 
cmatoperator[] (long i)
 
cmatoperator& ()
 
void init (long)
 

Public Attributes

long szz
 
cmatcc
 

Constructor & Destructor Documentation

◆ Acmat() [1/2]

fem::Acmat::Acmat ( long  sz = 0)
298{
299 cc = 0;
300 if (sz > 0)
301 {
302 cc = new cmat[sz];
303 if (!cc)
304 erreur ("Out of Memory");
305 for (int i = 0; i < sz; i++)
306 cc[i] = 0.F;
307 }
308 szz = sz;
309}

◆ Acmat() [2/2]

fem::Acmat::Acmat ( const Acmat a)
311{
312 cc = 0;
313 if (a.szz > 0)
314 {
315 szz = a.szz;
316 cc = new cmat[szz];
317 if (!cc)
318 erreur ("Out of Memory");
319 else
320 for (int i = 0; i < szz; i++)
321 cc[i] = a.cc[i];
322 }
323 else
324 {
325 cc = NULL;
326 szz = 0;
327 }
328}

◆ ~Acmat()

fem::Acmat::~Acmat ( )
inline
366 {
367 delete [] cc;
368 cc=0;
369 szz = 0;
370 }

Member Function Documentation

◆ destroy()

void fem::Acmat::destroy ( )
inline
371{delete [] cc;cc=0;szz = 0;}

◆ init()

void fem::Acmat::init ( long  newSize)
331{
332 myassert (!(szz || cc));
333 szz = newSize;
334 cc = new cmat[szz];
335 if (!cc)
336 erreur ("Out of Memory");
337 else
338 for (int i = 0; i < szz; i++)
339 cc[i] = 0.F;
340}

◆ operator&()

cmat * fem::Acmat::operator& ( )
inline
373{ return cc;}

◆ operator[]()

cmat & fem::Acmat::operator[] ( long  i)
inline
372{ /*myassert((i< szz)&&(i>=0));*/ return cc[i];}

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

This is the FreeFEM reference manual
Provided by The KFEM project