update lal_base_dpd for optional charged
This commit is contained in:
@ -57,7 +57,7 @@ int BaseDPDT::init_atomic(const int nlocal, const int nall,
|
|||||||
const double cell_size, const double gpu_split,
|
const double cell_size, const double gpu_split,
|
||||||
FILE *_screen, const void *pair_program,
|
FILE *_screen, const void *pair_program,
|
||||||
const char *k_name, const int onetype,
|
const char *k_name, const int onetype,
|
||||||
const int extra_fields) {
|
const int extra_fields, bool need_charges) {
|
||||||
screen=_screen;
|
screen=_screen;
|
||||||
|
|
||||||
int gpu_nbor=0;
|
int gpu_nbor=0;
|
||||||
@ -73,7 +73,7 @@ int BaseDPDT::init_atomic(const int nlocal, const int nall,
|
|||||||
|
|
||||||
_threads_per_atom=device->threads_per_atom();
|
_threads_per_atom=device->threads_per_atom();
|
||||||
|
|
||||||
bool charge = false;
|
bool charge = need_charges;
|
||||||
bool rot = false;
|
bool rot = false;
|
||||||
bool vel = true;
|
bool vel = true;
|
||||||
_extra_fields = extra_fields;
|
_extra_fields = extra_fields;
|
||||||
|
|||||||
@ -53,7 +53,8 @@ class BaseDPD {
|
|||||||
const int maxspecial, const double cell_size,
|
const int maxspecial, const double cell_size,
|
||||||
const double gpu_split, FILE *screen,
|
const double gpu_split, FILE *screen,
|
||||||
const void *pair_program, const char *k_name,
|
const void *pair_program, const char *k_name,
|
||||||
const int onetype=0, const int extra_fields=0);
|
const int onetype=0, const int extra_fields=0,
|
||||||
|
bool need_charges=false);
|
||||||
|
|
||||||
/// Estimate the overhead for GPU context changes and CPU driver
|
/// Estimate the overhead for GPU context changes and CPU driver
|
||||||
void estimate_gpu_overhead();
|
void estimate_gpu_overhead();
|
||||||
|
|||||||
@ -73,8 +73,9 @@ int DPDChargedT::init(const int ntypes,
|
|||||||
int extra_fields = 4; // round up to accomodate quadruples of numtyp values
|
int extra_fields = 4; // round up to accomodate quadruples of numtyp values
|
||||||
// q
|
// q
|
||||||
int success;
|
int success;
|
||||||
|
bool need_charges = true;
|
||||||
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,
|
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,
|
||||||
gpu_split,_screen,dpd_charged,"k_dpd_charged",onetype, extra_fields);
|
gpu_split,_screen,dpd_charged,"k_dpd_charged",onetype, extra_fields, need_charges);
|
||||||
|
|
||||||
if (success!=0)
|
if (success!=0)
|
||||||
return success;
|
return success;
|
||||||
|
|||||||
Reference in New Issue
Block a user