cosmetic
This commit is contained in:
@ -2864,8 +2864,7 @@ void lammps_gather_atoms_concat(void *handle, const char *name, int type,
|
||||
displs[0] = 0;
|
||||
for (i = 1; i < nprocs; i++)
|
||||
displs[i] = displs[i-1] + recvcounts[i-1];
|
||||
MPI_Allgatherv(vector,nlocal,MPI_INT,data,recvcounts,displs,
|
||||
MPI_INT,lmp->world);
|
||||
MPI_Allgatherv(vector,nlocal,MPI_INT,data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
|
||||
} else if (imgunpack) {
|
||||
int *copy;
|
||||
@ -2884,8 +2883,7 @@ void lammps_gather_atoms_concat(void *handle, const char *name, int type,
|
||||
displs[0] = 0;
|
||||
for (i = 1; i < nprocs; i++)
|
||||
displs[i] = displs[i-1] + recvcounts[i-1];
|
||||
MPI_Allgatherv(copy,count*nlocal,MPI_INT,
|
||||
data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
MPI_Allgatherv(copy,count*nlocal,MPI_INT,data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
lmp->memory->destroy(copy);
|
||||
|
||||
} else {
|
||||
@ -2894,8 +2892,7 @@ void lammps_gather_atoms_concat(void *handle, const char *name, int type,
|
||||
displs[0] = 0;
|
||||
for (i = 1; i < nprocs; i++)
|
||||
displs[i] = displs[i-1] + recvcounts[i-1];
|
||||
MPI_Allgatherv(&array[0][0],count*nlocal,MPI_INT,
|
||||
data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
MPI_Allgatherv(&array[0][0],count*nlocal,MPI_INT,data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -2911,8 +2908,7 @@ void lammps_gather_atoms_concat(void *handle, const char *name, int type,
|
||||
displs[0] = 0;
|
||||
for (i = 1; i < nprocs; i++)
|
||||
displs[i] = displs[i-1] + recvcounts[i-1];
|
||||
MPI_Allgatherv(vector,nlocal,MPI_DOUBLE,data,recvcounts,displs,
|
||||
MPI_DOUBLE,lmp->world);
|
||||
MPI_Allgatherv(vector,nlocal,MPI_DOUBLE,data,recvcounts,displs,MPI_DOUBLE,lmp->world);
|
||||
|
||||
} else {
|
||||
int n = count*nlocal;
|
||||
@ -3170,10 +3166,6 @@ void lammps_scatter_atoms(void *handle, const char *name, int type, int count,
|
||||
return;
|
||||
}
|
||||
|
||||
// copy = Natom length vector of per-atom values
|
||||
// use atom ID to insert each atom's values into copy
|
||||
// MPI_Allreduce with MPI_SUM to merge into data, ordered by atom ID
|
||||
|
||||
if (type == 0) {
|
||||
int *vector = nullptr;
|
||||
int **array = nullptr;
|
||||
@ -3321,10 +3313,6 @@ void lammps_scatter_atoms_subset(void *handle, const char *name, int type,
|
||||
return;
|
||||
}
|
||||
|
||||
// copy = Natom length vector of per-atom values
|
||||
// use atom ID to insert each atom's values into copy
|
||||
// MPI_Allreduce with MPI_SUM to merge into data, ordered by atom ID
|
||||
|
||||
if (type == 0) {
|
||||
int *vector = nullptr;
|
||||
int **array = nullptr;
|
||||
@ -4354,8 +4342,7 @@ void lammps_gather_concat(void *handle, const char *name, int type, int count,
|
||||
displs[0] = 0;
|
||||
for (i = 1; i < nprocs; i++)
|
||||
displs[i] = displs[i-1] + recvcounts[i-1];
|
||||
MPI_Allgatherv(copy,count*nlocal,MPI_INT,
|
||||
data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
MPI_Allgatherv(copy,count*nlocal,MPI_INT,data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
lmp->memory->destroy(copy);
|
||||
|
||||
} else {
|
||||
@ -4364,8 +4351,7 @@ void lammps_gather_concat(void *handle, const char *name, int type, int count,
|
||||
displs[0] = 0;
|
||||
for (i = 1; i < nprocs; i++)
|
||||
displs[i] = displs[i-1] + recvcounts[i-1];
|
||||
MPI_Allgatherv(&array[0][0],count*nlocal,MPI_INT,
|
||||
data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
MPI_Allgatherv(&array[0][0],count*nlocal,MPI_INT,data,recvcounts,displs,MPI_INT,lmp->world);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -4874,10 +4860,6 @@ void lammps_scatter(void *handle, const char *name, int type, int count,
|
||||
return;
|
||||
}
|
||||
|
||||
// copy = Natom length vector of per-atom values
|
||||
// use atom ID to insert each atom's values into copy
|
||||
// MPI_Allreduce with MPI_SUM to merge into data, ordered by atom ID
|
||||
|
||||
if (type == 0) {
|
||||
int *vector = nullptr;
|
||||
int **array = nullptr;
|
||||
@ -5128,10 +5110,6 @@ void lammps_scatter_subset(void *handle, const char *name,int type, int count,
|
||||
return;
|
||||
}
|
||||
|
||||
// copy = Natom length vector of per-atom values
|
||||
// use atom ID to insert each atom's values into copy
|
||||
// MPI_Allreduce with MPI_SUM to merge into data, ordered by atom ID
|
||||
|
||||
if (type == 0) {
|
||||
int *vector = nullptr;
|
||||
int **array = nullptr;
|
||||
@ -5488,7 +5466,8 @@ int lammps_neighlist_num_elements(void *handle, int idx) {
|
||||
* \param[out] numneigh number of neighbors of atom iatom or 0
|
||||
* \param[out] neighbors pointer to array of neighbor atom local indices or NULL */
|
||||
|
||||
void lammps_neighlist_element_neighbors(void *handle, int idx, int element, int *iatom, int *numneigh, int **neighbors) {
|
||||
void lammps_neighlist_element_neighbors(void *handle, int idx, int element, int *iatom,
|
||||
int *numneigh, int **neighbors) {
|
||||
auto lmp = (LAMMPS *) handle;
|
||||
Neighbor * neighbor = lmp->neighbor;
|
||||
*iatom = -1;
|
||||
@ -5775,9 +5754,7 @@ otherwise 0.
|
||||
* \param setting string with the name of the specific setting
|
||||
* \return 1 if available, 0 if not.
|
||||
*/
|
||||
int lammps_config_accelerator(const char *package,
|
||||
const char *category,
|
||||
const char *setting)
|
||||
int lammps_config_accelerator(const char *package, const char *category, const char *setting)
|
||||
{
|
||||
return Info::has_accelerator_feature(package,category,setting) ? 1 : 0;
|
||||
}
|
||||
@ -5899,8 +5876,7 @@ int lammps_style_count(void *handle, const char *category) {
|
||||
* \param buf_size size of the provided string buffer
|
||||
* \return 1 if successful, otherwise 0
|
||||
*/
|
||||
int lammps_style_name(void *handle, const char *category, int idx,
|
||||
char *buffer, int buf_size) {
|
||||
int lammps_style_name(void *handle, const char *category, int idx, char *buffer, int buf_size) {
|
||||
auto lmp = (LAMMPS *) handle;
|
||||
Info info(lmp);
|
||||
auto styles = info.get_available_styles(category);
|
||||
|
||||
Reference in New Issue
Block a user