CG  Version 25
ins/src/Insbc4WorkSpace.h
Go to the documentation of this file.
1 #ifndef INSBC4_WORK_SPACE_H
2 #define INSBC4_WORK_SPACE_H
3 
4 #include "Overture.h"
5 
6 // This class holds the "state" for the 4th order boundary conditions.
7 class Insbc4WorkSpace
8 {
9 public:
10  Insbc4WorkSpace(){ first=NULL; pnibt=NULL; pnib=NULL; pibe=NULL; ptg=NULL; pct=NULL; pcn=NULL;} //
12  void init( int numberOfGrids )
13  { assert( first==NULL );
14  first=new bool[numberOfGrids];
15  for( int g=0; g<numberOfGrids; g++ ) first[g]=true;
16  pnibt=new int[numberOfGrids];
17  pnib=new int [3*2*2*numberOfGrids]; pibe=new IntegerArray[numberOfGrids];
18  ptg=new RealArray[numberOfGrids]; pct=new RealArray[numberOfGrids];
19  pcn=new RealArray[numberOfGrids];} //
20  void destroy() { delete [] first; delete [] pnibt; delete [] pnib; delete [] pibe; delete [] ptg;
21  delete [] pct; delete [] pcn;
22  first=NULL; pnibt=NULL; pnib=NULL; pibe=NULL; ptg=NULL; pct=NULL; pcn=NULL; }
23 
24  bool *first;
25  int *pnibt;
26  int *pnib;
27  IntegerArray *pibe;
28  RealArray *ptg; // tg(nd,2,ib)
29  RealArray *pct; // ct(2,2,ib)
30  RealArray *pcn; // cn(2,2,ib)
31 
32 
33 };
34 
35 #endif