00001 #ifndef NPGLVEC_H 00002 #define NPGLVEC_H 00003 00004 struct np_glob_vec 00005 { 00006 /// step id 00007 long istep; 00008 00009 00010 // Following pointers are not allocated, 00011 // they are used as references to arrays allocated somewhere else 00012 00013 /// nodal values 00014 double *lhs; 00015 /// time derivatives of nodal values 00016 double *tdlhs; 00017 /// right hand side 00018 double *rhs; 00019 00020 // Following pointers to arrays are allocated 00021 // allocation of vectors 00022 00023 /// vector of prescribed fluxes (right hand side) 00024 double *f; 00025 /// predictor 00026 double *d; 00027 /// auxiliary vector 00028 double *p; 00029 /// auxiliary vectors for nonlinear problems 00030 double *fb,*fi; 00031 00032 /// auxiliary vector for nonlinear problems in dform 00033 double *v; 00034 /// auxiliary vector for nonlinear problems in dform 00035 double *z; 00036 /// backup of nodal values 00037 double *lhsb; 00038 /// backup of time derivatives of nodal values 00039 double *tdlhsb; 00040 00041 00042 /// Default constructor 00043 np_glob_vec(); 00044 /// function allocates vectors lhs, tdlhs, rhs, f, d, p 00045 void alloc(long n); 00046 /// function allocates vectors fb, fi 00047 void alloc_aux(long n); 00048 /// function allocates vectors v, z, lhsb and tdlhsb for dform solver 00049 void alloc_daux(long n); 00050 /// function deallocates vectors lhs, tdlhs, rhs, f, d, p 00051 void dealloc(); 00052 /// Destructor deallocates vectors lhs, tdlhs, rhs, f, d, p 00053 ~np_glob_vec(); 00054 }; 00055 00056 #endif