forked from lijiext/lammps
the first argument to Bond::extract() should be `const char *` not `char *`.
This commit is contained in:
parent
93fe33553a
commit
6b1dbe2393
|
@ -224,7 +224,7 @@ double BondClass2::single(int type, double rsq, int /*i*/, int /*j*/, double &ff
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *BondClass2::extract( char *str, int &dim )
|
||||
void *BondClass2::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 1;
|
||||
if (strcmp(str,"r0")==0) return (void*) r0;
|
||||
|
|
|
@ -35,7 +35,7 @@ class BondClass2 : public Bond {
|
|||
virtual void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual void *extract(char *, int &);
|
||||
virtual void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double *r0,*k2,*k3,*k4;
|
||||
|
|
|
@ -276,7 +276,7 @@ double BondFENE::single(int type, double rsq, int /*i*/, int /*j*/,
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *BondFENE::extract( char *str, int &dim )
|
||||
void *BondFENE::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 1;
|
||||
if (strcmp(str,"kappa")==0) return (void*) k;
|
||||
|
|
|
@ -36,7 +36,7 @@ class BondFENE : public Bond {
|
|||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual void *extract(char *, int &);
|
||||
virtual void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double TWO_1_3;
|
||||
|
|
|
@ -189,7 +189,7 @@ void BondGromos::write_data(FILE *fp)
|
|||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double BondGromos::single(int type, double rsq, int /*i*/, int /*j*/,
|
||||
double &fforce)
|
||||
double &fforce)
|
||||
{
|
||||
double dr = rsq - r0[type]*r0[type];
|
||||
fforce = -4.0*k[type] * dr;
|
||||
|
@ -199,7 +199,7 @@ double BondGromos::single(int type, double rsq, int /*i*/, int /*j*/,
|
|||
/* ----------------------------------------------------------------------
|
||||
Return ptr to internal members upon request.
|
||||
------------------------------------------------------------------------ */
|
||||
void *BondGromos::extract( char *str, int &dim )
|
||||
void *BondGromos::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 1;
|
||||
if (strcmp(str,"kappa")==0) return (void*) k;
|
||||
|
|
|
@ -35,7 +35,7 @@ class BondGromos : public Bond {
|
|||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual void *extract(char *, int &);
|
||||
virtual void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double *k,*r0;
|
||||
|
|
|
@ -190,7 +190,7 @@ void BondHarmonic::write_data(FILE *fp)
|
|||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double BondHarmonic::single(int type, double rsq, int /*i*/, int /*j*/,
|
||||
double &fforce)
|
||||
double &fforce)
|
||||
{
|
||||
double r = sqrt(rsq);
|
||||
double dr = r - r0[type];
|
||||
|
@ -203,7 +203,7 @@ double BondHarmonic::single(int type, double rsq, int /*i*/, int /*j*/,
|
|||
/* ----------------------------------------------------------------------
|
||||
Return ptr to internal members upon request.
|
||||
------------------------------------------------------------------------ */
|
||||
void *BondHarmonic::extract( char *str, int &dim )
|
||||
void *BondHarmonic::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 1;
|
||||
if (strcmp(str,"kappa")==0) return (void*) k;
|
||||
|
|
|
@ -35,7 +35,7 @@ class BondHarmonic : public Bond {
|
|||
virtual void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual void *extract(char *, int &);
|
||||
virtual void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double *k,*r0;
|
||||
|
|
|
@ -209,7 +209,7 @@ double BondMorse::single(int type, double rsq, int /*i*/, int /*j*/,
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *BondMorse::extract(char *str, int &dim )
|
||||
void *BondMorse::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 1;
|
||||
if (strcmp(str,"r0")==0) return (void*) r0;
|
||||
|
|
|
@ -35,7 +35,7 @@ class BondMorse : public Bond {
|
|||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual void *extract(char *, int &);
|
||||
virtual void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double *d0,*alpha,*r0;
|
||||
|
|
|
@ -206,7 +206,7 @@ double BondNonlinear::single(int type, double rsq, int /*i*/, int /*j*/,
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *BondNonlinear::extract( char *str, int &dim )
|
||||
void *BondNonlinear::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 1;
|
||||
if (strcmp(str,"epsilon")==0) return (void*) epsilon;
|
||||
|
|
|
@ -35,7 +35,7 @@ class BondNonlinear : public Bond {
|
|||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual void *extract(char *, int &);
|
||||
virtual void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double *epsilon,*r0,*lamda;
|
||||
|
|
|
@ -52,7 +52,7 @@ class Bond : protected Pointers {
|
|||
virtual void write_data(FILE *) {}
|
||||
virtual double single(int, double, int, int, double &) = 0;
|
||||
virtual double memory_usage();
|
||||
virtual void *extract(char *, int &) {return NULL;}
|
||||
virtual void *extract(const char *, int &) {return NULL;}
|
||||
virtual void reinit();
|
||||
|
||||
void write_file(int, char**);
|
||||
|
|
Loading…
Reference in New Issue