#include <math.h>#include <charm++.h>#include "MathArray.h"#include "Vector.h"#include "Lattice.h"Go to the source code of this file.
Classes | |
| struct | PmeGrid |
| struct | PmeParticle |
Defines | |
| #define | M_PI 3.14159265358979323846 |
| #define | PME_MAX_EVALS 255 |
| #define | SQRT_PI 1.7724538509055160273 |
Typedefs | |
| typedef MathArray< double, 7 > | PmeReduction |
Functions | |
| void | compute_b_spline (double frac[3], double *M, double *dM, int order) |
| void | scale_coordinates (PmeParticle p[], int N, Lattice lattice, PmeGrid grid) |
| void | scale_forces (Vector f[], int N, Lattice &lattice) |
|
|
Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved. |
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
Referenced by compute_b_moduli(). |
|
||||||||||||||||||||
|
Definition at line 43 of file PmeBase.h. References Lattice::a_r(), Lattice::b_r(), Lattice::c_r(), PmeGrid::K1, PmeGrid::K2, PmeGrid::K3, Lattice::origin(), PmeParticle::x, Vector::x, PmeParticle::y, Vector::y, PmeParticle::z, and Vector::z. Referenced by ComputePme::doWork(). 00043 {
00044 Vector origin = lattice.origin();
00045 Vector recip1 = lattice.a_r();
00046 Vector recip2 = lattice.b_r();
00047 Vector recip3 = lattice.c_r();
00048 double ox = origin.x;
00049 double oy = origin.y;
00050 double oz = origin.z;
00051 double r1x = recip1.x;
00052 double r1y = recip1.y;
00053 double r1z = recip1.z;
00054 double r2x = recip2.x;
00055 double r2y = recip2.y;
00056 double r2z = recip2.z;
00057 double r3x = recip3.x;
00058 double r3y = recip3.y;
00059 double r3z = recip3.z;
00060 int K1 = grid.K1;
00061 int K2 = grid.K2;
00062 int K3 = grid.K3;
00063
00064 for (int i=0; i<N; i++) {
00065 double px = p[i].x - ox;
00066 double py = p[i].y - oy;
00067 double pz = p[i].z - oz;
00068 double sx = px*r1x + py*r1y + pz*r1z;
00069 double sy = px*r2x + py*r2y + pz*r2z;
00070 double sz = px*r3x + py*r3y + pz*r3z;
00071 p[i].x = K1 * ( sx - floor(sx) );
00072 p[i].y = K2 * ( sy - floor(sy) );
00073 p[i].z = K3 * ( sz - floor(sz) );
00074 // Check for rare rounding condition where K * ( 1 - epsilon ) == K
00075 // which was observed with g++ on Intel x86 architecture.
00076 if ( p[i].x == K1 ) p[i].x = 0;
00077 if ( p[i].y == K2 ) p[i].y = 0;
00078 if ( p[i].z == K3 ) p[i].z = 0;
00079 }
00080 }
|
|
||||||||||||||||
|
Definition at line 83 of file PmeBase.h. References Lattice::a_r(), Lattice::b_r(), Lattice::c_r(), Vector::x, Vector::y, and Vector::z. Referenced by OptPmeCompute::ungridForces(), and ComputePme::ungridForces(). 00083 {
00084 Vector recip1 = lattice.a_r();
00085 Vector recip2 = lattice.b_r();
00086 Vector recip3 = lattice.c_r();
00087 double r1x = recip1.x;
00088 double r1y = recip1.y;
00089 double r1z = recip1.z;
00090 double r2x = recip2.x;
00091 double r2y = recip2.y;
00092 double r2z = recip2.z;
00093 double r3x = recip3.x;
00094 double r3y = recip3.y;
00095 double r3z = recip3.z;
00096
00097 for (int i=0; i<N; i++) {
00098 double f1 = f[i].x;
00099 double f2 = f[i].y;
00100 double f3 = f[i].z;
00101 f[i].x = f1*r1x + f2*r2x + f3*r3x;
00102 f[i].y = f1*r1y + f2*r2y + f3*r3y;
00103 f[i].z = f1*r1z + f2*r2z + f3*r3z;
00104 }
00105 }
|
1.3.9.1