git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9508 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-02-15 00:02:27 +00:00
parent 1c12b60762
commit 4a8e4d5352
2 changed files with 34 additions and 1 deletions

View File

@ -164,6 +164,34 @@ void ThrData::init_pppm(int order, Memory *memory)
}
}
/* ----------------------------------------------------------------------
if order > 0 : set up per thread storage for PPPM
if order < 0 : free per thread storage for PPPM
------------------------------------------------------------------------- */
#if defined(FFT_SINGLE)
typedef float FFT_SCALAR;
#else
typedef double FFT_SCALAR;
#endif
void ThrData::init_pppm_disp(int order_6, Memory *memory)
{
FFT_SCALAR **rho1d_6, **drho1d_6;
if (order_6 > 0) {
memory->create2d_offset(rho1d_6,3,-order_6/2,order_6/2,"thr_data:rho1d_6");
memory->create2d_offset(drho1d_6,3,-order_6/2,order_6/2,"thr_data:drho1d_6");
_rho1d_6 = static_cast<void *>(rho1d_6);
_drho1d_6 = static_cast<void *>(drho1d_6);
} else {
order_6 = -order_6;
rho1d_6 = static_cast<FFT_SCALAR **>(_rho1d_6);
drho1d_6 = static_cast<FFT_SCALAR **>(_drho1d_6);
memory->destroy2d_offset(rho1d_6,-order_6/2);
memory->destroy2d_offset(drho1d_6,-order_6/2);
}
}
/* ----------------------------------------------------------------------
compute global pair virial via summing F dot r over own & ghost atoms
at this point, only pairwise forces have been accumulated in atom->f

View File

@ -54,6 +54,7 @@ class ThrData {
void init_eim(int, double *, double *); // EIM (+ EAM)
void init_pppm(int, class Memory *);
void init_pppm_disp(int, class Memory *);
// access methods for arrays that we handle in this class
double **get_lambda() const { return _lambda; };
@ -64,6 +65,8 @@ class ThrData {
double *get_rhoB() const { return _rhoB; };
void *get_rho1d() const { return _rho1d; };
void *get_drho1d() const { return _drho1d; };
void *get_rho1d_6() const { return _rho1d_6; };
void *get_drho1d_6() const { return _drho1d_6; };
private:
double eng_vdwl; // non-bonded non-coulomb energy
@ -110,7 +113,9 @@ class ThrData {
// this is for pppm/omp
void *_rho1d;
void *_drho1d;
// this is for pppm/disp/omp
void *_rho1d_6;
void *_drho1d_6;
// my thread id
const int _tid;