git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7379 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2011-12-16 21:15:49 +00:00
parent 70316a8f77
commit 4f48544d41
61 changed files with 108 additions and 104 deletions

View File

@ -460,7 +460,7 @@ double PairLJClass2CoulLong::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairLJClass2CoulLong::extract(char *str, int &dim)
void *PairLJClass2CoulLong::extract(const char *str, int &dim)
{
dim = 0;
if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;

View File

@ -38,7 +38,7 @@ class PairLJClass2CoulLong : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_lj_global;

View File

@ -489,7 +489,7 @@ double PairBornCoulLong::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairBornCoulLong::extract(char *str, int &dim)
void *PairBornCoulLong::extract(const char *str, int &dim)
{
dim = 0;
if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;

View File

@ -38,7 +38,7 @@ class PairBornCoulLong : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_lj_global;

View File

@ -459,7 +459,7 @@ double PairBuckCoulLong::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairBuckCoulLong::extract(char *str, int &dim)
void *PairBuckCoulLong::extract(const char *str, int &dim)
{
dim = 0;
if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;

View File

@ -38,7 +38,7 @@ class PairBuckCoulLong : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_lj_global;

View File

@ -556,7 +556,7 @@ double PairCoulLong::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairCoulLong::extract(char *str, int &dim)
void *PairCoulLong::extract(const char *str, int &dim)
{
if (strcmp(str,"cut_coul") == 0) {
dim = 0;

View File

@ -38,7 +38,7 @@ class PairCoulLong : public Pair {
virtual void write_restart_settings(FILE *);
virtual void read_restart_settings(FILE *);
virtual double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_coul,cut_coulsq;

View File

@ -1181,7 +1181,7 @@ double PairLJCharmmCoulLong::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairLJCharmmCoulLong::extract(char *str, int &dim)
void *PairLJCharmmCoulLong::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"lj14_1") == 0) return (void *) lj14_1;

View File

@ -44,7 +44,7 @@ class PairLJCharmmCoulLong : public Pair {
void compute_inner();
void compute_middle();
void compute_outer(int, int);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
int implicit;

View File

@ -1122,7 +1122,7 @@ double PairLJCutCoulLong::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairLJCutCoulLong::extract(char *str, int &dim)
void *PairLJCutCoulLong::extract(const char *str, int &dim)
{
dim = 0;
if (strcmp(str,"cut_coul") == 0) return (void *) &cut_coul;

View File

@ -43,7 +43,7 @@ class PairLJCutCoulLong : public Pair {
void compute_inner();
void compute_middle();
void compute_outer(int, int);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_lj_global;

View File

@ -503,7 +503,7 @@ void PairLJCutCoulLongTIP4P::find_M(int i, int &iH1, int &iH2, double *xM)
/* ---------------------------------------------------------------------- */
void *PairLJCutCoulLongTIP4P::extract(char *str, int &dim)
void *PairLJCutCoulLongTIP4P::extract(const char *str, int &dim)
{
dim = 0;
if (strcmp(str,"qdist") == 0) return (void *) &qdist;

View File

@ -32,7 +32,7 @@ class PairLJCutCoulLongTIP4P : public PairLJCutCoulLong {
void init_style();
void write_restart_settings(FILE *fp);
void read_restart_settings(FILE *fp);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
int typeH,typeO; // atom types of TIP4P water H and O atoms

View File

@ -67,8 +67,8 @@ FixBondSwap::FixBondSwap(LAMMPS *lmp, int narg, char **arg) :
char **newarg = new char*[3];
newarg[0] = id_temp;
newarg[1] = "all";
newarg[2] = "temp";
newarg[1] = (char *) "all";
newarg[2] = (char *) "temp";
modify->add_compute(3,newarg);
delete [] newarg;
tflag = 1;

View File

@ -36,10 +36,11 @@ using namespace LAMMPS_NS;
enum{FCC,BCC,HCP,DIM,DIAMOND,B1,C11,L12,B2};
int nkeywords = 21;
char *keywords[] = {"Ec","alpha","rho0","delta","lattce",
const char *keywords[] = {"Ec","alpha","rho0","delta","lattce",
"attrac","repuls","nn2","Cmin","Cmax","rc","delr",
"augt1","gsmooth_factor","re","ialloy","mixture_ref_t",
"erose_form","zbl","emb_lin_neg","bkgd_dyn"};
"augt1","gsmooth_factor","re","ialloy",
"mixture_ref_t","erose_form","zbl",
"emb_lin_neg","bkgd_dyn"};
/* ---------------------------------------------------------------------- */

View File

@ -493,7 +493,7 @@ double PairLJCharmmCoulCharmm::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairLJCharmmCoulCharmm::extract(char *str, int &dim)
void *PairLJCharmmCoulCharmm::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"lj14_1") == 0) return (void *) lj14_1;

View File

@ -38,7 +38,7 @@ class PairLJCharmmCoulCharmm : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
virtual double single(int, int, int, int, double, double, double, double &);
virtual void *extract(char *, int &);
virtual void *extract(const char *, int &);
protected:
int implicit;

View File

@ -69,7 +69,8 @@ void ComputeEventDisplace::init()
if (id_event != NULL) {
int ifix = modify->find_fix(id_event);
if (ifix < 0) error->all(FLERR,"Could not find compute event/displace fix ID");
if (ifix < 0) error->all(FLERR,
"Could not find compute event/displace fix ID");
fix_event = (FixEvent*) modify->fix[ifix];
if (strcmp(fix_event->style,"EVENT/PRD") != 0 &&
@ -145,7 +146,7 @@ double ComputeEventDisplace::compute_scalar()
/* ---------------------------------------------------------------------- */
void ComputeEventDisplace::reset_extra_compute_fix(char *id_new)
void ComputeEventDisplace::reset_extra_compute_fix(const char *id_new)
{
delete [] id_event;
id_event = NULL;

View File

@ -30,7 +30,7 @@ class ComputeEventDisplace : public Compute {
~ComputeEventDisplace();
void init();
double compute_scalar();
void reset_extra_compute_fix(char *);
void reset_extra_compute_fix(const char *);
private:
int triclinic;

View File

@ -768,12 +768,12 @@ void PRD::options(int narg, char **arg)
maxeval = 50;
temp_flag = 0;
char *str = "geom";
char *str = (char *) "geom";
int n = strlen(str) + 1;
loop_setting = new char[n];
strcpy(loop_setting,str);
str = "gaussian";
str = (char *) "gaussian";
n = strlen(str) + 1;
dist_setting = new char[n];
strcpy(dist_setting,str);

View File

@ -932,16 +932,16 @@ void TAD::compute_tlo(int ievent)
// update first event
char* statstr = "D ";
char* statstr = (char *) "D ";
if (ievent == 0) {
deltfirst = deltlo;
event_first = ievent;
statstr = "DF";
statstr = (char *) "DF";
} else if (deltlo < deltfirst) {
deltfirst = deltlo;
event_first = ievent;
statstr = "DF";
statstr = (char *) "DF";
}
// first-replica output about each event

View File

@ -175,8 +175,8 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) :
char **newarg = new char*[3];
newarg[0] = id_temp;
newarg[1] = "all";
newarg[2] = "temp";
newarg[1] = (char *) "all";
newarg[2] = (char *) "temp";
modify->add_compute(3,newarg);
delete [] newarg;
tflag = 1;
@ -192,8 +192,8 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) :
newarg = new char*[4];
newarg[0] = id_press;
newarg[1] = "all";
newarg[2] = "pressure";
newarg[1] = (char *) "all";
newarg[2] = (char *) "pressure";
newarg[3] = id_temp;
modify->add_compute(4,newarg);
delete [] newarg;

View File

@ -44,7 +44,8 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
for (int i = 0; i < n-1; i++)
if (!isalnum(id[i]) && id[i] != '_')
error->all(FLERR,"Compute ID must be alphanumeric or underscore characters");
error->all(FLERR,
"Compute ID must be alphanumeric or underscore characters");
igroup = group->find(arg[1]);
if (igroup == -1) error->all(FLERR,"Could not find compute group ID");
@ -135,9 +136,10 @@ void Compute::reset_extra_dof()
/* ---------------------------------------------------------------------- */
void Compute::reset_extra_compute_fix(char *)
void Compute::reset_extra_compute_fix(const char *)
{
error->all(FLERR,"Compute does not allow an extra compute or fix to be reset");
error->all(FLERR,
"Compute does not allow an extra compute or fix to be reset");
}
/* ----------------------------------------------------------------------

View File

@ -103,7 +103,7 @@ class Compute : protected Pointers {
virtual void restore_bias(int, double *) {}
virtual void restore_bias_all() {}
virtual void reset_extra_compute_fix(char *);
virtual void reset_extra_compute_fix(const char *);
void addstep(bigint);
int matchstep(bigint);

View File

@ -277,7 +277,7 @@ void ComputePressure::virial_compute(int n, int ndiag)
/* ---------------------------------------------------------------------- */
void ComputePressure::reset_extra_compute_fix(char *id_new)
void ComputePressure::reset_extra_compute_fix(const char *id_new)
{
delete [] id_temp;
int n = strlen(id_new) + 1;

View File

@ -31,7 +31,7 @@ class ComputePressure : public Compute {
void init();
double compute_scalar();
void compute_vector();
void reset_extra_compute_fix(char *);
void reset_extra_compute_fix(const char *);
protected:
double boltz,nktv2p,inv_volume;

View File

@ -74,13 +74,13 @@ void DumpAtom::init_style()
// setup column string
if (scale_flag == 0 && image_flag == 0)
columns = "id type x y z";
columns = (char *) "id type x y z";
else if (scale_flag == 0 && image_flag == 1)
columns = "id type x y z ix iy iz";
columns = (char *) "id type x y z ix iy iz";
else if (scale_flag == 1 && image_flag == 0)
columns = "id type xs ys zs";
columns = (char *) "id type xs ys zs";
else if (scale_flag == 1 && image_flag == 1)
columns = "id type xs ys zs ix iy iz";
columns = (char *) "id type xs ys zs ix iy iz";
// setup function ptrs

View File

@ -1833,9 +1833,9 @@ double *DumpImage::value2color(double value)
search user-defined color names first, then the list of NCOLORS names
------------------------------------------------------------------------- */
double *DumpImage::color2rgb(char *color)
double *DumpImage::color2rgb(const char *color)
{
static char *name[NCOLORS] = {
static const char *name[NCOLORS] = {
"aliceblue",
"antiquewhite",
"aqua",
@ -2136,8 +2136,7 @@ double *DumpImage::color2rgb(char *color)
double *DumpImage::element2color(char *element)
{
static char *name[NELEMENTS] = {
static const char *name[NELEMENTS] = {
"H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne",
"Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca",
"Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn",
@ -2276,7 +2275,7 @@ double *DumpImage::element2color(char *element)
double DumpImage::element2diam(char *element)
{
static char *name[NELEMENTS] = {
static const char *name[NELEMENTS] = {
"H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne",
"Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca",
"Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn",

View File

@ -152,7 +152,7 @@ class DumpImage : public DumpCustom {
void write_PPM();
double *value2color(double);
double *color2rgb(char *);
double *color2rgb(const char *);
double *element2color(char *);
double element2diam(char *);

View File

@ -88,7 +88,7 @@ DumpLocal::DumpLocal(LAMMPS *lmp, int narg, char **arg) :
// setup default label string
char *str = "ENTRIES";
char *str = (char *) "ENTRIES";
n = strlen(str) + 1;
label = new char[n];
strcpy(label,str);

View File

@ -129,7 +129,7 @@ void Error::warning(const char *file, int line, const char *str, int logflag)
write message to screen and logfile (if logflag is set)
------------------------------------------------------------------------- */
void Error::message(const char *file, int line, char *str, int logflag)
void Error::message(const char *file, int line, const char *str, int logflag)
{
if (screen) fprintf(screen,"%s (%s:%d)\n",str,file,line);
if (logflag && logfile) fprintf(logfile,"%s (%s:%d)\n",str,file,line);

View File

@ -28,7 +28,7 @@ class Error : protected Pointers {
void all(const char *, int, const char *);
void one(const char *, int, const char *);
void warning(const char *, int, const char *, int = 1);
void message(const char *, int, char *, int = 1);
void message(const char *, int, const char *, int = 1);
void done();
};

View File

@ -1167,9 +1167,9 @@ void Input::package()
} else if (strcmp(arg[0],"gpu") == 0) {
char **fixarg = new char*[2+narg];
fixarg[0] = "package_gpu";
fixarg[1] = "all";
fixarg[2] = "GPU";
fixarg[0] = (char *) "package_gpu";
fixarg[1] = (char *) "all";
fixarg[2] = (char *) "GPU";
for (int i = 1; i < narg; i++) fixarg[i+2] = arg[i];
modify->allow_early_fix = 1;
modify->add_fix(2+narg,fixarg,NULL);
@ -1178,9 +1178,9 @@ void Input::package()
} else if (strcmp(arg[0],"omp") == 0) {
char **fixarg = new char*[2+narg];
fixarg[0] = "package_omp";
fixarg[1] = "all";
fixarg[2] = "OMP";
fixarg[0] = (char *) "package_omp";
fixarg[1] = (char *) "all";
fixarg[2] = (char *) "OMP";
for (int i = 1; i < narg; i++) fixarg[i+2] = arg[i];
modify->allow_early_fix = 1;
modify->add_fix(2+narg,fixarg,NULL);

View File

@ -73,7 +73,7 @@ void KSpace::modify_params(int narg, char **arg)
/* ---------------------------------------------------------------------- */
void *KSpace::extract(char *str)
void *KSpace::extract(const char *str)
{
if (strcmp(str,"scale") == 0) return (void *) &scale;
return NULL;

View File

@ -29,7 +29,7 @@ class KSpace : protected Pointers {
KSpace(class LAMMPS *, int, char **);
virtual ~KSpace() {}
void modify_params(int, char **);
void *extract(char *);
void *extract(const char *);
virtual void init() = 0;
virtual void setup() = 0;

View File

@ -750,7 +750,7 @@ double Min::fnorm_inf()
char *Min::stopstrings(int n)
{
char *strings[] = {"max iterations",
const char *strings[] = {"max iterations",
"max force evaluations",
"energy tolerance",
"force tolerance",
@ -760,5 +760,5 @@ char *Min::stopstrings(int n)
"quadratic factors are zero",
"trust region too small",
"HFTN minimizer error"};
return strings[n];
return (char *) strings[n];
}

View File

@ -839,7 +839,7 @@ void Modify::modify_compute(int narg, char **arg)
delete a Compute from list of Computes
------------------------------------------------------------------------- */
void Modify::delete_compute(char *id)
void Modify::delete_compute(const char *id)
{
int icompute = find_compute(id);
if (icompute < 0) error->all(FLERR,"Could not find compute ID to delete");
@ -856,7 +856,7 @@ void Modify::delete_compute(char *id)
return index of compute or -1 if not found
------------------------------------------------------------------------- */
int Modify::find_compute(char *id)
int Modify::find_compute(const char *id)
{
int icompute;
for (icompute = 0; icompute < ncompute; icompute++)

View File

@ -88,8 +88,8 @@ class Modify : protected Pointers {
void add_compute(int, char **, char *suffix = NULL);
void modify_compute(int, char **);
void delete_compute(char *);
int find_compute(char *);
void delete_compute(const char *);
int find_compute(const char *);
void clearstep_compute();
void addstep_compute(bigint);
void addstep_compute_all(bigint);

View File

@ -120,7 +120,7 @@ class Pair : protected Pointers {
// specific child-class methods for certain Pair styles
virtual void *extract(char *, int &) {return NULL;}
virtual void *extract(const char *, int &) {return NULL;}
virtual void swap_eam(double *, double **) {}
virtual void reset_dt() {}
virtual void min_xf_pointers(int, double **, double **) {}

View File

@ -399,7 +399,7 @@ double PairBorn::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairBorn::extract(char *str, int &dim)
void *PairBorn::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"a") == 0) return (void *) a;

View File

@ -38,7 +38,7 @@ class PairBorn : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_global;

View File

@ -369,7 +369,7 @@ double PairBuck::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairBuck::extract(char *str, int &dim)
void *PairBuck::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"a") == 0) return (void *) a;

View File

@ -37,7 +37,7 @@ class PairBuck : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_global;

View File

@ -300,7 +300,7 @@ double PairCoulCut::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
void *PairCoulCut::extract(char *str, int &dim)
void *PairCoulCut::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"scale") == 0) return (void *) scale;

View File

@ -38,7 +38,7 @@ class PairCoulCut : public Pair {
virtual void write_restart_settings(FILE *);
virtual void read_restart_settings(FILE *);
virtual double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_global;

View File

@ -327,7 +327,7 @@ double PairGauss::single(int i, int j, int itype, int jtype, double rsq,
/* ---------------------------------------------------------------------- */
void *PairGauss::extract(char *str, int &dim)
void *PairGauss::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"a") == 0) return (void *) a;

View File

@ -37,7 +37,7 @@ class PairGauss : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_global;

View File

@ -676,7 +676,7 @@ double PairHybrid::memory_usage()
for cut_coul, insure all non-NULL results are equal since required by Kspace
------------------------------------------------------------------------- */
void *PairHybrid::extract(char *str, int &dim)
void *PairHybrid::extract(const char *str, int &dim)
{
void *cutptr = NULL;
void *ptr;

View File

@ -47,7 +47,7 @@ class PairHybrid : public Pair {
void compute_inner();
void compute_middle();
void compute_outer(int, int);
void *extract(char *, int &);
void *extract(const char *, int &);
void reset_dt();
int check_ijtype(int, int, char *);

View File

@ -696,7 +696,7 @@ double PairLJCut::single(int i, int j, int itype, int jtype, double rsq,
/* ---------------------------------------------------------------------- */
void *PairLJCut::extract(char *str, int &dim)
void *PairLJCut::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"epsilon") == 0) return (void *) epsilon;

View File

@ -39,7 +39,7 @@ class PairLJCut : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
void compute_inner();
void compute_middle();

View File

@ -299,7 +299,7 @@ double PairSoft::single(int i, int j, int itype, int jtype, double rsq,
/* ---------------------------------------------------------------------- */
void *PairSoft::extract(char *str, int &dim)
void *PairSoft::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"a") == 0) return (void *) prefactor;

View File

@ -40,7 +40,7 @@ class PairSoft : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
double cut_global;

View File

@ -947,7 +947,7 @@ double PairTable::single(int i, int j, int itype, int jtype, double rsq,
no way to know which tables are active since pair::init() not yet called
------------------------------------------------------------------------- */
void *PairTable::extract(char *str, int &dim)
void *PairTable::extract(const char *str, int &dim)
{
if (strcmp(str,"cut_coul") != 0) return NULL;
if (ntables == 0) error->all(FLERR,"All pair coeffs are not set");
@ -955,7 +955,8 @@ void *PairTable::extract(char *str, int &dim)
double cut_coul = tables[0].cut;
for (int m = 1; m < ntables; m++)
if (tables[m].cut != cut_coul)
error->all(FLERR,"Pair table cutoffs must all be equal to use with KSpace");
error->all(FLERR,
"Pair table cutoffs must all be equal to use with KSpace");
dim = 0;
return &tables[0].cut;
}

View File

@ -38,7 +38,7 @@ class PairTable : public Pair {
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(char *, int &);
void *extract(const char *, int &);
protected:
int tabstyle,tablength;

View File

@ -325,7 +325,7 @@ void ReadData::header(int flag)
// customize for new sections
char *section_keywords[NSECTIONS] =
const char *section_keywords[NSECTIONS] =
{"Atoms","Velocities","Ellipsoids","Lines","Triangles",
"Bonds","Angles","Dihedrals","Impropers",
"Masses","Pair Coeffs","Bond Coeffs","Angle Coeffs",
@ -604,7 +604,7 @@ void ReadData::velocities()
to find atoms, must build atom map if not a molecular system
------------------------------------------------------------------------- */
void ReadData::bonus(bigint nbonus, AtomVec *ptr, char *type)
void ReadData::bonus(bigint nbonus, AtomVec *ptr, const char *type)
{
int i,m,nchunk;
@ -1426,7 +1426,7 @@ void ReadData::skip_lines(int n)
if dupflag, duplicate 1st word, so pair_coeff "2" becomes "2 2"
------------------------------------------------------------------------- */
void ReadData::parse_coeffs(char *line, char *addstr, int dupflag)
void ReadData::parse_coeffs(char *line, const char *addstr, int dupflag)
{
char *ptr;
if (ptr = strchr(line,'#')) *ptr = '\0';
@ -1439,9 +1439,9 @@ void ReadData::parse_coeffs(char *line, char *addstr, int dupflag)
arg = (char **)
memory->srealloc(arg,maxarg*sizeof(char *),"read_data:arg");
}
if (addstr && narg == 1 && !islower(word[0])) arg[narg++] = addstr;
if (addstr && narg == 1 && !islower(word[0])) arg[narg++] = (char *) addstr;
arg[narg++] = word;
if (addstr && narg == 2 && islower(word[0])) arg[narg++] = addstr;
if (addstr && narg == 2 && islower(word[0])) arg[narg++] = (char *) addstr;
if (dupflag && narg == 1) arg[narg++] = word;
word = strtok(NULL," \t\n\r\f");
}

View File

@ -51,11 +51,11 @@ class ReadData : protected Pointers {
void header(int);
void parse_keyword(int, int);
void skip_lines(int);
void parse_coeffs(char *, char *, int);
void parse_coeffs(char *, const char *, int);
void atoms();
void velocities();
void bonus(bigint, class AtomVec *, char *);
void bonus(bigint, class AtomVec *, const char *);
void bonds();
void angles();

View File

@ -134,7 +134,7 @@ Thermo::Thermo(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
// format strings
char *bigint_format = BIGINT_FORMAT;
char *bigint_format = (char *) BIGINT_FORMAT;
char *fformat_multi = (char *) "---------------- Step %%8%s ----- "
"CPU = %%11.4f (sec) ----------------";

View File

@ -114,7 +114,7 @@ void Velocity::command(int narg, char **arg)
initialization of defaults before calling velocity methods externaly
------------------------------------------------------------------------- */
void Velocity::init_external(char *extgroup)
void Velocity::init_external(const char *extgroup)
{
igroup = group->find(extgroup);
if (igroup == -1) error->all(FLERR,"Could not find velocity group ID");

View File

@ -28,7 +28,7 @@ class Velocity : protected Pointers {
public:
Velocity(class LAMMPS *);
void command(int, char **);
void init_external(char *);
void init_external(const char *);
void options(int, char **);
void create(double, int);