IFEM 90A354
LinAlgInit.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _LINALG_INIT_H
15#define _LINALG_INIT_H
16
17
30{
32 LinAlgInit(int argc, char** argv);
33public:
36
38 static void increfs() { ++refs; }
40 static void decrefs() { if (--refs == 0) delete instance; }
41
43 static LinAlgInit& Init(int argc, char** argv);
44
45 int myPid;
46
47private:
48 static int refs;
49
51};
52
53#endif
Initializer for linear algebra packages.
Definition LinAlgInit.h:30
static LinAlgInit & Init(int argc, char **argv)
Instanciates the singleton LinAlgInit object.
Definition LinAlgInit.C:25
~LinAlgInit()
The destructor finalizes the linear algebra packages.
Definition LinAlgInit.C:52
static void decrefs()
Decrements the reference counter.
Definition LinAlgInit.h:40
int myPid
Processor ID in parallel simulations.
Definition LinAlgInit.h:45
static int refs
Reference counter.
Definition LinAlgInit.h:48
static LinAlgInit * instance
Pointer to the singleton object.
Definition LinAlgInit.h:50
static void increfs()
Increments the reference counter.
Definition LinAlgInit.h:38