#include <GridForceGrid.h>
Inheritance diagram for GridforceFullSubGrid:

Public Member Functions | |
| GridforceFullSubGrid (GridforceFullBaseGrid *parent_in) | |
| void | initialize (SimParameters *simParams, MGridforceParams *mgridParams) |
| int | get_border (void) const |
| Tensor | tensorMult (const Tensor &t1, const Tensor &t2) |
Protected Member Functions | |
| void | pack (MOStream *msg) const |
| void | unpack (MIStream *msg) |
| void | compute_b (float *b, int *inds, Vector gapscale) const |
| void | addToSubgridsFlat (void) |
Protected Attributes | |
| Tensor | scale_dV |
| Tensor | scale_d2V |
| float | scale_d3V |
| GridforceFullBaseGrid * | parent |
| int | pmin [3] |
| int | pmax [3] |
| GridforceFullMainGrid * | maingrid |
| int | subgridIdx |
Friends | |
| class | GridforceFullBaseGrid |
| class | GridforceFullMainGrid |
|
|
Definition at line 888 of file GridForceGrid.C. References DebugM, endi(), GridforceFullBaseGrid::generation, maingrid, and parent. 00888 {
00889 parent = parent_in;
00890 generation = parent->generation + 1;
00891 GridforceFullBaseGrid *tmp = parent;
00892 while (tmp->generation > 0) {
00893 tmp = ((GridforceFullSubGrid *)tmp)->parent;
00894 }
00895 maingrid = (GridforceFullMainGrid *)tmp;
00896 DebugM(4, "generation = " << generation << "\n" << endi);
00897 }
|
|
|
Definition at line 1136 of file GridForceGrid.C. References DebugM, endi(), maingrid, GridforceFullBaseGrid::numSubgrids, subgridIdx, and GridforceFullMainGrid::subgrids_flat. Referenced by GridforceFullMainGrid::buildSubgridsFlat(). 01137 {
01138 DebugM(4, "addToSubgridsFlat() called, subgridIdx = " << subgridIdx << ", maingrid->numSubgrids = " << maingrid->numSubgrids << "\n" << endi);
01139 maingrid->subgrids_flat[subgridIdx-1] = this;
01140 for (int i = 0; i < numSubgrids; i++) {
01141 subgrids[i]->addToSubgridsFlat();
01142 }
01143 }
|
|
||||||||||||||||
|
Implements GridforceFullBaseGrid. Definition at line 1146 of file GridForceGrid.C. References GridforceFullBaseGrid::compute_a(), GridforceFullBaseGrid::compute_b(), GridforceFullBaseGrid::compute_d2V(), GridforceFullBaseGrid::compute_d3V(), GridforceFullBaseGrid::compute_dV(), GridforceFullBaseGrid::compute_V(), DebugM, endi(), GridforceFullBaseGrid::get_grid(), GridforceFullBaseGrid::get_grid_d(), GridforceFullBaseGrid::inv, j, GridforceFullBaseGrid::origin, parent, Position, scale_d2V, scale_d3V, scale_dV, Vector::x, Vector::y, and Vector::z. 01147 {
01148 for (int i0 = 0; i0 < 8; i0++) {
01149 int inds2[3];
01150
01151 float voff = 0.0;
01152 int bit = 1; // bit = 2^i1 in the below loop
01153 for (int i1 = 0; i1 < 3; i1++) {
01154 inds2[i1] = (inds[i1] + ((i0 & bit) ? 1 : 0)) % k[i1];
01155
01156 // Deal with voltage offsets
01157 if (cont[i1] && inds[i1] == (k[i1]-1) && inds2[i1] == 0) {
01158 voff += offset[i1];
01159 DebugM(3, "offset[" << i1 << "] = " << offset[i1] << "\n" << endi);
01160 }
01161
01162 bit <<= 1; // i.e. multiply by 2
01163 }
01164
01165 DebugM(3, "inds2 = " << inds2[0] << " " << inds2[1] << " " << inds2[2] << "\n" << endi);
01166
01167 int d_hi[3] = {1, 1, 1};
01168 int d_lo[3] = {1, 1, 1};
01169 float voffs[3];
01170 float dscales[3] = {0.5, 0.5, 0.5};
01171 for (int i1 = 0; i1 < 3; i1++) {
01172 if (inds2[i1] == 0 && cont[i1]) {
01173 d_lo[i1] = -(k[i1]-1);
01174 voffs[i1] = offset[i1];
01175 dscales[i1] = 1.0/(1.0 + gap[i1]) * 1.0/gapscale[i1];
01176 }
01177 else if (inds2[i1] == k[i1]-1 && cont[i1]) {
01178 d_hi[i1] = -(k[i1]-1);
01179 voffs[i1] = offset[i1];
01180 dscales[i1] = 1.0/(1.0 + gap[i1]) * 1.0/gapscale[i1];
01181 }
01182 else {
01183 voffs[i1] = 0.0;
01184 }
01185 }
01186
01187 bool edge = false;
01188 for (int i1 = 0; i1 < 3; i1++) {
01189 if (!cont[i1] && (inds2[i1] == 0 || inds2[i1] == k[i1]-1)) {
01190 edge = true;
01191 }
01192 }
01193
01194 if (inds2[2] == 0) {
01195 // DebugM(3, "cont = " << cont[0] << " " << cont[1] << " " << cont[2] << " d_hi = " << d_hi[0] << " " << d_hi[1] << " " << d_hi[2] << " d_lo = " << d_lo[0] << " " << d_lo[1] << " " << d_lo[2] << " dscales = " << dscales[0] << " " << dscales[1] << " " << dscales[2] << "\n" << endi);
01196 DebugM(3, "cont = " << cont[0] << " " << cont[1] << " " << cont[2] << "\n" << endi);
01197 }
01198
01199 if (edge) {
01200 DebugM(2, "Edge!\n" << endi);
01201
01202 // Must get derivatives from parent
01203 Position pos = e * Vector(inds2[0], inds2[1], inds2[2]) + origin; // Gridpoint position in realspace
01204 Vector g = parent->inv * (pos - parent->origin); // Gridpoint position in parent's gridspace
01205 Vector dg;
01206 int inds3[3];
01207
01208 DebugM(2, "g = " << g << "\n" << endi);
01209
01210 for (int i = 0; i < 3; i++) {
01211 inds3[i] = (int)floor(g[i]);
01212 dg[i] = g[i] - inds3[i];
01213 }
01214
01215 float x[4], y[4], z[4];
01216 x[0] = 1; y[0] = 1; z[0] = 1;
01217 for (int j = 1; j < 4; j++) {
01218 x[j] = x[j-1] * dg.x;
01219 y[j] = y[j-1] * dg.y;
01220 z[j] = z[j-1] * dg.z;
01221 DebugM(1, "x[" << j << "] = " << x[j] << "\n");
01222 DebugM(1, "y[" << j << "] = " << y[j] << "\n");
01223 DebugM(1, "z[" << j << "] = " << z[j] << "\n" << endi);
01224 }
01225
01226 // Compute parent matrices
01227 float b_parent[64];
01228 parent->compute_b(b_parent, inds3, gapscale);
01229
01230 float a_parent[64];
01231 parent->compute_a(a_parent, b_parent);
01232
01233 // Compute parent derivatives
01234 float V = parent->compute_V(a_parent, x, y, z);
01235 Vector dV = scale_dV * parent->compute_dV(a_parent, x, y, z);
01236 Vector d2V = scale_d2V * parent->compute_d2V(a_parent, x, y, z);
01237 float d3V = scale_d3V * parent->compute_d3V(a_parent, x, y, z);
01238
01239 b[i0] = V;
01240 b[8+i0] = dV[0];
01241 b[16+i0] = dV[1];
01242 b[24+i0] = dV[2];
01243 b[32+i0] = d2V[0];
01244 b[40+i0] = d2V[1];
01245 b[48+i0] = d2V[2];
01246 b[56+i0] = d3V;
01247 } else {
01248 b[i0] = get_grid(inds2[0],inds2[1],inds2[2]) + voff; // V
01249
01250 b[8+i0] = dscales[0] * (get_grid_d(inds2[0]+d_hi[0],inds2[1],inds2[2]) - get_grid_d(inds2[0]-d_lo[0],inds2[1],inds2[2]) + voffs[0]); // dV/dx
01251 b[16+i0] = dscales[1] * (get_grid_d(inds2[0],inds2[1]+d_hi[1],inds2[2]) - get_grid_d(inds2[0],inds2[1]-d_lo[1],inds2[2]) + voffs[1]); // dV/dy
01252 b[24+i0] = dscales[2] * (get_grid_d(inds2[0],inds2[1],inds2[2]+d_hi[2]) - get_grid_d(inds2[0],inds2[1],inds2[2]-d_lo[2]) + voffs[2]); // dV/dz
01253 b[32+i0] = dscales[0] * dscales[1]
01254 * (get_grid_d(inds2[0]+d_hi[0],inds2[1]+d_hi[1],inds2[2]) - get_grid_d(inds2[0]-d_lo[0],inds2[1]+d_hi[1],inds2[2]) -
01255 get_grid_d(inds2[0]+d_hi[0],inds2[1]-d_lo[1],inds2[2]) + get_grid_d(inds2[0]-d_lo[0],inds2[1]-d_lo[1],inds2[2])); // d2V/dxdy
01256 b[40+i0] = dscales[0] * dscales[2]
01257 * (get_grid_d(inds2[0]+d_hi[0],inds2[1],inds2[2]+d_hi[2]) - get_grid_d(inds2[0]-d_lo[0],inds2[1],inds2[2]+d_hi[2]) -
01258 get_grid_d(inds2[0]+d_hi[0],inds2[1],inds2[2]-d_lo[2]) + get_grid_d(inds2[0]-d_lo[0],inds2[1],inds2[2]-d_lo[2])); // d2V/dxdz
01259 b[48+i0] = dscales[1] * dscales[2]
01260 * (get_grid_d(inds2[0],inds2[1]+d_hi[1],inds2[2]+d_hi[2]) - get_grid_d(inds2[0],inds2[1]-d_lo[1],inds2[2]+d_hi[2]) -
01261 get_grid_d(inds2[0],inds2[1]+d_hi[1],inds2[2]-d_lo[2]) + get_grid_d(inds2[0],inds2[1]-d_lo[1],inds2[2]-d_lo[2])); // d2V/dydz
01262
01263 b[56+i0] = dscales[0] * dscales[1] * dscales[2] // d3V/dxdydz
01264 * (get_grid_d(inds2[0]+d_hi[0],inds2[1]+d_hi[1],inds2[2]+d_hi[2]) - get_grid_d(inds2[0]+d_hi[0],inds2[1]+d_hi[1],inds2[2]-d_lo[2]) -
01265 get_grid_d(inds2[0]+d_hi[0],inds2[1]-d_lo[1],inds2[2]+d_hi[2]) - get_grid_d(inds2[0]-d_lo[0],inds2[1]+d_hi[1],inds2[2]+d_hi[2]) +
01266 get_grid_d(inds2[0]+d_hi[0],inds2[1]-d_lo[1],inds2[2]-d_lo[2]) + get_grid_d(inds2[0]-d_lo[0],inds2[1]+d_hi[1],inds2[2]-d_lo[2]) +
01267 get_grid_d(inds2[0]-d_lo[0],inds2[1]-d_lo[1],inds2[2]+d_hi[2]) - get_grid_d(inds2[0]-d_lo[0],inds2[1]-d_lo[1],inds2[2]-d_lo[2]));
01268 }
01269
01270 if (inds2[0] == 1 && inds2[1] == 1 && inds2[2] == 0) {
01271 DebugM(1, "Sub V = " << b[i0] << "\n");
01272
01273 DebugM(1, "Sub dV/dx = " << b[8+i0] << "\n");
01274 DebugM(1, "Sub dV/dy = " << b[16+i0] << "\n");
01275 DebugM(1, "Sub dV/dz = " << b[24+i0] << "\n");
01276
01277 DebugM(1, "Sub d2V/dxdy = " << b[32+i0] << "\n");
01278 DebugM(1, "Sub d2V/dxdz = " << b[40+i0] << "\n");
01279 DebugM(1, "Sub d2V/dydz = " << b[48+i0] << "\n");
01280
01281 DebugM(1, "Sub d3V/dxdydz = " << b[56+i0] << "\n" << endi);
01282 }
01283 }
01284 }
|
|
|
Implements GridforceFullBaseGrid. Definition at line 241 of file GridForceGrid.h. 00241 { return 0; }
|
|
||||||||||||
|
Definition at line 900 of file GridForceGrid.C. References GridforceFullBaseGrid::cont, DebugM, Tensor::diagonal(), GridforceFullBaseGrid::e, endi(), GridforceFullBaseGrid::gap, GridforceFullBaseGrid::gapinv, GridforceFullBaseGrid::generation, GridforceFullBaseGrid::get_border(), GridforceFullBaseGrid::get_grid(), MGridforceParams::gridforceScale, MGridforceParams::gridforceVolts, GridforceFullBaseGrid::inv, iout, GridforceFullBaseGrid::k, NAMD_die(), GridforceFullBaseGrid::offset, GridforceFullBaseGrid::origin, parent, pmax, pmin, Position, GridforceFullBaseGrid::readHeader(), scale_d2V, scale_d3V, scale_dV, GridforceFullBaseGrid::set_grid(), simParams, tensorMult(), TRUE, 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(). 00901 {
00902 int tmp;
00903 char line[256];
00904 long int poten_offset;
00905
00906 // Skip 'attribute's
00907 DebugM(3, "Skipping 'attribute' keywords...\n" << endi);
00908 char str[256];
00909 do {
00910 poten_offset = ftell(poten_fp);
00911 fscanf(poten_fp, "%s", str);
00912 fgets(line, 256, poten_fp);
00913 DebugM(4, "Read line " << str << " " << line << endi);
00914 } while (strcmp(str, "attribute") == 0);
00915 fseek(poten_fp, poten_offset, SEEK_SET);
00916
00917 // Skip 'field' object
00918 DebugM(3, "Skipping 'field' object\n" << endi);
00919 fscanf(poten_fp, "object");
00920 int n;
00921 n = fscanf(poten_fp, "\"%[^\"]\" class field\n", str);
00922 if (n == 0) {
00923 n = fscanf(poten_fp, "%d class field\n", &tmp);
00924 }
00925
00926 if (n == 0) {
00927 NAMD_die("Error reading gridforce grid! Could not find field object!\n");
00928 }
00929
00930 // Skip 'component's
00931 DebugM(3, "Skipping 'component' keywords\n" << endi);
00932 do {
00933 poten_offset = ftell(poten_fp);
00934 fscanf(poten_fp, "%s", str);
00935 fgets(line, 256, poten_fp);
00936 } while (strcmp(str, "component") == 0);
00937 fseek(poten_fp, poten_offset, SEEK_SET);
00938
00939 // Read header
00940 readHeader(simParams, mgridParams);
00941
00942 factor = 1.0;
00943 if (mgridParams->gridforceVolts)
00944 {
00945 factor /= 0.0434; // convert V -> kcal/mol*e
00946 }
00947 scale = mgridParams->gridforceScale;
00948
00949 for (int i = 0; i < 3; i++) {
00950 k[i] = k_nopad[i]; // subgrids aren't padded
00951 }
00952
00953 // Make sure that each subgrid dimension is an integral
00954 // number of spanned supergrid cells. This is to ensure that no
00955 // supergrid nodes land in the middle of a subgrid, because in
00956 // this case forces could not be matched properly.
00957 for (int i = 0; i < 3; i++) {
00958 if ((k[i] - 1) % (pmax[i] - pmin[i] + 1) != 0) {
00959 iout << (k[i] - 1) << " % " << (pmax[i] - pmin[i] + 1) << " != 0\n" << endi;
00960 NAMD_die("Error reading gridforce grid! Subgrid dimensions must be an integral number spanned parent cells!");
00961 }
00962 }
00963
00964 for (int i = 0; i < 3; i++) {
00965 if (parent->cont[i]) {
00966 cont[i] = (pmin[i] == 0 && pmax[i] == parent->k[i]-2) ? TRUE : FALSE;
00967 DebugM(3, "pmin[" << i << "] = " << pmin[i] << " pmax[" << i << "] = " << pmax[i] << " parent->k[" << i << "] = " << parent->k[i] << " cont[" << i << "] = " << cont[i] << "\n" << endi);
00968 } else {
00969 cont[i] = false;
00970 if (parent->generation == 0) {
00971 // Add to pmin, pmax since parent got extra gridpoint layer(s) (maybe)
00972 int brd = parent->get_border();
00973 pmin[i] += brd;
00974 pmax[i] += brd;
00975 }
00976 }
00977 }
00978
00979 DebugM(4, "pmin = " << pmin[0] << " " << pmin[1] << " " << pmin[2] << "\n");
00980 DebugM(4, "pmax = " << pmax[0] << " " << pmax[1] << " " << pmax[2] << "\n" << endi);
00981
00982 Vector origin2 = parent->origin + parent->e * Position(pmin[0], pmin[1], pmin[2]);
00983 Vector escale, invscale;
00984 for (int i = 0; i < 3; i++) {
00985 escale[i] = double(pmax[i] - pmin[i] + 1)/(k[i]-1);
00986 invscale[i] = 1.0/escale[i];
00987 if (cont[i]) { pmax[i]++; }
00988 }
00989 Tensor e2 = tensorMult(parent->e, Tensor::diagonal(escale));
00990
00991 // Check that lattice parameters agree with min and max numbers
00992 // from subgrid hierarchy.
00993 double TOL2 = 1e-4; // Totally arbitrary
00994 if (pow(origin2.x-origin.x, 2) > TOL2 ||
00995 pow(origin2.y-origin.y, 2) > TOL2 ||
00996 pow(origin2.z-origin.z, 2) > TOL2 ||
00997 pow(e2.xx-e.xx, 2) > TOL2 ||
00998 pow(e2.xy-e.xy, 2) > TOL2 ||
00999 pow(e2.xz-e.xz, 2) > TOL2 ||
01000 pow(e2.yx-e.yx, 2) > TOL2 ||
01001 pow(e2.yy-e.yy, 2) > TOL2 ||
01002 pow(e2.yz-e.yz, 2) > TOL2 ||
01003 pow(e2.zx-e.zx, 2) > TOL2 ||
01004 pow(e2.zy-e.zy, 2) > TOL2 ||
01005 pow(e2.zz-e.zz, 2) > TOL2)
01006 {
01007 NAMD_die("Error reading gridforce grid! Subgrid lattice does not match!");
01008 }
01009
01010 // Overwrite what was read from the header
01011 origin = origin2;
01012 e = e2;
01013
01014 inv = tensorMult(Tensor::diagonal(invscale), parent->inv);
01015 for (int i = 0; i < 3; i++) {
01016 gap[i] = escale[i] * parent->gap[i];
01017 gapinv[i] = invscale[i] * parent->gapinv[i];
01018 offset[i] = parent->offset[i];
01019 }
01020 center = origin + e * 0.5 * Position(k[0], k[1], k[2]);
01021
01022 DebugM(4, "origin = " << origin << "\n");
01023 DebugM(4, "e = " << e << "\n");
01024 DebugM(4, "inv = " << inv << "\n");
01025 DebugM(4, "gap = " << gap[0] << " " << gap[2] << " " << gap[2] << " " << "\n");
01026 DebugM(4, "gapinv = " << gapinv[0] << " " << gapinv[2] << " " << gapinv[2] << " " << "\n");
01027 DebugM(4, "numSubgrids = " << numSubgrids << "\n");
01028 DebugM(4, "k = " << k[0] << " " << k[1] << " " << k[2] << "\n");
01029 DebugM(4, "escale = " << escale << "\n");
01030 DebugM(4, "invscale = " << invscale << "\n" << endi);
01031
01032 /*** Set members ***/
01033 size = k[0] * k[1] * k[2];
01034 dk[0] = k[1] * k[2];
01035 dk[1] = k[2];
01036 dk[2] = 1;
01037
01038 scale_dV = Tensor::diagonal(escale);
01039 scale_d2V = Tensor::diagonal(Vector(escale.x*escale.y, escale.x*escale.z, escale.y*escale.z));
01040 scale_d3V = escale.x * escale.y * escale.z;
01041
01042 DebugM(4, "scale_dV = " << scale_dV << "\n");
01043 DebugM(4, "scale_d2V = " << scale_d2V << "\n");
01044 DebugM(4, "scale_d3V = " << scale_d3V << "\n" << endi);
01045
01046 // Allocate storage for potential and read it
01047 float *grid_tmp = new float[size];
01048
01049 float tmp2;
01050 DebugM(3, "size_nopad = " << size_nopad << "\n");
01051 for (int count = 0; count < size_nopad; count++) {
01052 // poten_offset = ftell(poten_fp);
01053 // fscanf(poten_fp, "%s", str);
01054 // fgets(line, 256, poten_fp);
01055 // DebugM(4, "Read line " << str << " " << line << endi);
01056 // fseek(poten_fp, poten_offset, SEEK_SET);
01057
01058 int err = fscanf(poten_fp, "%f", &tmp2);
01059 if (err == EOF || err == 0) {
01060 NAMD_die("Grid force potential file incorrectly formatted");
01061 }
01062 grid_tmp[count] = tmp2 * factor;
01063 }
01064 fscanf(poten_fp, "\n");
01065
01066 // Set real grid
01067 DebugM(3, "allocating grid\n" << endi);
01068 delete[] grid;
01069 grid = new float[size];
01070 for (int i0 = 0; i0 < k_nopad[0]; i0++) {
01071 for (int i1 = 0; i1 < k_nopad[1]; i1++) {
01072 for (int i2 = 0; i2 < k_nopad[2]; i2++) {
01073 int ind = i0*dk[0] + i1*dk[1] + i2*dk[2];
01074 set_grid(i0, i1, i2, grid_tmp[ind]);
01075 }
01076 }
01077 }
01078
01079 for (int i0 = 0; i0 < k[0]; i0++) {
01080 for (int i1 = 0; i1 < k[1]; i1++) {
01081 for (int i2 = 0; i2 < k[2]; i2++) {
01082 DebugM(1, "grid[" << i0 << ", " << i1 << ", " << i2 << "] = " << get_grid(i0,i1,i2) << "\n" << endi);
01083 }
01084 }
01085 }
01086
01087 // Clean up
01088 delete[] grid_tmp;
01089
01090 // Call initialize for each subgrid
01091 for (int i = 0; i < numSubgrids; i++) {
01092 subgrids[i]->initialize(simParams, mgridParams);
01093 }
01094 }
|
|
|
Reimplemented from GridforceFullBaseGrid. Definition at line 1097 of file GridForceGrid.C. References DebugM, endi(), GridforceFullBaseGrid::pack(), pmax, pmin, MOStream::put(), scale_d2V, scale_d3V, scale_dV, and subgridIdx. Referenced by GridforceFullBaseGrid::pack(). 01098 {
01099 DebugM(4, "Packing subgrid\n" << endi);
01100
01101 msg->put(sizeof(Tensor), (char*)&scale_dV);
01102 msg->put(sizeof(Tensor), (char*)&scale_d2V);
01103 msg->put(sizeof(float), (char*)&scale_d3V);
01104
01105 msg->put(3*sizeof(int), (char*)pmin);
01106 msg->put(3*sizeof(int), (char*)pmax);
01107 msg->put(subgridIdx);
01108
01109 DebugM(3, "calling GridforceFullBaseGrid::pack\n" << endi);
01110
01111 GridforceFullBaseGrid::pack(msg);
01112 }
|
|
||||||||||||
|
Definition at line 243 of file GridForceGrid.h. References Tensor::xx, Tensor::xy, Tensor::xz, Tensor::yx, Tensor::yy, Tensor::yz, Tensor::zx, Tensor::zy, and Tensor::zz. Referenced by initialize(). 00243 {
00244 Tensor tmp;
00245 tmp.xx = t1.xx * t2.xx + t1.xy * t2.yx + t1.xz * t2.zx;
00246 tmp.xy = t1.xx * t2.xy + t1.xy * t2.yy + t1.xz * t2.zy;
00247 tmp.xz = t1.xx * t2.xz + t1.xy * t2.yz + t1.xz * t2.zz;
00248 tmp.yx = t1.yx * t2.xx + t1.yy * t2.yx + t1.yz * t2.zx;
00249 tmp.yy = t1.yx * t2.xy + t1.yy * t2.yy + t1.yz * t2.zy;
00250 tmp.yz = t1.yx * t2.xz + t1.yy * t2.yz + t1.yz * t2.zz;
00251 tmp.zx = t1.zx * t2.xx + t1.zy * t2.yx + t1.zz * t2.zx;
00252 tmp.zy = t1.zx * t2.xy + t1.zy * t2.yy + t1.zz * t2.zy;
00253 tmp.zz = t1.zx * t2.xz + t1.zy * t2.yz + t1.zz * t2.zz;
00254 return tmp;
00255 }
|
|
|
Reimplemented from GridforceFullBaseGrid. Definition at line 1115 of file GridForceGrid.C. References DebugM, endi(), MIStream::get(), pmax, pmin, scale_d2V, scale_d3V, scale_dV, subgridIdx, and GridforceFullBaseGrid::unpack(). Referenced by GridforceFullBaseGrid::unpack(). 01116 {
01117 DebugM(4, "Unpacking subgrid\n" << endi);
01118
01119 msg->get(sizeof(Tensor), (char*)&scale_dV);
01120 msg->get(sizeof(Tensor), (char*)&scale_d2V);
01121 msg->get(sizeof(float), (char*)&scale_d3V);
01122
01123 msg->get(3*sizeof(int), (char*)pmin);
01124 msg->get(3*sizeof(int), (char*)pmax);
01125 msg->get(subgridIdx);
01126
01127 GridforceFullBaseGrid::unpack(msg);
01128
01129 DebugM(4, "size = " << size << "\n");
01130 DebugM(4, "numSubgrids = " << numSubgrids << "\n");
01131 DebugM(4, "gapinv = " << gapinv[0] << " " << gapinv[2] << " " << gapinv[2] << " " << "\n");
01132 DebugM(4, "generation = " << generation << "\n" << endi);
01133 }
|
|
|
Definition at line 233 of file GridForceGrid.h. |
|
|
Reimplemented from GridforceFullBaseGrid. Definition at line 234 of file GridForceGrid.h. |
|
|
Definition at line 272 of file GridForceGrid.h. Referenced by addToSubgridsFlat(), and GridforceFullSubGrid(). |
|
|
Definition at line 270 of file GridForceGrid.h. Referenced by compute_b(), GridforceFullSubGrid(), and initialize(). |
|
|
Definition at line 271 of file GridForceGrid.h. Referenced by GridforceFullBaseGrid::compute_VdV(), initialize(), pack(), and unpack(). |
|
|
Definition at line 271 of file GridForceGrid.h. Referenced by GridforceFullBaseGrid::compute_VdV(), initialize(), pack(), and unpack(). |
|
|
Definition at line 267 of file GridForceGrid.h. Referenced by compute_b(), initialize(), pack(), and unpack(). |
|
|
Definition at line 268 of file GridForceGrid.h. Referenced by compute_b(), initialize(), pack(), and unpack(). |
|
|
Definition at line 266 of file GridForceGrid.h. Referenced by compute_b(), initialize(), pack(), and unpack(). |
|
|
Definition at line 273 of file GridForceGrid.h. Referenced by addToSubgridsFlat(), pack(), GridforceFullBaseGrid::readSubgridHierarchy(), and unpack(). |
1.3.9.1