GridforceFullBaseGrid Class Reference

#include <GridForceGrid.h>

Inheritance diagram for GridforceFullBaseGrid:

GridforceFullMainGrid GridforceFullSubGrid List of all members.

Public Member Functions

 GridforceFullBaseGrid (void)
virtual ~GridforceFullBaseGrid ()
Position get_center (void) const
Position get_origin (void) const
Tensor get_e (void) const
Tensor get_inv (void) const
Vector get_scale (void) const
Bool get_checksize (void) const
virtual int get_border (void) const =0
float get_grid (int i0, int i1, int i2) const
double get_grid_d (int i0, int i1, int i2) const
void set_grid (int i0, int i1, int i2, float V)
void set_scale (Vector s)
int compute_VdV (Position pos, float &V, Vector &dV) const
int get_k0 (void) const
int get_k1 (void) const
int get_k2 (void) const

Protected Member Functions

virtual void pack (MOStream *msg) const
virtual void unpack (MIStream *msg)
void readHeader (SimParameters *simParams, MGridforceParams *mgridParams)
long int grid_index (int i0, int i1, int i2) const
int get_inds (Position pos, int *inds, Vector &dg, Vector &gapscale) const
void compute_a (float *a, float *b) const
virtual void compute_b (float *b, int *inds, Vector gapscale) const =0
float compute_V (float *a, float *x, float *y, float *z) const
Vector compute_dV (float *a, float *x, float *y, float *z) const
Vector compute_d2V (float *a, float *x, float *y, float *z) const
float compute_d3V (float *a, float *x, float *y, float *z) const
void readSubgridHierarchy (FILE *poten, int &totalGrids)

Protected Attributes

FILE * poten_fp
float * grid
GridforceFullSubGrid ** subgrids
int numSubgrids
int generation
int k [3]
int k_nopad [3]
long int size
long int size_nopad
long int dk [3]
long int dk_nopad [3]
float factor
Position origin
Position center
Tensor e
Tensor inv
double p_sum [3]
double n_sum [3]
double pad_p [3]
double pad_n [3]
Bool cont [3]
float offset [3]
float gap [3]
float gapinv [3]
Vector scale
Bool checksize

Friends

class GridforceFullMainGrid
class GridforceFullSubGrid

Classes

struct  GridIndices

Detailed Description

Definition at line 82 of file GridForceGrid.h.


Constructor & Destructor Documentation

GridforceFullBaseGrid::GridforceFullBaseGrid ( void   ) 

Definition at line 137 of file GridForceGrid.C.

References cont, FALSE, grid, numSubgrids, and subgrids.

00138 {
00139     cont[0] = cont[1] = cont[2] = FALSE;
00140     grid = NULL;
00141     numSubgrids = 0;
00142     subgrids = NULL;
00143 }

GridforceFullBaseGrid::~GridforceFullBaseGrid (  )  [virtual]

Definition at line 145 of file GridForceGrid.C.

References grid, numSubgrids, and subgrids.

00146 {
00147     delete[] grid;
00148     for (int i = 0; i < numSubgrids; i++) {
00149         delete subgrids[i];
00150     }
00151     delete[] subgrids;
00152 }


Member Function Documentation

void GridforceFullBaseGrid::compute_a ( float *  a,
float *  b 
) const [inline, protected]

Definition at line 228 of file GridForceGrid.inl.

Referenced by GridforceFullSubGrid::compute_b(), and compute_VdV().

00229 {
00230     // Static sparse 64x64 matrix times vector ... nicer looking way than this?
00231     a[0] = b[0];
00232     a[1] = b[8];
00233     a[2] = -3*b[0] + 3*b[1] - 2*b[8] - b[9];
00234     a[3] = 2*b[0] - 2*b[1] + b[8] + b[9];
00235     a[4] = b[16];
00236     a[5] = b[32];
00237     a[6] = -3*b[16] + 3*b[17] - 2*b[32] - b[33];
00238     a[7] = 2*b[16] - 2*b[17] + b[32] + b[33];
00239     a[8] = -3*b[0] + 3*b[2] - 2*b[16] - b[18];
00240     a[9] = -3*b[8] + 3*b[10] - 2*b[32] - b[34];
00241     a[10] = 9*b[0] - 9*b[1] - 9*b[2] + 9*b[3] + 6*b[8] + 3*b[9] - 6*b[10] - 3*b[11]
00242         + 6*b[16] - 6*b[17] + 3*b[18] - 3*b[19] + 4*b[32] + 2*b[33] + 2*b[34] + b[35];
00243     a[11] = -6*b[0] + 6*b[1] + 6*b[2] - 6*b[3] - 3*b[8] - 3*b[9] + 3*b[10] + 3*b[11]
00244         - 4*b[16] + 4*b[17] - 2*b[18] + 2*b[19] - 2*b[32] - 2*b[33] - b[34] - b[35];
00245     a[12] = 2*b[0] - 2*b[2] + b[16] + b[18];
00246     a[13] = 2*b[8] - 2*b[10] + b[32] + b[34];
00247     a[14] = -6*b[0] + 6*b[1] + 6*b[2] - 6*b[3] - 4*b[8] - 2*b[9] + 4*b[10] + 2*b[11]
00248         - 3*b[16] + 3*b[17] - 3*b[18] + 3*b[19] - 2*b[32] - b[33] - 2*b[34] - b[35];
00249     a[15] = 4*b[0] - 4*b[1] - 4*b[2] + 4*b[3] + 2*b[8] + 2*b[9] - 2*b[10] - 2*b[11]
00250         + 2*b[16] - 2*b[17] + 2*b[18] - 2*b[19] + b[32] + b[33] + b[34] + b[35];
00251     a[16] = b[24];
00252     a[17] = b[40];
00253     a[18] = -3*b[24] + 3*b[25] - 2*b[40] - b[41];
00254     a[19] = 2*b[24] - 2*b[25] + b[40] + b[41];
00255     a[20] = b[48];
00256     a[21] = b[56];
00257     a[22] = -3*b[48] + 3*b[49] - 2*b[56] - b[57];
00258     a[23] = 2*b[48] - 2*b[49] + b[56] + b[57];
00259     a[24] = -3*b[24] + 3*b[26] - 2*b[48] - b[50];
00260     a[25] = -3*b[40] + 3*b[42] - 2*b[56] - b[58];
00261     a[26] = 9*b[24] - 9*b[25] - 9*b[26] + 9*b[27] + 6*b[40] + 3*b[41] - 6*b[42] - 3*b[43]
00262         + 6*b[48] - 6*b[49] + 3*b[50] - 3*b[51] + 4*b[56] + 2*b[57] + 2*b[58] + b[59];
00263     a[27] = -6*b[24] + 6*b[25] + 6*b[26] - 6*b[27] - 3*b[40] - 3*b[41] + 3*b[42] + 3*b[43]
00264         - 4*b[48] + 4*b[49] - 2*b[50] + 2*b[51] - 2*b[56] - 2*b[57] - b[58] - b[59];
00265     a[28] = 2*b[24] - 2*b[26] + b[48] + b[50];
00266     a[29] = 2*b[40] - 2*b[42] + b[56] + b[58];
00267     a[30] = -6*b[24] + 6*b[25] + 6*b[26] - 6*b[27] - 4*b[40] - 2*b[41] + 4*b[42] + 2*b[43]
00268         - 3*b[48] + 3*b[49] - 3*b[50] + 3*b[51] - 2*b[56] - b[57] - 2*b[58] - b[59];
00269     a[31] = 4*b[24] - 4*b[25] - 4*b[26] + 4*b[27] + 2*b[40] + 2*b[41] - 2*b[42] - 2*b[43]
00270         + 2*b[48] - 2*b[49] + 2*b[50] - 2*b[51] + b[56] + b[57] + b[58] + b[59];
00271     a[32] = -3*b[0] + 3*b[4] - 2*b[24] - b[28];
00272     a[33] = -3*b[8] + 3*b[12] - 2*b[40] - b[44];
00273     a[34] = 9*b[0] - 9*b[1] - 9*b[4] + 9*b[5] + 6*b[8] + 3*b[9] - 6*b[12] - 3*b[13]
00274         + 6*b[24] - 6*b[25] + 3*b[28] - 3*b[29] + 4*b[40] + 2*b[41] + 2*b[44] + b[45];
00275     a[35] = -6*b[0] + 6*b[1] + 6*b[4] - 6*b[5] - 3*b[8] - 3*b[9] + 3*b[12] + 3*b[13]
00276         - 4*b[24] + 4*b[25] - 2*b[28] + 2*b[29] - 2*b[40] - 2*b[41] - b[44] - b[45];
00277     a[36] = -3*b[16] + 3*b[20] - 2*b[48] - b[52];
00278     a[37] = -3*b[32] + 3*b[36] - 2*b[56] - b[60];
00279     a[38] = 9*b[16] - 9*b[17] - 9*b[20] + 9*b[21] + 6*b[32] + 3*b[33] - 6*b[36] - 3*b[37]
00280         + 6*b[48] - 6*b[49] + 3*b[52] - 3*b[53] + 4*b[56] + 2*b[57] + 2*b[60] + b[61];
00281     a[39] = -6*b[16] + 6*b[17] + 6*b[20] - 6*b[21] - 3*b[32] - 3*b[33] + 3*b[36] + 3*b[37]
00282         - 4*b[48] + 4*b[49] - 2*b[52] + 2*b[53] - 2*b[56] - 2*b[57] - b[60] - b[61];
00283     a[40] = 9*b[0] - 9*b[2] - 9*b[4] + 9*b[6] + 6*b[16] + 3*b[18] - 6*b[20] - 3*b[22]
00284         + 6*b[24] - 6*b[26] + 3*b[28] - 3*b[30] + 4*b[48] + 2*b[50] + 2*b[52] + b[54];
00285     a[41] = 9*b[8] - 9*b[10] - 9*b[12] + 9*b[14] + 6*b[32] + 3*b[34] - 6*b[36] - 3*b[38]
00286         + 6*b[40] - 6*b[42] + 3*b[44] - 3*b[46] + 4*b[56] + 2*b[58] + 2*b[60] + b[62];
00287     a[42] = -27*b[0] + 27*b[1] + 27*b[2] - 27*b[3] + 27*b[4] - 27*b[5] - 27*b[6] + 27*b[7]
00288         - 18*b[8] - 9*b[9] + 18*b[10] + 9*b[11] + 18*b[12] + 9*b[13] - 18*b[14] - 9*b[15]
00289         - 18*b[16] + 18*b[17] - 9*b[18] + 9*b[19] + 18*b[20] - 18*b[21] + 9*b[22] - 9*b[23]
00290         - 18*b[24] + 18*b[25] + 18*b[26] - 18*b[27] - 9*b[28] + 9*b[29] + 9*b[30] - 9*b[31]
00291         - 12*b[32] - 6*b[33] - 6*b[34] - 3*b[35] + 12*b[36] + 6*b[37] + 6*b[38] + 3*b[39]
00292         - 12*b[40] - 6*b[41] + 12*b[42] + 6*b[43] - 6*b[44] - 3*b[45] + 6*b[46] + 3*b[47]
00293         - 12*b[48] + 12*b[49] - 6*b[50] + 6*b[51] - 6*b[52] + 6*b[53] - 3*b[54] + 3*b[55]
00294         - 8*b[56] - 4*b[57] - 4*b[58] - 2*b[59] - 4*b[60] - 2*b[61] - 2*b[62] - b[63];
00295     a[43] = 18*b[0] - 18*b[1] - 18*b[2] + 18*b[3] - 18*b[4] + 18*b[5] + 18*b[6] - 18*b[7]
00296         + 9*b[8] + 9*b[9] - 9*b[10] - 9*b[11] - 9*b[12] - 9*b[13] + 9*b[14] + 9*b[15]
00297         + 12*b[16] - 12*b[17] + 6*b[18] - 6*b[19] - 12*b[20] + 12*b[21] - 6*b[22] + 6*b[23]
00298         + 12*b[24] - 12*b[25] - 12*b[26] + 12*b[27] + 6*b[28] - 6*b[29] - 6*b[30] + 6*b[31]
00299         + 6*b[32] + 6*b[33] + 3*b[34] + 3*b[35] - 6*b[36] - 6*b[37] - 3*b[38] - 3*b[39]
00300         + 6*b[40] + 6*b[41] - 6*b[42] - 6*b[43] + 3*b[44] + 3*b[45] - 3*b[46] - 3*b[47]
00301         + 8*b[48] - 8*b[49] + 4*b[50] - 4*b[51] + 4*b[52] - 4*b[53] + 2*b[54] - 2*b[55]
00302         + 4*b[56] + 4*b[57] + 2*b[58] + 2*b[59] + 2*b[60] + 2*b[61] + b[62] + b[63];
00303     a[44] = -6*b[0] + 6*b[2] + 6*b[4] - 6*b[6] - 3*b[16] - 3*b[18] + 3*b[20] + 3*b[22]
00304         - 4*b[24] + 4*b[26] - 2*b[28] + 2*b[30] - 2*b[48] - 2*b[50] - b[52] - b[54];
00305     a[45] = -6*b[8] + 6*b[10] + 6*b[12] - 6*b[14] - 3*b[32] - 3*b[34] + 3*b[36] + 3*b[38]
00306         - 4*b[40] + 4*b[42] - 2*b[44] + 2*b[46] - 2*b[56] - 2*b[58] - b[60] - b[62];
00307     a[46] = 18*b[0] - 18*b[1] - 18*b[2] + 18*b[3] - 18*b[4] + 18*b[5] + 18*b[6] - 18*b[7]
00308         + 12*b[8] + 6*b[9] - 12*b[10] - 6*b[11] - 12*b[12] - 6*b[13] + 12*b[14] + 6*b[15]
00309         + 9*b[16] - 9*b[17] + 9*b[18] - 9*b[19] - 9*b[20] + 9*b[21] - 9*b[22] + 9*b[23]
00310         + 12*b[24] - 12*b[25] - 12*b[26] + 12*b[27] + 6*b[28] - 6*b[29] - 6*b[30] + 6*b[31]
00311         + 6*b[32] + 3*b[33] + 6*b[34] + 3*b[35] - 6*b[36] - 3*b[37] - 6*b[38] - 3*b[39]
00312         + 8*b[40] + 4*b[41] - 8*b[42] - 4*b[43] + 4*b[44] + 2*b[45] - 4*b[46] - 2*b[47]
00313         + 6*b[48] - 6*b[49] + 6*b[50] - 6*b[51] + 3*b[52] - 3*b[53] + 3*b[54] - 3*b[55]
00314         + 4*b[56] + 2*b[57] + 4*b[58] + 2*b[59] + 2*b[60] + b[61] + 2*b[62] + b[63];
00315     a[47] = -12*b[0] + 12*b[1] + 12*b[2] - 12*b[3] + 12*b[4] - 12*b[5] - 12*b[6] + 12*b[7]
00316         - 6*b[8] - 6*b[9] + 6*b[10] + 6*b[11] + 6*b[12] + 6*b[13] - 6*b[14] - 6*b[15]
00317         - 6*b[16] + 6*b[17] - 6*b[18] + 6*b[19] + 6*b[20] - 6*b[21] + 6*b[22] - 6*b[23]
00318         - 8*b[24] + 8*b[25] + 8*b[26] - 8*b[27] - 4*b[28] + 4*b[29] + 4*b[30] - 4*b[31]
00319         - 3*b[32] - 3*b[33] - 3*b[34] - 3*b[35] + 3*b[36] + 3*b[37] + 3*b[38] + 3*b[39]
00320         - 4*b[40] - 4*b[41] + 4*b[42] + 4*b[43] - 2*b[44] - 2*b[45] + 2*b[46] + 2*b[47]
00321         - 4*b[48] + 4*b[49] - 4*b[50] + 4*b[51] - 2*b[52] + 2*b[53] - 2*b[54] + 2*b[55]
00322         - 2*b[56] - 2*b[57] - 2*b[58] - 2*b[59] - b[60] - b[61] - b[62] - b[63];
00323     a[48] = 2*b[0] - 2*b[4] + b[24] + b[28];
00324     a[49] = 2*b[8] - 2*b[12] + b[40] + b[44];
00325     a[50] = -6*b[0] + 6*b[1] + 6*b[4] - 6*b[5] - 4*b[8] - 2*b[9] + 4*b[12] + 2*b[13]
00326         - 3*b[24] + 3*b[25] - 3*b[28] + 3*b[29] - 2*b[40] - b[41] - 2*b[44] - b[45];
00327     a[51] = 4*b[0] - 4*b[1] - 4*b[4] + 4*b[5] + 2*b[8] + 2*b[9] - 2*b[12] - 2*b[13]
00328         + 2*b[24] - 2*b[25] + 2*b[28] - 2*b[29] + b[40] + b[41] + b[44] + b[45];
00329     a[52] = 2*b[16] - 2*b[20] + b[48] + b[52];
00330     a[53] = 2*b[32] - 2*b[36] + b[56] + b[60];
00331     a[54] = -6*b[16] + 6*b[17] + 6*b[20] - 6*b[21] - 4*b[32] - 2*b[33] + 4*b[36] + 2*b[37]
00332         - 3*b[48] + 3*b[49] - 3*b[52] + 3*b[53] - 2*b[56] - b[57] - 2*b[60] - b[61];
00333     a[55] = 4*b[16] - 4*b[17] - 4*b[20] + 4*b[21] + 2*b[32] + 2*b[33] - 2*b[36] - 2*b[37]
00334         + 2*b[48] - 2*b[49] + 2*b[52] - 2*b[53] + b[56] + b[57] + b[60] + b[61];
00335     a[56] = -6*b[0] + 6*b[2] + 6*b[4] - 6*b[6] - 4*b[16] - 2*b[18] + 4*b[20] + 2*b[22]
00336         - 3*b[24] + 3*b[26] - 3*b[28] + 3*b[30] - 2*b[48] - b[50] - 2*b[52] - b[54];
00337     a[57] = -6*b[8] + 6*b[10] + 6*b[12] - 6*b[14] - 4*b[32] - 2*b[34] + 4*b[36] + 2*b[38]
00338         - 3*b[40] + 3*b[42] - 3*b[44] + 3*b[46] - 2*b[56] - b[58] - 2*b[60] - b[62];
00339     a[58] = 18*b[0] - 18*b[1] - 18*b[2] + 18*b[3] - 18*b[4] + 18*b[5] + 18*b[6] - 18*b[7]
00340         + 12*b[8] + 6*b[9] - 12*b[10] - 6*b[11] - 12*b[12] - 6*b[13] + 12*b[14] + 6*b[15]
00341         + 12*b[16] - 12*b[17] + 6*b[18] - 6*b[19] - 12*b[20] + 12*b[21] - 6*b[22] + 6*b[23]
00342         + 9*b[24] - 9*b[25] - 9*b[26] + 9*b[27] + 9*b[28] - 9*b[29] - 9*b[30] + 9*b[31]
00343         + 8*b[32] + 4*b[33] + 4*b[34] + 2*b[35] - 8*b[36] - 4*b[37] - 4*b[38] - 2*b[39]
00344         + 6*b[40] + 3*b[41] - 6*b[42] - 3*b[43] + 6*b[44] + 3*b[45] - 6*b[46] - 3*b[47]
00345         + 6*b[48] - 6*b[49] + 3*b[50] - 3*b[51] + 6*b[52] - 6*b[53] + 3*b[54] - 3*b[55]
00346         + 4*b[56] + 2*b[57] + 2*b[58] + b[59] + 4*b[60] + 2*b[61] + 2*b[62] + b[63];
00347     a[59] = -12*b[0] + 12*b[1] + 12*b[2] - 12*b[3] + 12*b[4] - 12*b[5] - 12*b[6] + 12*b[7]
00348         - 6*b[8] - 6*b[9] + 6*b[10] + 6*b[11] + 6*b[12] + 6*b[13] - 6*b[14] - 6*b[15]
00349         - 8*b[16] + 8*b[17] - 4*b[18] + 4*b[19] + 8*b[20] - 8*b[21] + 4*b[22] - 4*b[23]
00350         - 6*b[24] + 6*b[25] + 6*b[26] - 6*b[27] - 6*b[28] + 6*b[29] + 6*b[30] - 6*b[31]
00351         - 4*b[32] - 4*b[33] - 2*b[34] - 2*b[35] + 4*b[36] + 4*b[37] + 2*b[38] + 2*b[39]
00352         - 3*b[40] - 3*b[41] + 3*b[42] + 3*b[43] - 3*b[44] - 3*b[45] + 3*b[46] + 3*b[47]
00353         - 4*b[48] + 4*b[49] - 2*b[50] + 2*b[51] - 4*b[52] + 4*b[53] - 2*b[54] + 2*b[55]
00354         - 2*b[56] - 2*b[57] - b[58] - b[59] - 2*b[60] - 2*b[61] - b[62] - b[63];
00355     a[60] = 4*b[0] - 4*b[2] - 4*b[4] + 4*b[6] + 2*b[16] + 2*b[18] - 2*b[20] - 2*b[22]
00356         + 2*b[24] - 2*b[26] + 2*b[28] - 2*b[30] + b[48] + b[50] + b[52] + b[54];
00357     a[61] = 4*b[8] - 4*b[10] - 4*b[12] + 4*b[14] + 2*b[32] + 2*b[34] - 2*b[36] - 2*b[38]
00358         + 2*b[40] - 2*b[42] + 2*b[44] - 2*b[46] + b[56] + b[58] + b[60] + b[62];
00359     a[62] = -12*b[0] + 12*b[1] + 12*b[2] - 12*b[3] + 12*b[4] - 12*b[5] - 12*b[6] + 12*b[7]
00360         - 8*b[8] - 4*b[9] + 8*b[10] + 4*b[11] + 8*b[12] + 4*b[13] - 8*b[14] - 4*b[15]
00361         - 6*b[16] + 6*b[17] - 6*b[18] + 6*b[19] + 6*b[20] - 6*b[21] + 6*b[22] - 6*b[23]
00362         - 6*b[24] + 6*b[25] + 6*b[26] - 6*b[27] - 6*b[28] + 6*b[29] + 6*b[30] - 6*b[31]
00363         - 4*b[32] - 2*b[33] - 4*b[34] - 2*b[35] + 4*b[36] + 2*b[37] + 4*b[38] + 2*b[39]
00364         - 4*b[40] - 2*b[41] + 4*b[42] + 2*b[43] - 4*b[44] - 2*b[45] + 4*b[46] + 2*b[47]
00365         - 3*b[48] + 3*b[49] - 3*b[50] + 3*b[51] - 3*b[52] + 3*b[53] - 3*b[54] + 3*b[55]
00366         - 2*b[56] - b[57] - 2*b[58] - b[59] - 2*b[60] - b[61] - 2*b[62] - b[63];
00367     a[63] = 8*b[0] - 8*b[1] - 8*b[2] + 8*b[3] - 8*b[4] + 8*b[5] + 8*b[6] - 8*b[7]
00368         + 4*b[8] + 4*b[9] - 4*b[10] - 4*b[11] - 4*b[12] - 4*b[13] + 4*b[14] + 4*b[15]
00369         + 4*b[16] - 4*b[17] + 4*b[18] - 4*b[19] - 4*b[20] + 4*b[21] - 4*b[22] + 4*b[23]
00370         + 4*b[24] - 4*b[25] - 4*b[26] + 4*b[27] + 4*b[28] - 4*b[29] - 4*b[30] + 4*b[31]
00371         + 2*b[32] + 2*b[33] + 2*b[34] + 2*b[35] - 2*b[36] - 2*b[37] - 2*b[38] - 2*b[39]
00372         + 2*b[40] + 2*b[41] - 2*b[42] - 2*b[43] + 2*b[44] + 2*b[45] - 2*b[46] - 2*b[47]
00373         + 2*b[48] - 2*b[49] + 2*b[50] - 2*b[51] + 2*b[52] - 2*b[53] + 2*b[54] - 2*b[55]
00374         + b[56] + b[57] + b[58] + b[59] + b[60] + b[61] + b[62] + b[63];
00375 }

virtual void GridforceFullBaseGrid::compute_b ( float *  b,
int *  inds,
Vector  gapscale 
) const [protected, pure virtual]

Implemented in GridforceFullMainGrid, and GridforceFullSubGrid.

Referenced by GridforceFullSubGrid::compute_b(), and compute_VdV().

Vector GridforceFullBaseGrid::compute_d2V ( float *  a,
float *  x,
float *  y,
float *  z 
) const [inline, protected]

Definition at line 194 of file GridForceGrid.inl.

References if(), j, k, Vector::x, Vector::y, and Vector::z.

Referenced by GridforceFullSubGrid::compute_b().

00195 {
00196     Vector d2V = 0;
00197     int ind = 0;
00198     for (int l = 0; l < 4; l++) {
00199         for (int k = 0; k < 4; k++) {
00200             for (int j = 0; j < 4; j++) {
00201                 if (j > 0 && k > 0) d2V.x += a[ind] * j * k * x[j-1] * y[k-1] * z[l];   // d2V/dxdy
00202                 if (j > 0 && l > 0) d2V.y += a[ind] * j * l * x[j-1] * y[k]   * z[l-1]; // d2V/dxdz
00203                 if (k > 0 && l > 0) d2V.z += a[ind] * k * l * x[j]   * y[k-1] * z[l-1]; // d2V/dydz
00204                 ind++;
00205             }
00206         }
00207     }
00208     return d2V;
00209 }

float GridforceFullBaseGrid::compute_d3V ( float *  a,
float *  x,
float *  y,
float *  z 
) const [inline, protected]

Definition at line 212 of file GridForceGrid.inl.

References j, and k.

Referenced by GridforceFullSubGrid::compute_b().

00213 {
00214     float d3V = 0.0;
00215     long int ind = 0;
00216     for (int l = 0; l < 4; l++) {
00217         for (int k = 0; k < 4; k++) {
00218             for (int j = 0; j < 4; j++) {
00219                 if (j > 0 && k > 0 && l > 0) d3V += a[ind] * j * k * l * x[j-1] * y[k-1] * z[l-1];      // d3V/dxdydz
00220                 ind++;
00221             }
00222         }
00223     }
00224     return d3V;
00225 }

Vector GridforceFullBaseGrid::compute_dV ( float *  a,
float *  x,
float *  y,
float *  z 
) const [inline, protected]

Definition at line 176 of file GridForceGrid.inl.

References if(), j, k, Vector::x, Vector::y, and Vector::z.

Referenced by GridforceFullSubGrid::compute_b(), and compute_VdV().

00177 {
00178     Vector dV = 0;
00179     long int ind = 0;
00180     for (int l = 0; l < 4; l++) {
00181         for (int k = 0; k < 4; k++) {
00182             for (int j = 0; j < 4; j++) {
00183                 if (j > 0) dV.x += a[ind] * j * x[j-1] * y[k]   * z[l];         // dV/dx
00184                 if (k > 0) dV.y += a[ind] * k * x[j]   * y[k-1] * z[l];         // dV/dy
00185                 if (l > 0) dV.z += a[ind] * l * x[j]   * y[k]   * z[l-1];       // dV/dz
00186                 ind++;
00187             }
00188         }
00189     }
00190     return dV;
00191 }

float GridforceFullBaseGrid::compute_V ( float *  a,
float *  x,
float *  y,
float *  z 
) const [inline, protected]

Definition at line 160 of file GridForceGrid.inl.

References j, and k.

Referenced by GridforceFullSubGrid::compute_b(), and compute_VdV().

00161 {
00162     float V = 0.0;
00163     long int ind = 0;
00164     for (int l = 0; l < 4; l++) {
00165         for (int k = 0; k < 4; k++) {
00166             for (int j = 0; j < 4; j++) {
00167                 V += a[ind] * x[j] * y[k] * z[l];
00168                 ind++;
00169             }
00170         }
00171     }
00172     return V;
00173 }

int GridforceFullBaseGrid::compute_VdV ( Position  pos,
float &  V,
Vector dV 
) const [inline]

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Reimplemented in GridforceFullMainGrid.

Definition at line 12 of file GridForceGrid.inl.

References compute_a(), compute_b(), compute_dV(), compute_V(), cont, DebugM, Tensor::diagonal(), endi(), generation, get_inds(), inv, j, numSubgrids, subgrids, Vector::x, x, Vector::y, y, Vector::z, and z.

Referenced by GridforceFullMainGrid::compute_VdV().

00013 {
00014     //SimParameters *simParams = Node::Object()->simParameters;
00015     int inds[3];
00016     Vector g, dg;
00017     Vector gapscale = Vector(1, 1, 1);
00018     
00019     int err = get_inds(pos, inds, dg, gapscale);
00020     if (err) {
00021         return -1;
00022     }
00023     
00024     DebugM(1, "gapscale = " << gapscale << "\n");
00025     DebugM(1, "dg = " << dg << "\n");
00026     DebugM(1, "ind + dg = " << inds[0]+dg[0] << " " << inds[1]+dg[1] << " " << inds[2]+dg[2] << "\n");
00027     DebugM(3, "compute_VdV: generation = " << generation << "\n" << endi);
00028     
00029     // Pass to subgrid if one exists here
00030     for (int i = 0; i < numSubgrids; i++) {
00031         if (((inds[0] >= subgrids[i]->pmin[0] && inds[0] <= subgrids[i]->pmax[0]) || subgrids[i]->cont[0]) &&
00032             ((inds[1] >= subgrids[i]->pmin[1] && inds[1] <= subgrids[i]->pmax[1]) || subgrids[i]->cont[1]) &&
00033             ((inds[2] >= subgrids[i]->pmin[2] && inds[2] <= subgrids[i]->pmax[2]) || subgrids[i]->cont[2]))
00034         {
00035             return subgrids[i]->compute_VdV(pos, V, dV);
00036         }
00037     }
00038     
00039     // Compute b
00040     float b[64];        // Matrix of values at 8 box corners
00041     compute_b(b, inds, gapscale);
00042     for (int j = 0; j < 64; j++) DebugM(1, "b[" << j << "] = " << b[j] << "\n" << endi);
00043     
00044     // Compute a
00045     float a[64];
00046     compute_a(a, b);
00047     for (int j = 0; j < 64; j++) DebugM(1, "a[" << j << "] = " << a[j] << "\n" << endi);
00048             
00049     // Calculate powers of x, y, z for later use
00050     // e.g. x[2] = x^2
00051     float x[4], y[4], z[4];
00052     x[0] = 1; y[0] = 1; z[0] = 1;
00053     for (int j = 1; j < 4; j++) {
00054         x[j] = x[j-1] * dg.x;
00055         y[j] = y[j-1] * dg.y;
00056         z[j] = z[j-1] * dg.z;
00057     }
00058     
00059     V = compute_V(a, x, y, z);
00060     dV = Tensor::diagonal(gapscale) * (compute_dV(a, x, y, z) * inv);
00061     
00062     return 0;
00063 }

virtual int GridforceFullBaseGrid::get_border ( void   )  const [pure virtual]

Implemented in GridforceFullMainGrid, and GridforceFullSubGrid.

Referenced by GridforceFullSubGrid::initialize().

Position GridforceFullBaseGrid::get_center ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 93 of file GridForceGrid.h.

References center.

Referenced by GridforceFullMainGrid::get_center().

00093 { return center; }

Bool GridforceFullBaseGrid::get_checksize ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 98 of file GridForceGrid.h.

References checksize.

Referenced by GridforceFullMainGrid::get_checksize().

00098 { return checksize; }

Tensor GridforceFullBaseGrid::get_e ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 95 of file GridForceGrid.h.

References e.

Referenced by GridforceFullMainGrid::get_e().

00095 { return e; }

float GridforceFullBaseGrid::get_grid ( int  i0,
int  i1,
int  i2 
) const [inline]

Definition at line 101 of file GridForceGrid.h.

References grid, and grid_index().

Referenced by GridforceFullSubGrid::compute_b(), GridforceFullMainGrid::compute_b(), get_grid_d(), and GridforceLiteGrid::initialize().

00101                                                         {
00102         return grid[grid_index(i0, i1, i2)];
00103     }

double GridforceFullBaseGrid::get_grid_d ( int  i0,
int  i1,
int  i2 
) const [inline]

Definition at line 104 of file GridForceGrid.h.

References get_grid().

Referenced by GridforceFullSubGrid::compute_b(), and GridforceFullMainGrid::compute_b().

00104                                                            {
00105         return double(get_grid(i0, i1, i2));
00106     }

int GridforceFullBaseGrid::get_inds ( Position  pos,
int *  inds,
Vector dg,
Vector gapscale 
) const [inline, protected]

Definition at line 131 of file GridForceGrid.inl.

References cont, gapinv, inv, k, and origin.

Referenced by compute_VdV().

00132 {
00133     Vector p = pos - origin;
00134     Vector g;
00135     
00136     g = inv * p;
00137     
00138     for (int i = 0; i < 3; i++) {
00139         inds[i] = (int)floor(g[i]);
00140         dg[i] = g[i] - inds[i];
00141     }
00142     
00143     for (int i = 0; i < 3; i++) {
00144         if (inds[i] < 0 || inds[i] >= k[i]-1) {
00145             if (cont[i]) inds[i] = k[i]-1;
00146             else return -1;     // Outside potential and grid is not continuous
00147         }
00148         if (cont[i] && inds[i] == k[i]-1) {
00149             // Correct for non-unit spacing between continuous grid images
00150             gapscale[i] *= gapinv[i];
00151             if (g[i] < 0.0) dg[i] = 1.0 + g[i]*gapinv[i]; // = (gap[i] + g[i]) * gapinv[i]
00152             else dg[i] = (g[i] - inds[i]) * gapinv[i];
00153         }
00154     }
00155     
00156     return 0;
00157 }

Tensor GridforceFullBaseGrid::get_inv ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 96 of file GridForceGrid.h.

References inv.

Referenced by GridforceFullMainGrid::get_inv().

00096 { return inv; }

int GridforceFullBaseGrid::get_k0 ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 115 of file GridForceGrid.h.

References k.

Referenced by GridforceFullMainGrid::get_k0().

00115 { return k[0]; }

int GridforceFullBaseGrid::get_k1 ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 116 of file GridForceGrid.h.

References k.

Referenced by GridforceFullMainGrid::get_k1().

00116 { return k[1]; }

int GridforceFullBaseGrid::get_k2 ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 117 of file GridForceGrid.h.

References k.

Referenced by GridforceFullMainGrid::get_k2().

00117 { return k[2]; }

Position GridforceFullBaseGrid::get_origin ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 94 of file GridForceGrid.h.

References origin.

Referenced by GridforceFullMainGrid::get_origin().

00094 { return origin; }

Vector GridforceFullBaseGrid::get_scale ( void   )  const [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 97 of file GridForceGrid.h.

References scale.

Referenced by GridforceFullMainGrid::get_scale().

00097 { return scale; }

long int GridforceFullBaseGrid::grid_index ( int  i0,
int  i1,
int  i2 
) const [inline, protected]

Definition at line 133 of file GridForceGrid.h.

References dk, k, and NAMD_bug().

Referenced by get_grid(), and set_grid().

00133                                                              {
00134         register int inds[3] = {i0, i1, i2};
00135 #ifdef DEBUGM
00136         if (i0 < 0 || i0 >= k[0] || i1 < 0 || i1 >= k[1] || i2 < 0 || i2 >= k[2]) {
00137             char buffer[256];
00138             sprintf(buffer, "Bad grid index! (%d %d %d)", i0, i1, i2);
00139             NAMD_bug(buffer);
00140         }
00141 #endif
00142         return inds[0]*dk[0] + inds[1]*dk[1] + inds[2]*dk[2];
00143     }

void GridforceFullBaseGrid::pack ( MOStream msg  )  const [protected, virtual]

Reimplemented in GridforceFullMainGrid, and GridforceFullSubGrid.

Definition at line 155 of file GridForceGrid.C.

References center, checksize, cont, DebugM, dk, dk_nopad, e, endi(), factor, gap, gapinv, generation, grid, inv, k, k_nopad, numSubgrids, offset, origin, MOStream::put(), scale, size, size_nopad, and subgrids.

Referenced by GridforceFullSubGrid::pack(), and GridforceFullMainGrid::pack().

00156 {
00157     DebugM(2, "Packing message\n" << endi);
00158     
00159     msg->put(numSubgrids);
00160     msg->put(generation);
00161     
00162     msg->put(3*sizeof(int), (char*)k);
00163     msg->put(3*sizeof(int), (char*)k_nopad);
00164     msg->put(size);
00165     msg->put(size_nopad);
00166     msg->put(3*sizeof(long int), (char*)dk);
00167     msg->put(3*sizeof(long int), (char*)dk_nopad);
00168     msg->put(factor);
00169     
00170     msg->put(sizeof(Vector), (char*)&origin);
00171     msg->put(sizeof(Vector), (char*)&center);
00172     msg->put(sizeof(Tensor), (char*)&e);
00173     msg->put(sizeof(Tensor), (char*)&inv);
00174              
00175 //    msg->put(3*sizeof(float), (char*)pad_p);
00176 //    msg->put(3*sizeof(float), (char*)pad_n);
00177     msg->put(3*sizeof(Bool), (char*)cont);
00178     msg->put(3*sizeof(float), (char*)offset);
00179     msg->put(3*sizeof(float), (char*)gap);
00180     msg->put(3*sizeof(float), (char*)gapinv);
00181     msg->put(sizeof(Vector), (char*)&scale);
00182     msg->put(sizeof(Bool), (char*)&checksize);
00183     
00184     DebugM(2, "Packing grid, size = " << size << "\n" << endi);
00185     
00186     msg->put(size*sizeof(float), (char*)grid);
00187     
00188     DebugM(2, "Packing subgrids\n" << endi);
00189     
00190     for (int i = 0; i < numSubgrids; i++) {
00191         subgrids[i]->pack(msg);
00192     }
00193 }

void GridforceFullBaseGrid::readHeader ( SimParameters simParams,
MGridforceParams mgridParams 
) [protected]

Definition at line 256 of file GridForceGrid.C.

References center, DebugM, e, endi(), inv, k_nopad, origin, poten_fp, size_nopad, Vector::x, Tensor::xx, Tensor::xy, Tensor::xz, Vector::y, Tensor::yx, Tensor::yy, Tensor::yz, Vector::z, Tensor::zx, Tensor::zy, and Tensor::zz.

Referenced by GridforceFullSubGrid::initialize(), and GridforceFullMainGrid::initialize().

00257 {
00258   char line[256];
00259   long int poten_offset;
00260   do {
00261       poten_offset = ftell(poten_fp);
00262       fgets(line, 256, poten_fp);       // Read comment lines
00263       DebugM(4, "Read line: " << line << endi);
00264   } while (line[0] == '#');
00265   fseek(poten_fp, poten_offset, SEEK_SET);
00266   
00267   // read grid dimensions
00268   fscanf(poten_fp, "object %*d class gridpositions counts %d %d %d\n",
00269          &k_nopad[0], &k_nopad[1], &k_nopad[2]);
00270   size_nopad = k_nopad[0] * k_nopad[1] * k_nopad[2];
00271   
00272   // Read origin
00273   fscanf(poten_fp, "origin %lf %lf %lf\n",
00274          &origin.x, &origin.y, &origin.z);
00275         
00276   // Read delta (unit vectors)
00277   // These are column vectors, so must fill gridfrcE tensor to reflect this
00278   fscanf(poten_fp, "delta %lf %lf %lf\n", &e.xx, &e.yx, &e.zx);
00279   fscanf(poten_fp, "delta %lf %lf %lf\n", &e.xy, &e.yy, &e.zy);
00280   fscanf(poten_fp, "delta %lf %lf %lf\n", &e.xz, &e.yz, &e.zz);
00281   
00282   center = origin + e * 0.5 
00283            * Position(k_nopad[0]-1, k_nopad[1]-1, k_nopad[2]-1);
00284   
00285   fscanf(poten_fp, "object %*d class gridconnections counts %*lf %*lf %*lf\n");
00286   fscanf(poten_fp, "object %*d class array type double rank 0 items %*d data follows\n");
00287     
00288   // Calculate inverse tensor
00289   BigReal det;
00290   det = e.xx*(e.yy*e.zz - e.yz*e.zy) - e.xy*(e.yx*e.zz - e.yz*e.zx) 
00291         + e.xz*(e.yx*e.zy - e.yy*e.zx);
00292   inv.xx =  (e.yy*e.zz - e.yz*e.zy)/det;
00293   inv.xy = -(e.xy*e.zz - e.xz*e.zy)/det;
00294   inv.xz =  (e.xy*e.yz - e.xz*e.yy)/det;
00295   inv.yx = -(e.yx*e.zz - e.yz*e.zx)/det;
00296   inv.yy =  (e.xx*e.zz - e.xz*e.zx)/det;
00297   inv.yz = -(e.xx*e.yz - e.xz*e.yx)/det;
00298   inv.zx =  (e.yx*e.zy - e.yy*e.zx)/det;
00299   inv.zy = -(e.xx*e.zy - e.xy*e.zx)/det;
00300   inv.zz =  (e.xx*e.yy - e.xy*e.yx)/det;
00301   
00302   DebugM(4, "origin = " << origin << "\n");
00303   DebugM(4, "e = " << e << "\n");
00304   DebugM(4, "inv = " << inv << "\n" << endi);
00305 }

void GridforceFullBaseGrid::readSubgridHierarchy ( FILE *  poten,
int &  totalGrids 
) [protected]

Definition at line 307 of file GridForceGrid.C.

References DebugM, endi(), generation, GridforceFullSubGrid, NAMD_die(), numSubgrids, poten_fp, readSubgridHierarchy(), and subgrids.

Referenced by GridforceFullMainGrid::initialize(), and readSubgridHierarchy().

00308 {
00309     DebugM(4, "Beginning of readSubgridHierarchy, generation = " << generation << ", totalGrids = " << totalGrids << "\n" << endi);
00310     
00311     int elems, generation_in;
00312     
00313     subgrids = new GridforceFullSubGrid *[numSubgrids];
00314     
00315     for (int i = 0; i < numSubgrids; i++) {
00316         subgrids[i] = new GridforceFullSubGrid(this);
00317         elems = fscanf(poten_fp, "# namdnugrid subgrid %d generation %d min %d %d %d max %d %d %d subgrids count %d\n",
00318                &subgrids[i]->subgridIdx, &generation_in,
00319                &subgrids[i]->pmin[0], &subgrids[i]->pmin[1], &subgrids[i]->pmin[2],
00320                &subgrids[i]->pmax[0], &subgrids[i]->pmax[1], &subgrids[i]->pmax[2],
00321                &subgrids[i]->numSubgrids);
00322         if (elems < 9) {
00323             char msg[256];
00324             sprintf(msg, "Problem reading Gridforce potential file! (%d < 9)", elems);
00325             NAMD_die(msg);
00326         }
00327         
00328         totalGrids++;
00329         
00330         if (subgrids[i]->subgridIdx != (totalGrids - 1)) {
00331             char msg[256];
00332             sprintf(msg, "Problem reading Gridforce potential file! (%d != %d)", subgrids[i]->subgridIdx, totalGrids - 1);
00333             NAMD_die(msg);
00334         }
00335         if (subgrids[i]->generation != generation_in) {
00336             char msg[256];
00337             sprintf(msg, "Problem reading Gridforce potential file! (%d != %d)", subgrids[i]->generation, generation_in);
00338             NAMD_die(msg);
00339         }
00340         
00341 //      DebugM(3, "setting maingrid\n");
00342 //      subgrids[i]->maingrid->subgrids_flat[subgrids[i]->subgridIdx] = subgrids[i];
00343 //      DebugM(3, "reading subgrid hierarchy\n");
00344         
00345         subgrids[i]->readSubgridHierarchy(poten, totalGrids);
00346     }
00347 }

void GridforceFullBaseGrid::set_grid ( int  i0,
int  i1,
int  i2,
float  V 
) [inline]

Definition at line 107 of file GridForceGrid.h.

References grid, and grid_index().

00107                                                           {
00108         grid[grid_index(i0, i1, i2)] = V;
00109     }

void GridforceFullBaseGrid::set_scale ( Vector  s  )  [inline]

Reimplemented in GridforceFullMainGrid.

Definition at line 111 of file GridForceGrid.h.

References scale.

00111 { scale = s; }

void GridforceFullBaseGrid::unpack ( MIStream msg  )  [protected, virtual]

Reimplemented in GridforceFullMainGrid, and GridforceFullSubGrid.

Definition at line 195 of file GridForceGrid.C.

References center, checksize, cont, DebugM, dk, dk_nopad, e, endi(), factor, gap, gapinv, generation, MIStream::get(), grid, GridforceFullSubGrid, inv, k, k_nopad, numSubgrids, offset, origin, scale, size, size_nopad, subgrids, and GridforceFullSubGrid::unpack().

Referenced by GridforceFullSubGrid::unpack(), and GridforceFullMainGrid::unpack().

00196 {
00197     DebugM(3, "Unpacking message\n" << endi);
00198 //    iout << iINFO << CkMyPe() << " Unpacking message\n" << endi;
00199 
00200     delete[] grid;
00201     grid = NULL;
00202     for (int i = 0; i < numSubgrids; i++) {
00203         delete subgrids[i];
00204     }
00205     numSubgrids = 0;
00206     delete[] subgrids;
00207     subgrids = NULL;
00208     
00209     msg->get(numSubgrids);
00210     msg->get(generation);
00211     
00212     DebugM(3, "numSubgrids = " << numSubgrids << "\n");
00213     DebugM(3, "generation = " << generation << "\n" << endi);
00214     
00215     msg->get(3*sizeof(int), (char*)k);
00216     msg->get(3*sizeof(int), (char*)k_nopad);
00217     msg->get(size);
00218     msg->get(size_nopad);
00219     msg->get(3*sizeof(long int), (char*)dk);
00220     msg->get(3*sizeof(long int), (char*)dk_nopad);
00221     msg->get(factor);
00222     
00223     DebugM(3, "size = " << size << "\n" << endi);
00224     
00225     msg->get(sizeof(Vector), (char*)&origin);
00226     msg->get(sizeof(Vector), (char*)&center);
00227     msg->get(sizeof(Tensor), (char*)&e);
00228     msg->get(sizeof(Tensor), (char*)&inv);
00229              
00230 //    msg->get(3*sizeof(float), (char*)pad_p);
00231 //    msg->get(3*sizeof(float), (char*)pad_n);
00232     msg->get(3*sizeof(Bool), (char*)cont);
00233     msg->get(3*sizeof(float), (char*)offset);
00234     msg->get(3*sizeof(float), (char*)gap);
00235     msg->get(3*sizeof(float), (char*)gapinv);
00236     msg->get(sizeof(Vector), (char*)&scale);
00237     msg->get(sizeof(Bool), (char*)&checksize);
00238     
00239     if (size) {
00240         DebugM(3, "allocating grid, size = " << size << "\n" << endi);
00241         grid = new float[size];
00242         msg->get(size*sizeof(float), (char*)grid);
00243     }
00244     
00245     if (numSubgrids) {
00246         DebugM(3, "Creating subgrids array, size " << numSubgrids << "\n" << endi);
00247         subgrids = new GridforceFullSubGrid *[numSubgrids];
00248         for (int i = 0; i < numSubgrids; i++) {
00249             subgrids[i] = new GridforceFullSubGrid(this);
00250             subgrids[i]->unpack(msg);
00251         }
00252     }
00253 }


Friends And Related Function Documentation

friend class GridforceFullMainGrid [friend]

Reimplemented in GridforceFullSubGrid.

Definition at line 83 of file GridForceGrid.h.

friend class GridforceFullSubGrid [friend]

Reimplemented in GridforceFullMainGrid.

Definition at line 84 of file GridForceGrid.h.

Referenced by readSubgridHierarchy(), and unpack().


Member Data Documentation

Position GridforceFullBaseGrid::center [protected]

Definition at line 173 of file GridForceGrid.h.

Referenced by get_center(), pack(), readHeader(), and unpack().

Bool GridforceFullBaseGrid::checksize [protected]

Definition at line 187 of file GridForceGrid.h.

Referenced by get_checksize(), GridforceFullSubGrid::initialize(), GridforceFullMainGrid::initialize(), pack(), and unpack().

Bool GridforceFullBaseGrid::cont[3] [protected]

Definition at line 181 of file GridForceGrid.h.

Referenced by compute_VdV(), get_inds(), GridforceFullBaseGrid(), GridforceFullSubGrid::initialize(), GridforceFullMainGrid::initialize(), pack(), and unpack().

long int GridforceFullBaseGrid::dk[3] [protected]

Definition at line 168 of file GridForceGrid.h.

Referenced by grid_index(), pack(), and unpack().

long int GridforceFullBaseGrid::dk_nopad[3] [protected]

Definition at line 169 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::initialize(), pack(), and unpack().

Tensor GridforceFullBaseGrid::e [protected]

Definition at line 174 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::compute_b(), get_e(), GridforceFullMainGrid::initialize(), pack(), readHeader(), and unpack().

float GridforceFullBaseGrid::factor [protected]

Definition at line 170 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::initialize(), GridforceFullMainGrid::initialize(), pack(), and unpack().

float GridforceFullBaseGrid::gap[3] [protected]

Definition at line 183 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::compute_b(), GridforceFullMainGrid::compute_b(), GridforceFullMainGrid::initialize(), pack(), and unpack().

float GridforceFullBaseGrid::gapinv[3] [protected]

Definition at line 184 of file GridForceGrid.h.

Referenced by get_inds(), GridforceFullMainGrid::initialize(), pack(), GridforceFullSubGrid::unpack(), GridforceFullMainGrid::unpack(), and unpack().

int GridforceFullBaseGrid::generation [protected]

Definition at line 161 of file GridForceGrid.h.

Referenced by compute_VdV(), GridforceFullMainGrid::GridforceFullMainGrid(), GridforceFullSubGrid::GridforceFullSubGrid(), GridforceFullSubGrid::initialize(), pack(), readSubgridHierarchy(), GridforceFullSubGrid::unpack(), GridforceFullMainGrid::unpack(), and unpack().

float* GridforceFullBaseGrid::grid [protected]

Definition at line 157 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::get_all_gridvals(), get_grid(), GridforceFullBaseGrid(), pack(), GridforceFullMainGrid::set_all_gridvals(), set_grid(), unpack(), and ~GridforceFullBaseGrid().

Tensor GridforceFullBaseGrid::inv [protected]

Definition at line 175 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::compute_b(), compute_VdV(), get_inds(), get_inv(), GridforceFullMainGrid::initialize(), pack(), readHeader(), and unpack().

int GridforceFullBaseGrid::k[3] [protected]

Definition at line 164 of file GridForceGrid.h.

Referenced by compute_d2V(), compute_d3V(), compute_dV(), compute_V(), get_inds(), get_k0(), get_k1(), get_k2(), grid_index(), GridforceFullSubGrid::initialize(), pack(), and unpack().

int GridforceFullBaseGrid::k_nopad[3] [protected]

Definition at line 165 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::initialize(), pack(), readHeader(), and unpack().

double GridforceFullBaseGrid::n_sum[3] [protected]

Definition at line 178 of file GridForceGrid.h.

int GridforceFullBaseGrid::numSubgrids [protected]

Definition at line 160 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::addToSubgridsFlat(), GridforceFullMainGrid::buildSubgridsFlat(), compute_VdV(), GridforceFullBaseGrid(), GridforceFullMainGrid::initialize(), pack(), readSubgridHierarchy(), GridforceFullMainGrid::unpack(), unpack(), and ~GridforceFullBaseGrid().

float GridforceFullBaseGrid::offset[3] [protected]

Definition at line 182 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::compute_b(), GridforceFullMainGrid::compute_b(), GridforceFullMainGrid::initialize(), pack(), and unpack().

Position GridforceFullBaseGrid::origin [protected]

Definition at line 172 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::compute_b(), get_inds(), get_origin(), pack(), readHeader(), and unpack().

double GridforceFullBaseGrid::p_sum[3] [protected]

Definition at line 177 of file GridForceGrid.h.

double GridforceFullBaseGrid::pad_n[3] [protected]

Definition at line 180 of file GridForceGrid.h.

double GridforceFullBaseGrid::pad_p[3] [protected]

Definition at line 179 of file GridForceGrid.h.

FILE* GridforceFullBaseGrid::poten_fp [protected]

Definition at line 156 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::initialize(), GridforceFullMainGrid::initialize(), readHeader(), and readSubgridHierarchy().

Vector GridforceFullBaseGrid::scale [protected]

Definition at line 186 of file GridForceGrid.h.

Referenced by get_scale(), GridforceFullSubGrid::initialize(), GridforceFullMainGrid::initialize(), pack(), GridforceFullMainGrid::set_scale(), set_scale(), and unpack().

long int GridforceFullBaseGrid::size [protected]

Definition at line 166 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::get_all_gridvals(), pack(), GridforceFullMainGrid::set_all_gridvals(), GridforceFullSubGrid::unpack(), GridforceFullMainGrid::unpack(), and unpack().

long int GridforceFullBaseGrid::size_nopad [protected]

Definition at line 167 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::initialize(), pack(), readHeader(), and unpack().

GridforceFullSubGrid** GridforceFullBaseGrid::subgrids [protected]

Definition at line 159 of file GridForceGrid.h.

Referenced by GridforceFullSubGrid::addToSubgridsFlat(), GridforceFullMainGrid::buildSubgridsFlat(), compute_VdV(), GridforceFullBaseGrid(), pack(), readSubgridHierarchy(), unpack(), and ~GridforceFullBaseGrid().


The documentation for this class was generated from the following files:
Generated on Sat Sep 23 01:17:19 2017 for NAMD by  doxygen 1.4.7