Commit 3a4bb6f9 authored by mkanski's avatar mkanski
Browse files

All errors and warning are now printed through LAMMPS

parent 146e2f28
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -137,15 +137,15 @@ PairReaxC::~PairReaxC()

    // deallocate reax data-structures

    if (control->tabulate ) Deallocate_Lookup_Tables( system);
    if (control->tabulate ) Deallocate_Lookup_Tables( lmp, system);

    if (control->hbond_cut > 0 )  Delete_List( lists+HBONDS, world);
    Delete_List( lists+BONDS, world );
    Delete_List( lists+THREE_BODIES, world );
    Delete_List( lists+FAR_NBRS, world );
    if (control->hbond_cut > 0 )  Delete_List( lmp, lists+HBONDS, world);
    Delete_List( lmp, lists+BONDS, world );
    Delete_List( lmp, lists+THREE_BODIES, world );
    Delete_List( lmp, lists+FAR_NBRS, world );

    DeAllocate_Workspace( control, workspace );
    DeAllocate_System( system );
    DeAllocate_Workspace( lmp, control, workspace );
    DeAllocate_System( lmp, system );
  }

  memory->destroy( system );
@@ -223,7 +223,7 @@ void PairReaxC::settings(int narg, char **arg)
    out_control->atom_info = 0;
    out_control->bond_info = 0;
    out_control->angle_info = 0;
  } else Read_Control_File(arg[0], control, out_control);
  } else Read_Control_File(lmp, arg[0], control, out_control);

  // default values

@@ -298,7 +298,7 @@ void PairReaxC::coeff( int nargs, char **args )
  FILE *fp;
  fp = force->open_potential(file);
  if (fp != NULL)
    Read_Force_Field(fp, &(system->reax_param), control);
    Read_Force_Field(lmp, fp, &(system->reax_param), control);
  else {
      char str[128];
      snprintf(str,128,"Cannot open ReaxFF potential file %s",file);
@@ -394,7 +394,7 @@ void PairReaxC::init_style( )
                   "increased neighbor list skin.");

  for( int i = 0; i < LIST_N; ++i )
    if (lists[i].allacated != 1)
    if (lists[i].allocated != 1)
      lists[i].allocated = 0;

  if (fix_reax == NULL) {
@@ -437,13 +437,13 @@ void PairReaxC::setup( )

    // initialize my data structures

    PreAllocate_Space( system, control, workspace, world );
    PreAllocate_Space( lmp, system, control, workspace, world );
    write_reax_atoms();

    int num_nbrs = estimate_reax_lists();
    if(!Make_List(system->total_cap, num_nbrs, TYP_FAR_NEIGHBOR,
    if(!Make_List(lmp, system->total_cap, num_nbrs, TYP_FAR_NEIGHBOR,
                  lists+FAR_NBRS, world))
      error->all(FLERR,"Pair reax/c problem in far neighbor list");
      error->one(FLERR,"Pair reax/c problem in far neighbor list");

    write_reax_lists();
    Initialize( lmp, system, control, data, workspace, &lists, out_control,
@@ -582,7 +582,7 @@ void PairReaxC::compute(int eflag, int vflag)

  data->step = update->ntimestep;

  Output_Results( system, control, data, &lists, out_control, mpi_data );
  Output_Results( lmp, system, control, data, &lists, out_control, mpi_data );

  // populate tmpid and tmpbo arrays for fix reax/c/species
  int i, j;
+160 −166

File changed.

Preview size limit exceeded, changes collapsed.

+4 −4
Original line number Diff line number Diff line
@@ -33,14 +33,14 @@
#include "error.h"
using namespace LAMMPS_NS;

int  PreAllocate_Space( reax_system*, control_params*, storage*, MPI_Comm );
int  PreAllocate_Space( LAMMPS_NS::LAMMPS*, reax_system*, control_params*, storage*, MPI_Comm );

int  Allocate_System( reax_system*, int, int, char* );
void DeAllocate_System( reax_system* );
void DeAllocate_System( LAMMPS_NS::LAMMPS*, reax_system* );

int  Allocate_Workspace( reax_system*, control_params*, storage*,
int  Allocate_Workspace( LAMMPS_NS::LAMMPS*, reax_system*, control_params*, storage*,
                         int, int, MPI_Comm, char* );
void DeAllocate_Workspace( control_params*, storage* );
void DeAllocate_Workspace( LAMMPS_NS::LAMMPS*, control_params*, storage* );

void ReAllocate( LAMMPS *lmp, reax_system*, control_params*, simulation_data*, storage*,
                 reax_list**, mpi_datatypes* );
+2 −1
Original line number Diff line number Diff line
@@ -360,7 +360,8 @@ 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*/ )
         storage *workspace, reax_list **lists, output_controls * /*out_control*/,
         LAMMPS_NS::LAMMPS* lmp )
{
  int i, j, pj, type_i, type_j;
  int start_i, end_i, sym_index;
+1 −1
Original line number Diff line number Diff line
@@ -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* );
         storage*, reax_list**, output_controls*, LAMMPS_NS::LAMMPS* = NULL );
#endif
Loading