NAMD
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
GridforceFullBaseGrid Class Referenceabstract

#include <GridForceGrid.h>

Inheritance diagram for GridforceFullBaseGrid:
GridforceFullMainGrid GridforceFullSubGrid

Classes

struct  GridIndices
 

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
 

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.

138 {
139  cont[0] = cont[1] = cont[2] = FALSE;
140  grid = NULL;
141  numSubgrids = 0;
142  subgrids = NULL;
143 }
#define FALSE
Definition: common.h:118
GridforceFullSubGrid ** subgrids
GridforceFullBaseGrid::~GridforceFullBaseGrid ( )
virtual

Definition at line 145 of file GridForceGrid.C.

References grid, numSubgrids, and subgrids.

146 {
147  delete[] grid;
148  for (int i = 0; i < numSubgrids; i++) {
149  delete subgrids[i];
150  }
151  delete[] subgrids;
152 }
GridforceFullSubGrid ** subgrids

Member Function Documentation

void GridforceFullBaseGrid::compute_a ( float *  a,
float *  b 
) const
inlineprotected

Definition at line 228 of file GridForceGrid.inl.

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

229 {
230  // Static sparse 64x64 matrix times vector ... nicer looking way than this?
231  a[0] = b[0];
232  a[1] = b[8];
233  a[2] = -3*b[0] + 3*b[1] - 2*b[8] - b[9];
234  a[3] = 2*b[0] - 2*b[1] + b[8] + b[9];
235  a[4] = b[16];
236  a[5] = b[32];
237  a[6] = -3*b[16] + 3*b[17] - 2*b[32] - b[33];
238  a[7] = 2*b[16] - 2*b[17] + b[32] + b[33];
239  a[8] = -3*b[0] + 3*b[2] - 2*b[16] - b[18];
240  a[9] = -3*b[8] + 3*b[10] - 2*b[32] - b[34];
241  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]
242  + 6*b[16] - 6*b[17] + 3*b[18] - 3*b[19] + 4*b[32] + 2*b[33] + 2*b[34] + b[35];
243  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]
244  - 4*b[16] + 4*b[17] - 2*b[18] + 2*b[19] - 2*b[32] - 2*b[33] - b[34] - b[35];
245  a[12] = 2*b[0] - 2*b[2] + b[16] + b[18];
246  a[13] = 2*b[8] - 2*b[10] + b[32] + b[34];
247  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]
248  - 3*b[16] + 3*b[17] - 3*b[18] + 3*b[19] - 2*b[32] - b[33] - 2*b[34] - b[35];
249  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]
250  + 2*b[16] - 2*b[17] + 2*b[18] - 2*b[19] + b[32] + b[33] + b[34] + b[35];
251  a[16] = b[24];
252  a[17] = b[40];
253  a[18] = -3*b[24] + 3*b[25] - 2*b[40] - b[41];
254  a[19] = 2*b[24] - 2*b[25] + b[40] + b[41];
255  a[20] = b[48];
256  a[21] = b[56];
257  a[22] = -3*b[48] + 3*b[49] - 2*b[56] - b[57];
258  a[23] = 2*b[48] - 2*b[49] + b[56] + b[57];
259  a[24] = -3*b[24] + 3*b[26] - 2*b[48] - b[50];
260  a[25] = -3*b[40] + 3*b[42] - 2*b[56] - b[58];
261  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]
262  + 6*b[48] - 6*b[49] + 3*b[50] - 3*b[51] + 4*b[56] + 2*b[57] + 2*b[58] + b[59];
263  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]
264  - 4*b[48] + 4*b[49] - 2*b[50] + 2*b[51] - 2*b[56] - 2*b[57] - b[58] - b[59];
265  a[28] = 2*b[24] - 2*b[26] + b[48] + b[50];
266  a[29] = 2*b[40] - 2*b[42] + b[56] + b[58];
267  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]
268  - 3*b[48] + 3*b[49] - 3*b[50] + 3*b[51] - 2*b[56] - b[57] - 2*b[58] - b[59];
269  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]
270  + 2*b[48] - 2*b[49] + 2*b[50] - 2*b[51] + b[56] + b[57] + b[58] + b[59];
271  a[32] = -3*b[0] + 3*b[4] - 2*b[24] - b[28];
272  a[33] = -3*b[8] + 3*b[12] - 2*b[40] - b[44];
273  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]
274  + 6*b[24] - 6*b[25] + 3*b[28] - 3*b[29] + 4*b[40] + 2*b[41] + 2*b[44] + b[45];
275  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]
276  - 4*b[24] + 4*b[25] - 2*b[28] + 2*b[29] - 2*b[40] - 2*b[41] - b[44] - b[45];
277  a[36] = -3*b[16] + 3*b[20] - 2*b[48] - b[52];
278  a[37] = -3*b[32] + 3*b[36] - 2*b[56] - b[60];
279  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]
280  + 6*b[48] - 6*b[49] + 3*b[52] - 3*b[53] + 4*b[56] + 2*b[57] + 2*b[60] + b[61];
281  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]
282  - 4*b[48] + 4*b[49] - 2*b[52] + 2*b[53] - 2*b[56] - 2*b[57] - b[60] - b[61];
283  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]
284  + 6*b[24] - 6*b[26] + 3*b[28] - 3*b[30] + 4*b[48] + 2*b[50] + 2*b[52] + b[54];
285  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]
286  + 6*b[40] - 6*b[42] + 3*b[44] - 3*b[46] + 4*b[56] + 2*b[58] + 2*b[60] + b[62];
287  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]
288  - 18*b[8] - 9*b[9] + 18*b[10] + 9*b[11] + 18*b[12] + 9*b[13] - 18*b[14] - 9*b[15]
289  - 18*b[16] + 18*b[17] - 9*b[18] + 9*b[19] + 18*b[20] - 18*b[21] + 9*b[22] - 9*b[23]
290  - 18*b[24] + 18*b[25] + 18*b[26] - 18*b[27] - 9*b[28] + 9*b[29] + 9*b[30] - 9*b[31]
291  - 12*b[32] - 6*b[33] - 6*b[34] - 3*b[35] + 12*b[36] + 6*b[37] + 6*b[38] + 3*b[39]
292  - 12*b[40] - 6*b[41] + 12*b[42] + 6*b[43] - 6*b[44] - 3*b[45] + 6*b[46] + 3*b[47]
293  - 12*b[48] + 12*b[49] - 6*b[50] + 6*b[51] - 6*b[52] + 6*b[53] - 3*b[54] + 3*b[55]
294  - 8*b[56] - 4*b[57] - 4*b[58] - 2*b[59] - 4*b[60] - 2*b[61] - 2*b[62] - b[63];
295  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]
296  + 9*b[8] + 9*b[9] - 9*b[10] - 9*b[11] - 9*b[12] - 9*b[13] + 9*b[14] + 9*b[15]
297  + 12*b[16] - 12*b[17] + 6*b[18] - 6*b[19] - 12*b[20] + 12*b[21] - 6*b[22] + 6*b[23]
298  + 12*b[24] - 12*b[25] - 12*b[26] + 12*b[27] + 6*b[28] - 6*b[29] - 6*b[30] + 6*b[31]
299  + 6*b[32] + 6*b[33] + 3*b[34] + 3*b[35] - 6*b[36] - 6*b[37] - 3*b[38] - 3*b[39]
300  + 6*b[40] + 6*b[41] - 6*b[42] - 6*b[43] + 3*b[44] + 3*b[45] - 3*b[46] - 3*b[47]
301  + 8*b[48] - 8*b[49] + 4*b[50] - 4*b[51] + 4*b[52] - 4*b[53] + 2*b[54] - 2*b[55]
302  + 4*b[56] + 4*b[57] + 2*b[58] + 2*b[59] + 2*b[60] + 2*b[61] + b[62] + b[63];
303  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]
304  - 4*b[24] + 4*b[26] - 2*b[28] + 2*b[30] - 2*b[48] - 2*b[50] - b[52] - b[54];
305  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]
306  - 4*b[40] + 4*b[42] - 2*b[44] + 2*b[46] - 2*b[56] - 2*b[58] - b[60] - b[62];
307  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]
308  + 12*b[8] + 6*b[9] - 12*b[10] - 6*b[11] - 12*b[12] - 6*b[13] + 12*b[14] + 6*b[15]
309  + 9*b[16] - 9*b[17] + 9*b[18] - 9*b[19] - 9*b[20] + 9*b[21] - 9*b[22] + 9*b[23]
310  + 12*b[24] - 12*b[25] - 12*b[26] + 12*b[27] + 6*b[28] - 6*b[29] - 6*b[30] + 6*b[31]
311  + 6*b[32] + 3*b[33] + 6*b[34] + 3*b[35] - 6*b[36] - 3*b[37] - 6*b[38] - 3*b[39]
312  + 8*b[40] + 4*b[41] - 8*b[42] - 4*b[43] + 4*b[44] + 2*b[45] - 4*b[46] - 2*b[47]
313  + 6*b[48] - 6*b[49] + 6*b[50] - 6*b[51] + 3*b[52] - 3*b[53] + 3*b[54] - 3*b[55]
314  + 4*b[56] + 2*b[57] + 4*b[58] + 2*b[59] + 2*b[60] + b[61] + 2*b[62] + b[63];
315  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]
316  - 6*b[8] - 6*b[9] + 6*b[10] + 6*b[11] + 6*b[12] + 6*b[13] - 6*b[14] - 6*b[15]
317  - 6*b[16] + 6*b[17] - 6*b[18] + 6*b[19] + 6*b[20] - 6*b[21] + 6*b[22] - 6*b[23]
318  - 8*b[24] + 8*b[25] + 8*b[26] - 8*b[27] - 4*b[28] + 4*b[29] + 4*b[30] - 4*b[31]
319  - 3*b[32] - 3*b[33] - 3*b[34] - 3*b[35] + 3*b[36] + 3*b[37] + 3*b[38] + 3*b[39]
320  - 4*b[40] - 4*b[41] + 4*b[42] + 4*b[43] - 2*b[44] - 2*b[45] + 2*b[46] + 2*b[47]
321  - 4*b[48] + 4*b[49] - 4*b[50] + 4*b[51] - 2*b[52] + 2*b[53] - 2*b[54] + 2*b[55]
322  - 2*b[56] - 2*b[57] - 2*b[58] - 2*b[59] - b[60] - b[61] - b[62] - b[63];
323  a[48] = 2*b[0] - 2*b[4] + b[24] + b[28];
324  a[49] = 2*b[8] - 2*b[12] + b[40] + b[44];
325  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]
326  - 3*b[24] + 3*b[25] - 3*b[28] + 3*b[29] - 2*b[40] - b[41] - 2*b[44] - b[45];
327  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]
328  + 2*b[24] - 2*b[25] + 2*b[28] - 2*b[29] + b[40] + b[41] + b[44] + b[45];
329  a[52] = 2*b[16] - 2*b[20] + b[48] + b[52];
330  a[53] = 2*b[32] - 2*b[36] + b[56] + b[60];
331  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]
332  - 3*b[48] + 3*b[49] - 3*b[52] + 3*b[53] - 2*b[56] - b[57] - 2*b[60] - b[61];
333  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]
334  + 2*b[48] - 2*b[49] + 2*b[52] - 2*b[53] + b[56] + b[57] + b[60] + b[61];
335  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]
336  - 3*b[24] + 3*b[26] - 3*b[28] + 3*b[30] - 2*b[48] - b[50] - 2*b[52] - b[54];
337  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]
338  - 3*b[40] + 3*b[42] - 3*b[44] + 3*b[46] - 2*b[56] - b[58] - 2*b[60] - b[62];
339  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]
340  + 12*b[8] + 6*b[9] - 12*b[10] - 6*b[11] - 12*b[12] - 6*b[13] + 12*b[14] + 6*b[15]
341  + 12*b[16] - 12*b[17] + 6*b[18] - 6*b[19] - 12*b[20] + 12*b[21] - 6*b[22] + 6*b[23]
342  + 9*b[24] - 9*b[25] - 9*b[26] + 9*b[27] + 9*b[28] - 9*b[29] - 9*b[30] + 9*b[31]
343  + 8*b[32] + 4*b[33] + 4*b[34] + 2*b[35] - 8*b[36] - 4*b[37] - 4*b[38] - 2*b[39]
344  + 6*b[40] + 3*b[41] - 6*b[42] - 3*b[43] + 6*b[44] + 3*b[45] - 6*b[46] - 3*b[47]
345  + 6*b[48] - 6*b[49] + 3*b[50] - 3*b[51] + 6*b[52] - 6*b[53] + 3*b[54] - 3*b[55]
346  + 4*b[56] + 2*b[57] + 2*b[58] + b[59] + 4*b[60] + 2*b[61] + 2*b[62] + b[63];
347  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]
348  - 6*b[8] - 6*b[9] + 6*b[10] + 6*b[11] + 6*b[12] + 6*b[13] - 6*b[14] - 6*b[15]
349  - 8*b[16] + 8*b[17] - 4*b[18] + 4*b[19] + 8*b[20] - 8*b[21] + 4*b[22] - 4*b[23]
350  - 6*b[24] + 6*b[25] + 6*b[26] - 6*b[27] - 6*b[28] + 6*b[29] + 6*b[30] - 6*b[31]
351  - 4*b[32] - 4*b[33] - 2*b[34] - 2*b[35] + 4*b[36] + 4*b[37] + 2*b[38] + 2*b[39]
352  - 3*b[40] - 3*b[41] + 3*b[42] + 3*b[43] - 3*b[44] - 3*b[45] + 3*b[46] + 3*b[47]
353  - 4*b[48] + 4*b[49] - 2*b[50] + 2*b[51] - 4*b[52] + 4*b[53] - 2*b[54] + 2*b[55]
354  - 2*b[56] - 2*b[57] - b[58] - b[59] - 2*b[60] - 2*b[61] - b[62] - b[63];
355  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]
356  + 2*b[24] - 2*b[26] + 2*b[28] - 2*b[30] + b[48] + b[50] + b[52] + b[54];
357  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]
358  + 2*b[40] - 2*b[42] + 2*b[44] - 2*b[46] + b[56] + b[58] + b[60] + b[62];
359  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]
360  - 8*b[8] - 4*b[9] + 8*b[10] + 4*b[11] + 8*b[12] + 4*b[13] - 8*b[14] - 4*b[15]
361  - 6*b[16] + 6*b[17] - 6*b[18] + 6*b[19] + 6*b[20] - 6*b[21] + 6*b[22] - 6*b[23]
362  - 6*b[24] + 6*b[25] + 6*b[26] - 6*b[27] - 6*b[28] + 6*b[29] + 6*b[30] - 6*b[31]
363  - 4*b[32] - 2*b[33] - 4*b[34] - 2*b[35] + 4*b[36] + 2*b[37] + 4*b[38] + 2*b[39]
364  - 4*b[40] - 2*b[41] + 4*b[42] + 2*b[43] - 4*b[44] - 2*b[45] + 4*b[46] + 2*b[47]
365  - 3*b[48] + 3*b[49] - 3*b[50] + 3*b[51] - 3*b[52] + 3*b[53] - 3*b[54] + 3*b[55]
366  - 2*b[56] - b[57] - 2*b[58] - b[59] - 2*b[60] - b[61] - 2*b[62] - b[63];
367  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]
368  + 4*b[8] + 4*b[9] - 4*b[10] - 4*b[11] - 4*b[12] - 4*b[13] + 4*b[14] + 4*b[15]
369  + 4*b[16] - 4*b[17] + 4*b[18] - 4*b[19] - 4*b[20] + 4*b[21] - 4*b[22] + 4*b[23]
370  + 4*b[24] - 4*b[25] - 4*b[26] + 4*b[27] + 4*b[28] - 4*b[29] - 4*b[30] + 4*b[31]
371  + 2*b[32] + 2*b[33] + 2*b[34] + 2*b[35] - 2*b[36] - 2*b[37] - 2*b[38] - 2*b[39]
372  + 2*b[40] + 2*b[41] - 2*b[42] - 2*b[43] + 2*b[44] + 2*b[45] - 2*b[46] - 2*b[47]
373  + 2*b[48] - 2*b[49] + 2*b[50] - 2*b[51] + 2*b[52] - 2*b[53] + 2*b[54] - 2*b[55]
374  + b[56] + b[57] + b[58] + b[59] + b[60] + b[61] + b[62] + b[63];
375 }
virtual void GridforceFullBaseGrid::compute_b ( float *  b,
int *  inds,
Vector  gapscale 
) const
protectedpure virtual
Vector GridforceFullBaseGrid::compute_d2V ( float *  a,
float *  x,
float *  y,
float *  z 
) const
inlineprotected

Definition at line 194 of file GridForceGrid.inl.

References k, Vector::x, Vector::y, and Vector::z.

Referenced by GridforceFullSubGrid::compute_b().

195 {
196  Vector d2V = 0;
197  int ind = 0;
198  for (int l = 0; l < 4; l++) {
199  for (int k = 0; k < 4; k++) {
200  for (int j = 0; j < 4; j++) {
201  if (j > 0 && k > 0) d2V.x += a[ind] * j * k * x[j-1] * y[k-1] * z[l]; // d2V/dxdy
202  if (j > 0 && l > 0) d2V.y += a[ind] * j * l * x[j-1] * y[k] * z[l-1]; // d2V/dxdz
203  if (k > 0 && l > 0) d2V.z += a[ind] * k * l * x[j] * y[k-1] * z[l-1]; // d2V/dydz
204  ind++;
205  }
206  }
207  }
208  return d2V;
209 }
Definition: Vector.h:64
BigReal z
Definition: Vector.h:66
gridSize z
BigReal x
Definition: Vector.h:66
BigReal y
Definition: Vector.h:66
gridSize y
gridSize x
float GridforceFullBaseGrid::compute_d3V ( float *  a,
float *  x,
float *  y,
float *  z 
) const
inlineprotected

Definition at line 212 of file GridForceGrid.inl.

References k.

Referenced by GridforceFullSubGrid::compute_b().

213 {
214  float d3V = 0.0;
215  long int ind = 0;
216  for (int l = 0; l < 4; l++) {
217  for (int k = 0; k < 4; k++) {
218  for (int j = 0; j < 4; j++) {
219  if (j > 0 && k > 0 && l > 0) d3V += a[ind] * j * k * l * x[j-1] * y[k-1] * z[l-1]; // d3V/dxdydz
220  ind++;
221  }
222  }
223  }
224  return d3V;
225 }
gridSize z
gridSize y
gridSize x
Vector GridforceFullBaseGrid::compute_dV ( float *  a,
float *  x,
float *  y,
float *  z 
) const
inlineprotected

Definition at line 176 of file GridForceGrid.inl.

References k, Vector::x, Vector::y, and Vector::z.

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

177 {
178  Vector dV = 0;
179  long int ind = 0;
180  for (int l = 0; l < 4; l++) {
181  for (int k = 0; k < 4; k++) {
182  for (int j = 0; j < 4; j++) {
183  if (j > 0) dV.x += a[ind] * j * x[j-1] * y[k] * z[l]; // dV/dx
184  if (k > 0) dV.y += a[ind] * k * x[j] * y[k-1] * z[l]; // dV/dy
185  if (l > 0) dV.z += a[ind] * l * x[j] * y[k] * z[l-1]; // dV/dz
186  ind++;
187  }
188  }
189  }
190  return dV;
191 }
Definition: Vector.h:64
BigReal z
Definition: Vector.h:66
gridSize z
BigReal x
Definition: Vector.h:66
BigReal y
Definition: Vector.h:66
gridSize y
gridSize x
float GridforceFullBaseGrid::compute_V ( float *  a,
float *  x,
float *  y,
float *  z 
) const
inlineprotected

Definition at line 160 of file GridForceGrid.inl.

References k.

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

161 {
162  float V = 0.0;
163  long int ind = 0;
164  for (int l = 0; l < 4; l++) {
165  for (int k = 0; k < 4; k++) {
166  for (int j = 0; j < 4; j++) {
167  V += a[ind] * x[j] * y[k] * z[l];
168  ind++;
169  }
170  }
171  }
172  return V;
173 }
gridSize z
gridSize y
gridSize x
int GridforceFullBaseGrid::compute_VdV ( Position  pos,
float &  V,
Vector dV 
) const
inline

Definition at line 12 of file GridForceGrid.inl.

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

Referenced by compute_VdV(), and GridforceFullMainGrid::compute_VdV().

13 {
14  //SimParameters *simParams = Node::Object()->simParameters;
15  int inds[3];
16  Vector g, dg;
17  Vector gapscale = Vector(1, 1, 1);
18 
19  int err = get_inds(pos, inds, dg, gapscale);
20  if (err) {
21  return -1;
22  }
23 
24  DebugM(1, "gapscale = " << gapscale << "\n");
25  DebugM(1, "dg = " << dg << "\n");
26  DebugM(1, "ind + dg = " << inds[0]+dg[0] << " " << inds[1]+dg[1] << " " << inds[2]+dg[2] << "\n");
27  DebugM(3, "compute_VdV: generation = " << generation << "\n" << endi);
28 
29  // Pass to subgrid if one exists here
30  for (int i = 0; i < numSubgrids; i++) {
31  if (((inds[0] >= subgrids[i]->pmin[0] && inds[0] <= subgrids[i]->pmax[0]) || subgrids[i]->cont[0]) &&
32  ((inds[1] >= subgrids[i]->pmin[1] && inds[1] <= subgrids[i]->pmax[1]) || subgrids[i]->cont[1]) &&
33  ((inds[2] >= subgrids[i]->pmin[2] && inds[2] <= subgrids[i]->pmax[2]) || subgrids[i]->cont[2]))
34  {
35  return subgrids[i]->compute_VdV(pos, V, dV);
36  }
37  }
38 
39  // Compute b
40  float b[64]; // Matrix of values at 8 box corners
41  compute_b(b, inds, gapscale);
42  for (int j = 0; j < 64; j++) DebugM(1, "b[" << j << "] = " << b[j] << "\n" << endi);
43 
44  // Compute a
45  float a[64];
46  compute_a(a, b);
47  for (int j = 0; j < 64; j++) DebugM(1, "a[" << j << "] = " << a[j] << "\n" << endi);
48 
49  // Calculate powers of x, y, z for later use
50  // e.g. x[2] = x^2
51  float x[4], y[4], z[4];
52  x[0] = 1; y[0] = 1; z[0] = 1;
53  for (int j = 1; j < 4; j++) {
54  x[j] = x[j-1] * dg.x;
55  y[j] = y[j-1] * dg.y;
56  z[j] = z[j-1] * dg.z;
57  }
58 
59  V = compute_V(a, x, y, z);
60  dV = Tensor::diagonal(gapscale) * (compute_dV(a, x, y, z) * inv);
61 
62  return 0;
63 }
int compute_VdV(Position pos, float &V, Vector &dV) const
float compute_V(float *a, float *x, float *y, float *z) const
static Tensor diagonal(const Vector &v1)
Definition: Tensor.h:37
Definition: Vector.h:64
virtual void compute_b(float *b, int *inds, Vector gapscale) const =0
Vector compute_dV(float *a, float *x, float *y, float *z) const
#define DebugM(x, y)
Definition: Debug.h:59
BigReal z
Definition: Vector.h:66
void compute_a(float *a, float *b) const
GridforceFullSubGrid ** subgrids
gridSize z
BigReal x
Definition: Vector.h:66
int get_inds(Position pos, int *inds, Vector &dg, Vector &gapscale) const
BigReal y
Definition: Vector.h:66
gridSize y
infostream & endi(infostream &s)
Definition: InfoStream.C:38
gridSize x
virtual int GridforceFullBaseGrid::get_border ( void  ) const
pure virtual
Position GridforceFullBaseGrid::get_center ( void  ) const
inline

Definition at line 93 of file GridForceGrid.h.

References center.

Referenced by GridforceFullMainGrid::get_center().

93 { return center; }
Bool GridforceFullBaseGrid::get_checksize ( void  ) const
inline

Definition at line 98 of file GridForceGrid.h.

References checksize.

Referenced by GridforceFullMainGrid::get_checksize().

98 { return checksize; }
Tensor GridforceFullBaseGrid::get_e ( void  ) const
inline

Definition at line 95 of file GridForceGrid.h.

References e.

Referenced by GridforceFullMainGrid::get_e().

95 { return e; }
float GridforceFullBaseGrid::get_grid ( int  i0,
int  i1,
int  i2 
) const
inline
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 GridforceFullMainGrid::compute_b(), and GridforceFullSubGrid::compute_b().

104  {
105  return double(get_grid(i0, i1, i2));
106  }
float get_grid(int i0, int i1, int i2) const
int GridforceFullBaseGrid::get_inds ( Position  pos,
int *  inds,
Vector dg,
Vector gapscale 
) const
inlineprotected

Definition at line 131 of file GridForceGrid.inl.

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

Referenced by compute_VdV().

132 {
133  Vector p = pos - origin;
134  Vector g;
135 
136  g = inv * p;
137 
138  for (int i = 0; i < 3; i++) {
139  inds[i] = (int)floor(g[i]);
140  dg[i] = g[i] - inds[i];
141  }
142 
143  for (int i = 0; i < 3; i++) {
144  if (inds[i] < 0 || inds[i] >= k[i]-1) {
145  if (cont[i]) inds[i] = k[i]-1;
146  else return -1; // Outside potential and grid is not continuous
147  }
148  if (cont[i] && inds[i] == k[i]-1) {
149  // Correct for non-unit spacing between continuous grid images
150  gapscale[i] *= gapinv[i];
151  if (g[i] < 0.0) dg[i] = 1.0 + g[i]*gapinv[i]; // = (gap[i] + g[i]) * gapinv[i]
152  else dg[i] = (g[i] - inds[i]) * gapinv[i];
153  }
154  }
155 
156  return 0;
157 }
Definition: Vector.h:64
Tensor GridforceFullBaseGrid::get_inv ( void  ) const
inline

Definition at line 96 of file GridForceGrid.h.

References inv.

Referenced by GridforceFullMainGrid::get_inv().

96 { return inv; }
int GridforceFullBaseGrid::get_k0 ( void  ) const
inline

Definition at line 115 of file GridForceGrid.h.

References k.

Referenced by GridforceFullMainGrid::get_k0().

115 { return k[0]; }
int GridforceFullBaseGrid::get_k1 ( void  ) const
inline

Definition at line 116 of file GridForceGrid.h.

References k.

Referenced by GridforceFullMainGrid::get_k1().

116 { return k[1]; }
int GridforceFullBaseGrid::get_k2 ( void  ) const
inline

Definition at line 117 of file GridForceGrid.h.

References k.

Referenced by GridforceFullMainGrid::get_k2().

117 { return k[2]; }
Position GridforceFullBaseGrid::get_origin ( void  ) const
inline

Definition at line 94 of file GridForceGrid.h.

References origin.

Referenced by GridforceFullMainGrid::get_origin().

94 { return origin; }
Vector GridforceFullBaseGrid::get_scale ( void  ) const
inline

Definition at line 97 of file GridForceGrid.h.

References scale.

Referenced by GridforceFullMainGrid::get_scale().

97 { return scale; }
long int GridforceFullBaseGrid::grid_index ( int  i0,
int  i1,
int  i2 
) const
inlineprotected

Definition at line 133 of file GridForceGrid.h.

References dk, k, and NAMD_bug().

Referenced by get_grid(), and set_grid().

133  {
134  register int inds[3] = {i0, i1, i2};
135 #ifdef DEBUGM
136  if (i0 < 0 || i0 >= k[0] || i1 < 0 || i1 >= k[1] || i2 < 0 || i2 >= k[2]) {
137  char buffer[256];
138  sprintf(buffer, "Bad grid index! (%d %d %d)", i0, i1, i2);
139  NAMD_bug(buffer);
140  }
141 #endif
142  return inds[0]*dk[0] + inds[1]*dk[1] + inds[2]*dk[2];
143  }
void NAMD_bug(const char *err_msg)
Definition: common.C:123
void GridforceFullBaseGrid::pack ( MOStream msg) const
protectedvirtual

Reimplemented in GridforceFullSubGrid, and GridforceFullMainGrid.

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, GridforceFullSubGrid::pack(), MOStream::put(), scale, size, size_nopad, and subgrids.

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

156 {
157  DebugM(2, "Packing message\n" << endi);
158 
159  msg->put(numSubgrids);
160  msg->put(generation);
161 
162  msg->put(3*sizeof(int), (char*)k);
163  msg->put(3*sizeof(int), (char*)k_nopad);
164  msg->put(size);
165  msg->put(size_nopad);
166  msg->put(3*sizeof(long int), (char*)dk);
167  msg->put(3*sizeof(long int), (char*)dk_nopad);
168  msg->put(factor);
169 
170  msg->put(sizeof(Vector), (char*)&origin);
171  msg->put(sizeof(Vector), (char*)&center);
172  msg->put(sizeof(Tensor), (char*)&e);
173  msg->put(sizeof(Tensor), (char*)&inv);
174 
175 // msg->put(3*sizeof(float), (char*)pad_p);
176 // msg->put(3*sizeof(float), (char*)pad_n);
177  msg->put(3*sizeof(Bool), (char*)cont);
178  msg->put(3*sizeof(float), (char*)offset);
179  msg->put(3*sizeof(float), (char*)gap);
180  msg->put(3*sizeof(float), (char*)gapinv);
181  msg->put(sizeof(Vector), (char*)&scale);
182  msg->put(sizeof(Bool), (char*)&checksize);
183 
184  DebugM(2, "Packing grid, size = " << size << "\n" << endi);
185 
186  msg->put(size*sizeof(float), (char*)grid);
187 
188  DebugM(2, "Packing subgrids\n" << endi);
189 
190  for (int i = 0; i < numSubgrids; i++) {
191  subgrids[i]->pack(msg);
192  }
193 }
Definition: Vector.h:64
#define DebugM(x, y)
Definition: Debug.h:59
GridforceFullSubGrid ** subgrids
int Bool
Definition: common.h:133
Definition: Tensor.h:15
MOStream * put(char data)
Definition: MStream.h:112
infostream & endi(infostream &s)
Definition: InfoStream.C:38
void pack(MOStream *msg) const
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 GridforceFullMainGrid::initialize(), and GridforceFullSubGrid::initialize().

257 {
258  char line[256];
259  long int poten_offset;
260  do {
261  poten_offset = ftell(poten_fp);
262  fgets(line, 256, poten_fp); // Read comment lines
263  DebugM(4, "Read line: " << line << endi);
264  } while (line[0] == '#');
265  fseek(poten_fp, poten_offset, SEEK_SET);
266 
267  // read grid dimensions
268  fscanf(poten_fp, "object %*d class gridpositions counts %d %d %d\n",
269  &k_nopad[0], &k_nopad[1], &k_nopad[2]);
270  size_nopad = k_nopad[0] * k_nopad[1] * k_nopad[2];
271 
272  // Read origin
273  fscanf(poten_fp, "origin %lf %lf %lf\n",
274  &origin.x, &origin.y, &origin.z);
275 
276  // Read delta (unit vectors)
277  // These are column vectors, so must fill gridfrcE tensor to reflect this
278  fscanf(poten_fp, "delta %lf %lf %lf\n", &e.xx, &e.yx, &e.zx);
279  fscanf(poten_fp, "delta %lf %lf %lf\n", &e.xy, &e.yy, &e.zy);
280  fscanf(poten_fp, "delta %lf %lf %lf\n", &e.xz, &e.yz, &e.zz);
281 
282  center = origin + e * 0.5
283  * Position(k_nopad[0]-1, k_nopad[1]-1, k_nopad[2]-1);
284 
285  fscanf(poten_fp, "object %*d class gridconnections counts %*lf %*lf %*lf\n");
286  fscanf(poten_fp, "object %*d class array type double rank 0 items %*d data follows\n");
287 
288  // Calculate inverse tensor
289  BigReal det;
290  det = e.xx*(e.yy*e.zz - e.yz*e.zy) - e.xy*(e.yx*e.zz - e.yz*e.zx)
291  + e.xz*(e.yx*e.zy - e.yy*e.zx);
292  inv.xx = (e.yy*e.zz - e.yz*e.zy)/det;
293  inv.xy = -(e.xy*e.zz - e.xz*e.zy)/det;
294  inv.xz = (e.xy*e.yz - e.xz*e.yy)/det;
295  inv.yx = -(e.yx*e.zz - e.yz*e.zx)/det;
296  inv.yy = (e.xx*e.zz - e.xz*e.zx)/det;
297  inv.yz = -(e.xx*e.yz - e.xz*e.yx)/det;
298  inv.zx = (e.yx*e.zy - e.yy*e.zx)/det;
299  inv.zy = -(e.xx*e.zy - e.xy*e.zx)/det;
300  inv.zz = (e.xx*e.yy - e.xy*e.yx)/det;
301 
302  DebugM(4, "origin = " << origin << "\n");
303  DebugM(4, "e = " << e << "\n");
304  DebugM(4, "inv = " << inv << "\n" << endi);
305 }
BigReal zy
Definition: Tensor.h:19
BigReal xz
Definition: Tensor.h:17
#define DebugM(x, y)
Definition: Debug.h:59
BigReal z
Definition: Vector.h:66
BigReal yz
Definition: Tensor.h:18
BigReal yx
Definition: Tensor.h:18
Vector Position
Definition: NamdTypes.h:18
BigReal x
Definition: Vector.h:66
BigReal xx
Definition: Tensor.h:17
BigReal zz
Definition: Tensor.h:19
BigReal xy
Definition: Tensor.h:17
BigReal y
Definition: Vector.h:66
BigReal yy
Definition: Tensor.h:18
infostream & endi(infostream &s)
Definition: InfoStream.C:38
BigReal zx
Definition: Tensor.h:19
double BigReal
Definition: common.h:114
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().

308 {
309  DebugM(4, "Beginning of readSubgridHierarchy, generation = " << generation << ", totalGrids = " << totalGrids << "\n" << endi);
310 
311  int elems, generation_in;
312 
314 
315  for (int i = 0; i < numSubgrids; i++) {
316  subgrids[i] = new GridforceFullSubGrid(this);
317  elems = fscanf(poten_fp, "# namdnugrid subgrid %d generation %d min %d %d %d max %d %d %d subgrids count %d\n",
318  &subgrids[i]->subgridIdx, &generation_in,
319  &subgrids[i]->pmin[0], &subgrids[i]->pmin[1], &subgrids[i]->pmin[2],
320  &subgrids[i]->pmax[0], &subgrids[i]->pmax[1], &subgrids[i]->pmax[2],
321  &subgrids[i]->numSubgrids);
322  if (elems < 9) {
323  char msg[256];
324  sprintf(msg, "Problem reading Gridforce potential file! (%d < 9)", elems);
325  NAMD_die(msg);
326  }
327 
328  totalGrids++;
329 
330  if (subgrids[i]->subgridIdx != (totalGrids - 1)) {
331  char msg[256];
332  sprintf(msg, "Problem reading Gridforce potential file! (%d != %d)", subgrids[i]->subgridIdx, totalGrids - 1);
333  NAMD_die(msg);
334  }
335  if (subgrids[i]->generation != generation_in) {
336  char msg[256];
337  sprintf(msg, "Problem reading Gridforce potential file! (%d != %d)", subgrids[i]->generation, generation_in);
338  NAMD_die(msg);
339  }
340 
341 // DebugM(3, "setting maingrid\n");
342 // subgrids[i]->maingrid->subgrids_flat[subgrids[i]->subgridIdx] = subgrids[i];
343 // DebugM(3, "reading subgrid hierarchy\n");
344 
345  subgrids[i]->readSubgridHierarchy(poten, totalGrids);
346  }
347 }
friend class GridforceFullSubGrid
Definition: GridForceGrid.h:84
#define DebugM(x, y)
Definition: Debug.h:59
GridforceFullSubGrid ** subgrids
void readSubgridHierarchy(FILE *poten, int &totalGrids)
void NAMD_die(const char *err_msg)
Definition: common.C:83
infostream & endi(infostream &s)
Definition: InfoStream.C:38
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().

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

107  {
108  grid[grid_index(i0, i1, i2)] = V;
109  }
long int grid_index(int i0, int i1, int i2) const
void GridforceFullBaseGrid::set_scale ( Vector  s)
inline

Definition at line 111 of file GridForceGrid.h.

References scale.

111 { scale = s; }
void GridforceFullBaseGrid::unpack ( MIStream msg)
protectedvirtual

Reimplemented in GridforceFullSubGrid, and GridforceFullMainGrid.

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 GridforceFullMainGrid::unpack(), and GridforceFullSubGrid::unpack().

196 {
197  DebugM(3, "Unpacking message\n" << endi);
198 // iout << iINFO << CkMyPe() << " Unpacking message\n" << endi;
199 
200  delete[] grid;
201  grid = NULL;
202  for (int i = 0; i < numSubgrids; i++) {
203  delete subgrids[i];
204  }
205  numSubgrids = 0;
206  delete[] subgrids;
207  subgrids = NULL;
208 
209  msg->get(numSubgrids);
210  msg->get(generation);
211 
212  DebugM(3, "numSubgrids = " << numSubgrids << "\n");
213  DebugM(3, "generation = " << generation << "\n" << endi);
214 
215  msg->get(3*sizeof(int), (char*)k);
216  msg->get(3*sizeof(int), (char*)k_nopad);
217  msg->get(size);
218  msg->get(size_nopad);
219  msg->get(3*sizeof(long int), (char*)dk);
220  msg->get(3*sizeof(long int), (char*)dk_nopad);
221  msg->get(factor);
222 
223  DebugM(3, "size = " << size << "\n" << endi);
224 
225  msg->get(sizeof(Vector), (char*)&origin);
226  msg->get(sizeof(Vector), (char*)&center);
227  msg->get(sizeof(Tensor), (char*)&e);
228  msg->get(sizeof(Tensor), (char*)&inv);
229 
230 // msg->get(3*sizeof(float), (char*)pad_p);
231 // msg->get(3*sizeof(float), (char*)pad_n);
232  msg->get(3*sizeof(Bool), (char*)cont);
233  msg->get(3*sizeof(float), (char*)offset);
234  msg->get(3*sizeof(float), (char*)gap);
235  msg->get(3*sizeof(float), (char*)gapinv);
236  msg->get(sizeof(Vector), (char*)&scale);
237  msg->get(sizeof(Bool), (char*)&checksize);
238 
239  if (size) {
240  DebugM(3, "allocating grid, size = " << size << "\n" << endi);
241  grid = new float[size];
242  msg->get(size*sizeof(float), (char*)grid);
243  }
244 
245  if (numSubgrids) {
246  DebugM(3, "Creating subgrids array, size " << numSubgrids << "\n" << endi);
248  for (int i = 0; i < numSubgrids; i++) {
249  subgrids[i] = new GridforceFullSubGrid(this);
250  subgrids[i]->unpack(msg);
251  }
252  }
253 }
friend class GridforceFullSubGrid
Definition: GridForceGrid.h:84
Definition: Vector.h:64
#define DebugM(x, y)
Definition: Debug.h:59
MIStream * get(char &data)
Definition: MStream.h:29
GridforceFullSubGrid ** subgrids
int Bool
Definition: common.h:133
Definition: Tensor.h:15
infostream & endi(infostream &s)
Definition: InfoStream.C:38
void unpack(MIStream *msg)

Friends And Related Function Documentation

friend class GridforceFullMainGrid
friend

Definition at line 83 of file GridForceGrid.h.

friend class GridforceFullSubGrid
friend

Definition at line 84 of file GridForceGrid.h.

Referenced by readSubgridHierarchy(), and unpack().

Member Data Documentation

Position GridforceFullBaseGrid::center
protected
Bool GridforceFullBaseGrid::checksize
protected
Bool GridforceFullBaseGrid::cont[3]
protected
long int GridforceFullBaseGrid::dk[3]
protected
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
float GridforceFullBaseGrid::factor
protected
float GridforceFullBaseGrid::gap[3]
protected
float GridforceFullBaseGrid::gapinv[3]
protected
int GridforceFullBaseGrid::generation
protected
float* GridforceFullBaseGrid::grid
protected
Tensor GridforceFullBaseGrid::inv
protected
int GridforceFullBaseGrid::k[3]
protected
int GridforceFullBaseGrid::k_nopad[3]
protected
double GridforceFullBaseGrid::n_sum[3]
protected

Definition at line 178 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::initialize().

int GridforceFullBaseGrid::numSubgrids
protected
float GridforceFullBaseGrid::offset[3]
protected
Position GridforceFullBaseGrid::origin
protected
double GridforceFullBaseGrid::p_sum[3]
protected

Definition at line 177 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::initialize().

double GridforceFullBaseGrid::pad_n[3]
protected

Definition at line 180 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::initialize().

double GridforceFullBaseGrid::pad_p[3]
protected

Definition at line 179 of file GridForceGrid.h.

Referenced by GridforceFullMainGrid::initialize().

FILE* GridforceFullBaseGrid::poten_fp
protected
Vector GridforceFullBaseGrid::scale
protected
long int GridforceFullBaseGrid::size
protected
long int GridforceFullBaseGrid::size_nopad
protected
GridforceFullSubGrid** GridforceFullBaseGrid::subgrids
protected

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