Cleaning changes 2

This commit is contained in:
mkanski
2019-03-25 15:22:20 +01:00
parent 99acb4ac54
commit 83e458af0b
19 changed files with 35 additions and 43 deletions

View File

@ -521,7 +521,7 @@ void PairReaxC::compute(int eflag, int vflag)
setup();
Reset( lmp, system, control, data, workspace, &lists, world );
Reset( system, control, data, workspace, &lists, world );
workspace->realloc.num_far = write_reax_lists();
// timing for filling in the reax lists
if (comm->me == 0) {
@ -531,7 +531,7 @@ void PairReaxC::compute(int eflag, int vflag)
// forces
Compute_Forces(lmp, system,control,data,workspace,&lists,out_control,mpi_data);
Compute_Forces(system,control,data,workspace,&lists,out_control,mpi_data);
read_reax_forces(vflag);
for(int k = 0; k < system->N; ++k) {

View File

@ -360,8 +360,7 @@ int BOp( storage *workspace, reax_list *bonds, double bo_cut,
void BO( reax_system *system, control_params * /*control*/, simulation_data * /*data*/,
storage *workspace, reax_list **lists, output_controls * /*out_control*/,
LAMMPS_NS::LAMMPS* lmp )
storage *workspace, reax_list **lists, output_controls * /*out_control*/ )
{
int i, j, pj, type_i, type_j;
int start_i, end_i, sym_index;

View File

@ -42,5 +42,5 @@ void Add_dBond_to_Forces_NPT( int, int, simulation_data*,
int BOp(storage*, reax_list*, double, int, int, far_neighbor_data*,
single_body_parameters*, single_body_parameters*, two_body_parameters*);
void BO( reax_system*, control_params*, simulation_data*,
storage*, reax_list**, output_controls*, LAMMPS_NS::LAMMPS* = NULL );
storage*, reax_list**, output_controls* );
#endif

View File

@ -33,7 +33,7 @@
void Bonds( reax_system *system, control_params * /*control*/,
simulation_data *data, storage *workspace, reax_list **lists,
output_controls * /*out_control*/, LAMMPS_NS::LAMMPS* lmp )
output_controls * /*out_control*/ )
{
int i, j, pj, natoms;
int start_i, end_i;

View File

@ -30,5 +30,5 @@
#include "reaxc_types.h"
void Bonds( reax_system*, control_params*, simulation_data*,
storage*, reax_list**, output_controls*, LAMMPS_NS::LAMMPS* = NULL );
storage*, reax_list**, output_controls* );
#endif

View File

@ -44,7 +44,7 @@ interaction_function Interaction_Functions[NUM_INTRS];
void Dummy_Interaction( reax_system * /*system*/, control_params * /*control*/,
simulation_data * /*data*/, storage * /*workspace*/,
reax_list ** /*lists*/, output_controls * /*out_control*/, LAMMPS_NS::LAMMPS* = NULL )
reax_list ** /*lists*/, output_controls * /*out_control*/ )
{
}
@ -76,7 +76,7 @@ void Compute_Bonded_Forces( reax_system *system, control_params *control,
/* Implement all force calls as function pointers */
for( i = 0; i < NUM_INTRS; i++ ) {
(Interaction_Functions[i])( system, control, data, workspace,
lists, out_control, NULL );
lists, out_control );
}
}
@ -115,7 +115,7 @@ void Compute_Total_Force( reax_system *system, control_params *control,
}
void Validate_Lists( LAMMPS_NS::LAMMPS *lmp, reax_system *system, storage * /*workspace*/, reax_list **lists,
void Validate_Lists( reax_system *system, storage * /*workspace*/, reax_list **lists,
int step, int /*n*/, int N, int numH, MPI_Comm comm )
{
int i, comp, Hindex;
@ -138,7 +138,7 @@ void Validate_Lists( LAMMPS_NS::LAMMPS *lmp, reax_system *system, storage * /*wo
char errmsg[256];
snprintf(errmsg, 256, "step%d-bondchk failed: i=%d end(i)=%d str(i+1)=%d\n",
step, i, End_Index(i,bonds), comp );
lmp->error->all(FLERR,errmsg);
system->error_ptr->all(FLERR,errmsg);
}
}
}
@ -166,7 +166,7 @@ void Validate_Lists( LAMMPS_NS::LAMMPS *lmp, reax_system *system, storage * /*wo
char errmsg[256];
snprintf(errmsg, 256, "step%d-hbondchk failed: H=%d end(H)=%d str(H+1)=%d\n",
step, Hindex, End_Index(Hindex,hbonds), comp );
lmp->error->all(FLERR, errmsg);
system->error_ptr->all(FLERR, errmsg);
}
}
}
@ -174,7 +174,7 @@ void Validate_Lists( LAMMPS_NS::LAMMPS *lmp, reax_system *system, storage * /*wo
}
void Init_Forces_noQEq( LAMMPS_NS::LAMMPS *lmp, reax_system *system, control_params *control,
void Init_Forces_noQEq( reax_system *system, control_params *control,
simulation_data *data, storage *workspace,
reax_list **lists, output_controls * /*out_control*/,
MPI_Comm comm ) {
@ -310,7 +310,7 @@ void Init_Forces_noQEq( LAMMPS_NS::LAMMPS *lmp, reax_system *system, control_par
workspace->realloc.num_bonds = num_bonds;
workspace->realloc.num_hbonds = num_hbonds;
Validate_Lists( lmp, system, workspace, lists, data->step,
Validate_Lists( system, workspace, lists, data->step,
system->n, system->N, system->numH, comm );
}
@ -434,14 +434,14 @@ void Estimate_Storages( reax_system *system, control_params *control,
}
void Compute_Forces( LAMMPS_NS::LAMMPS *lmp, reax_system *system, control_params *control,
void Compute_Forces( reax_system *system, control_params *control,
simulation_data *data, storage *workspace,
reax_list **lists, output_controls *out_control,
mpi_datatypes *mpi_data )
{
MPI_Comm comm = mpi_data->world;
Init_Forces_noQEq( lmp, system, control, data, workspace,
Init_Forces_noQEq( system, control, data, workspace,
lists, out_control, comm );
/********* bonded interactions ************/

View File

@ -33,7 +33,7 @@
extern interaction_function Interaction_Functions[NUM_INTRS];
void Init_Force_Functions( control_params* );
void Compute_Forces( LAMMPS_NS::LAMMPS *lmp, reax_system*, control_params*, simulation_data*,
void Compute_Forces( reax_system*, control_params*, simulation_data*,
storage*, reax_list**, output_controls*, mpi_datatypes* );
void Estimate_Storages( reax_system*, control_params*, reax_list**,
int*, int*, int*, int*, MPI_Comm );

View File

@ -33,7 +33,7 @@
void Hydrogen_Bonds( reax_system *system, control_params *control,
simulation_data *data, storage *workspace,
reax_list **lists, output_controls * /*out_control*/, LAMMPS_NS::LAMMPS* lmp )
reax_list **lists, output_controls * /*out_control*/ )
{
int i, j, k, pi, pk;
int type_i, type_j, type_k;

View File

@ -30,6 +30,6 @@
#include "reaxc_types.h"
void Hydrogen_Bonds( reax_system*, control_params*, simulation_data*,
storage*, reax_list**, output_controls*, LAMMPS_NS::LAMMPS* = NULL );
storage*, reax_list**, output_controls* );
#endif

View File

@ -32,7 +32,7 @@
void Atom_Energy( reax_system *system, control_params *control,
simulation_data *data, storage *workspace, reax_list **lists,
output_controls * /*out_control*/, LAMMPS_NS::LAMMPS* lmp )
output_controls * /*out_control*/ )
{
int i, j, pj, type_i, type_j;
double Delta_lpcorr, dfvl;

View File

@ -30,6 +30,6 @@
#include "reaxc_types.h"
void Atom_Energy( reax_system*, control_params*, simulation_data*,
storage*, reax_list**, output_controls*, LAMMPS_NS::LAMMPS* = NULL );
storage*, reax_list**, output_controls* );
#endif

View File

@ -30,7 +30,6 @@
#include "reaxc_tool_box.h"
#include "reaxc_vector.h"
using namespace LAMMPS_NS;
void Reset_Atoms( reax_system* system, control_params *control )
{
@ -121,7 +120,7 @@ void Reset_Workspace( reax_system *system, storage *workspace )
}
void Reset_Neighbor_Lists( LAMMPS *lmp, reax_system *system, control_params *control,
void Reset_Neighbor_Lists( reax_system *system, control_params *control,
storage *workspace, reax_list **lists,
MPI_Comm comm )
{
@ -147,7 +146,7 @@ void Reset_Neighbor_Lists( LAMMPS *lmp, reax_system *system, control_params *con
char errmsg[256];
snprintf(errmsg, 256, "p%d: not enough space for bonds! total=%d allocated=%d\n",
system->my_rank, total_bonds, bonds->num_intrs);
lmp->error->one(FLERR, errmsg);
control->error_ptr->one(FLERR, errmsg);
}
}
}
@ -173,14 +172,14 @@ void Reset_Neighbor_Lists( LAMMPS *lmp, reax_system *system, control_params *con
char errmsg[256];
snprintf(errmsg, 256, "p%d: not enough space for hbonds! total=%d allocated=%d\n",
system->my_rank, total_hbonds, hbonds->num_intrs);
lmp->error->one(FLERR, errmsg);
control->error_ptr->one(FLERR, errmsg);
}
}
}
}
void Reset( LAMMPS *lmp, reax_system *system, control_params *control, simulation_data *data,
void Reset( reax_system *system, control_params *control, simulation_data *data,
storage *workspace, reax_list **lists, MPI_Comm comm )
{
Reset_Atoms( system, control );
@ -189,6 +188,6 @@ void Reset( LAMMPS *lmp, reax_system *system, control_params *control, simulatio
Reset_Workspace( system, workspace );
Reset_Neighbor_Lists( lmp, system, control, workspace, lists, comm );
Reset_Neighbor_Lists( system, control, workspace, lists, comm );
}

View File

@ -29,16 +29,12 @@
#include "reaxc_types.h"
#include "lammps.h"
#include "error.h"
using namespace LAMMPS_NS;
void Reset_Pressures( simulation_data* );
void Reset_Simulation_Data( simulation_data*, int );
void Reset_Timing( reax_timing* );
void Reset_Workspace( reax_system*, storage* );
void Reset_Neighbor_Lists( LAMMPS *lmp, reax_system*, control_params*, storage*,
void Reset_Neighbor_Lists( reax_system*, control_params*, storage*,
reax_list**, MPI_Comm );
void Reset( LAMMPS *lmp, reax_system*, control_params*, simulation_data*, storage*,
void Reset( reax_system*, control_params*, simulation_data*, storage*,
reax_list**, MPI_Comm );
#endif

View File

@ -120,8 +120,7 @@ double Calculate_Omega( rvec dvec_ij, double r_ij,
void Torsion_Angles( reax_system *system, control_params *control,
simulation_data *data, storage *workspace,
reax_list **lists, output_controls *out_control,
LAMMPS_NS::LAMMPS* lmp )
reax_list **lists, output_controls *out_control )
{
int i, j, k, l, pi, pj, pk, pl, pij, plk, natoms;
int type_i, type_j, type_k, type_l;

View File

@ -30,7 +30,6 @@
#include "reaxc_types.h"
void Torsion_Angles( reax_system*, control_params*, simulation_data*,
storage*, reax_list**, output_controls*,
LAMMPS_NS::LAMMPS* = NULL );
storage*, reax_list**, output_controls* );
#endif

View File

@ -556,7 +556,7 @@ int Write_Atoms( reax_system *system, control_params * /*control*/,
}
int Write_Bonds( reax_system *system, control_params *control, reax_list *bonds,
int Write_Bonds(reax_system *system, control_params *control, reax_list *bonds,
output_controls *out_control, mpi_datatypes *mpi_data)
{
int i, j, pj, me, np;

View File

@ -906,9 +906,9 @@ typedef void (*evolve_function)(reax_system*, control_params*,
simulation_data*, storage*, reax_list**,
output_controls*, mpi_datatypes* );
typedef void (*interaction_function) ( reax_system*, control_params*,
typedef void (*interaction_function) (reax_system*, control_params*,
simulation_data*, storage*,
reax_list**, output_controls*, LAMMPS_NS::LAMMPS*);
reax_list**, output_controls*);
typedef void (*print_interaction)(reax_system*, control_params*,
simulation_data*, storage*,

View File

@ -76,7 +76,7 @@ void Calculate_dCos_Theta( rvec dvec_ji, double d_ji, rvec dvec_jk, double d_jk,
void Valence_Angles( reax_system *system, control_params *control,
simulation_data *data, storage *workspace,
reax_list **lists, output_controls * /*out_control*/, LAMMPS_NS::LAMMPS* lmp)
reax_list **lists, output_controls * /*out_control*/ )
{
int i, j, pi, k, pk, t;
int type_i, type_j, type_k;
@ -408,7 +408,7 @@ void Valence_Angles( reax_system *system, control_params *control,
char errmsg[128];
snprintf(errmsg, 128, "step%d-ran out of space on angle_list: top=%d, max=%d",
data->step, num_thb_intrs, thb_intrs->num_intrs);
lmp->error->one(FLERR, errmsg);
control->error_ptr->one(FLERR, errmsg);
}
}

View File

@ -30,7 +30,7 @@
#include "reaxc_types.h"
void Valence_Angles( reax_system*, control_params*, simulation_data*,
storage*, reax_list**, output_controls*, LAMMPS_NS::LAMMPS* = NULL);
storage*, reax_list**, output_controls*);
void Calculate_Theta( rvec, double, rvec, double, double*, double* );