@ -1448,6 +1448,8 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsFull, const int &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rsq > cut_bosq) continue;
|
||||||
|
|
||||||
// bond_list
|
// bond_list
|
||||||
const F_FLOAT rij = sqrt(rsq);
|
const F_FLOAT rij = sqrt(rsq);
|
||||||
const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1;
|
const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1;
|
||||||
@ -1635,6 +1637,8 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsHalf<NEIGHFLAG>,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rsq > cut_bosq) continue;
|
||||||
|
|
||||||
// bond_list
|
// bond_list
|
||||||
const F_FLOAT rij = sqrt(rsq);
|
const F_FLOAT rij = sqrt(rsq);
|
||||||
const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1;
|
const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1;
|
||||||
@ -1856,6 +1860,8 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsHalf_LessAtomics<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rsq > cut_bosq) continue;
|
||||||
|
|
||||||
// bond_list
|
// bond_list
|
||||||
const F_FLOAT rij = sqrt(rsq);
|
const F_FLOAT rij = sqrt(rsq);
|
||||||
const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1;
|
const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1;
|
||||||
|
|||||||
@ -601,44 +601,17 @@ void Compute_ForcesOMP( reax_system *system, control_params *control,
|
|||||||
MPI_Comm comm = mpi_data->world;
|
MPI_Comm comm = mpi_data->world;
|
||||||
|
|
||||||
// Init Forces
|
// Init Forces
|
||||||
#if defined(LOG_PERFORMANCE)
|
|
||||||
double t_start = 0;
|
|
||||||
if( system->my_rank == MASTER_NODE )
|
|
||||||
t_start = Get_Time( );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Init_Forces_noQEq_OMP( system, control, data, workspace,
|
Init_Forces_noQEq_OMP( system, control, data, workspace,
|
||||||
lists, out_control, comm );
|
lists, out_control, comm );
|
||||||
|
|
||||||
#if defined(LOG_PERFORMANCE)
|
|
||||||
//MPI_Barrier( comm );
|
|
||||||
if( system->my_rank == MASTER_NODE )
|
|
||||||
Update_Timing_Info( &t_start, &(data->timing.init_forces) );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Bonded Interactions
|
// Bonded Interactions
|
||||||
Compute_Bonded_ForcesOMP( system, control, data, workspace,
|
Compute_Bonded_ForcesOMP( system, control, data, workspace,
|
||||||
lists, out_control, mpi_data->world );
|
lists, out_control, mpi_data->world );
|
||||||
|
|
||||||
#if defined(LOG_PERFORMANCE)
|
|
||||||
if( system->my_rank == MASTER_NODE )
|
|
||||||
Update_Timing_Info( &t_start, &(data->timing.bonded) );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Nonbonded Interactions
|
// Nonbonded Interactions
|
||||||
Compute_NonBonded_ForcesOMP( system, control, data, workspace,
|
Compute_NonBonded_ForcesOMP( system, control, data, workspace,
|
||||||
lists, out_control, mpi_data->world );
|
lists, out_control, mpi_data->world );
|
||||||
|
|
||||||
#if defined(LOG_PERFORMANCE)
|
|
||||||
if( system->my_rank == MASTER_NODE )
|
|
||||||
Update_Timing_Info( &t_start, &(data->timing.nonb) );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Total Force
|
// Total Force
|
||||||
Compute_Total_ForceOMP( system, control, data, workspace, lists, mpi_data );
|
Compute_Total_ForceOMP( system, control, data, workspace, lists, mpi_data );
|
||||||
|
|
||||||
#if defined(LOG_PERFORMANCE)
|
|
||||||
if( system->my_rank == MASTER_NODE )
|
|
||||||
Update_Timing_Info( &t_start, &(data->timing.bonded) );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -697,7 +697,7 @@ int PairReaxC::write_reax_lists()
|
|||||||
int itr_i, itr_j, i, j;
|
int itr_i, itr_j, i, j;
|
||||||
int num_nbrs;
|
int num_nbrs;
|
||||||
int *ilist, *jlist, *numneigh, **firstneigh;
|
int *ilist, *jlist, *numneigh, **firstneigh;
|
||||||
double d_sqr;
|
double d_sqr, cutoff_sqr;
|
||||||
rvec dvec;
|
rvec dvec;
|
||||||
double *dist, **x;
|
double *dist, **x;
|
||||||
reax_list *far_nbrs;
|
reax_list *far_nbrs;
|
||||||
@ -712,6 +712,7 @@ int PairReaxC::write_reax_lists()
|
|||||||
far_list = far_nbrs->select.far_nbr_list;
|
far_list = far_nbrs->select.far_nbr_list;
|
||||||
|
|
||||||
num_nbrs = 0;
|
num_nbrs = 0;
|
||||||
|
int inum = list->inum;
|
||||||
dist = (double*) calloc( system->N, sizeof(double) );
|
dist = (double*) calloc( system->N, sizeof(double) );
|
||||||
|
|
||||||
int numall = list->inum + list->gnum;
|
int numall = list->inum + list->gnum;
|
||||||
@ -721,12 +722,17 @@ int PairReaxC::write_reax_lists()
|
|||||||
jlist = firstneigh[i];
|
jlist = firstneigh[i];
|
||||||
Set_Start_Index( i, num_nbrs, far_nbrs );
|
Set_Start_Index( i, num_nbrs, far_nbrs );
|
||||||
|
|
||||||
|
if (i < inum)
|
||||||
|
cutoff_sqr = control->nonb_cut*control->nonb_cut;
|
||||||
|
else
|
||||||
|
cutoff_sqr = control->bond_cut*control->bond_cut;
|
||||||
|
|
||||||
for( itr_j = 0; itr_j < numneigh[i]; ++itr_j ){
|
for( itr_j = 0; itr_j < numneigh[i]; ++itr_j ){
|
||||||
j = jlist[itr_j];
|
j = jlist[itr_j];
|
||||||
j &= NEIGHMASK;
|
j &= NEIGHMASK;
|
||||||
get_distance( x[j], x[i], &d_sqr, &dvec );
|
get_distance( x[j], x[i], &d_sqr, &dvec );
|
||||||
|
|
||||||
if( d_sqr <= (control->nonb_cut*control->nonb_cut) ){
|
if( d_sqr <= (cutoff_sqr) ){
|
||||||
dist[j] = sqrt( d_sqr );
|
dist[j] = sqrt( d_sqr );
|
||||||
set_far_nbr( &far_list[num_nbrs], j, dist[j], dvec );
|
set_far_nbr( &far_list[num_nbrs], j, dist[j], dvec );
|
||||||
++num_nbrs;
|
++num_nbrs;
|
||||||
|
|||||||
Reference in New Issue
Block a user