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,
|
||||
FILE *_screen, const void *pair_program,
|
||||
const char *k_name, const int onetype,
|
||||
const int extra_fields) {
|
||||
const int extra_fields, bool need_charges) {
|
||||
screen=_screen;
|
||||
|
||||
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();
|
||||
|
||||
bool charge = false;
|
||||
bool charge = need_charges;
|
||||
bool rot = false;
|
||||
bool vel = true;
|
||||
_extra_fields = extra_fields;
|
||||
|
||||
@ -53,7 +53,8 @@ class BaseDPD {
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *screen,
|
||||
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
|
||||
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
|
||||
// q
|
||||
int success;
|
||||
bool need_charges = true;
|
||||
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)
|
||||
return success;
|
||||
|
||||
Reference in New Issue
Block a user