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;
|
dim = 1;
|
||||||
if (strcmp(str,"r0")==0) return (void*) r0;
|
if (strcmp(str,"r0")==0) return (void*) r0;
|
||||||
|
|
|
@ -35,7 +35,7 @@ class BondClass2 : public Bond {
|
||||||
virtual void read_restart(FILE *);
|
virtual void read_restart(FILE *);
|
||||||
void write_data(FILE *);
|
void write_data(FILE *);
|
||||||
double single(int, double, int, int, double &);
|
double single(int, double, int, int, double &);
|
||||||
virtual void *extract(char *, int &);
|
virtual void *extract(const char *, int &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double *r0,*k2,*k3,*k4;
|
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;
|
dim = 1;
|
||||||
if (strcmp(str,"kappa")==0) return (void*) k;
|
if (strcmp(str,"kappa")==0) return (void*) k;
|
||||||
|
|
|
@ -36,7 +36,7 @@ class BondFENE : public Bond {
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_data(FILE *);
|
void write_data(FILE *);
|
||||||
double single(int, double, int, int, double &);
|
double single(int, double, int, int, double &);
|
||||||
virtual void *extract(char *, int &);
|
virtual void *extract(const char *, int &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double TWO_1_3;
|
double TWO_1_3;
|
||||||
|
|
|
@ -199,7 +199,7 @@ double BondGromos::single(int type, double rsq, int /*i*/, int /*j*/,
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
Return ptr to internal members upon request.
|
Return ptr to internal members upon request.
|
||||||
------------------------------------------------------------------------ */
|
------------------------------------------------------------------------ */
|
||||||
void *BondGromos::extract( char *str, int &dim )
|
void *BondGromos::extract(const char *str, int &dim)
|
||||||
{
|
{
|
||||||
dim = 1;
|
dim = 1;
|
||||||
if (strcmp(str,"kappa")==0) return (void*) k;
|
if (strcmp(str,"kappa")==0) return (void*) k;
|
||||||
|
|
|
@ -35,7 +35,7 @@ class BondGromos : public Bond {
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_data(FILE *);
|
void write_data(FILE *);
|
||||||
double single(int, double, int, int, double &);
|
double single(int, double, int, int, double &);
|
||||||
virtual void *extract(char *, int &);
|
virtual void *extract(const char *, int &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double *k,*r0;
|
double *k,*r0;
|
||||||
|
|
|
@ -203,7 +203,7 @@ double BondHarmonic::single(int type, double rsq, int /*i*/, int /*j*/,
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
Return ptr to internal members upon request.
|
Return ptr to internal members upon request.
|
||||||
------------------------------------------------------------------------ */
|
------------------------------------------------------------------------ */
|
||||||
void *BondHarmonic::extract( char *str, int &dim )
|
void *BondHarmonic::extract(const char *str, int &dim)
|
||||||
{
|
{
|
||||||
dim = 1;
|
dim = 1;
|
||||||
if (strcmp(str,"kappa")==0) return (void*) k;
|
if (strcmp(str,"kappa")==0) return (void*) k;
|
||||||
|
|
|
@ -35,7 +35,7 @@ class BondHarmonic : public Bond {
|
||||||
virtual void read_restart(FILE *);
|
virtual void read_restart(FILE *);
|
||||||
void write_data(FILE *);
|
void write_data(FILE *);
|
||||||
double single(int, double, int, int, double &);
|
double single(int, double, int, int, double &);
|
||||||
virtual void *extract(char *, int &);
|
virtual void *extract(const char *, int &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double *k,*r0;
|
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;
|
dim = 1;
|
||||||
if (strcmp(str,"r0")==0) return (void*) r0;
|
if (strcmp(str,"r0")==0) return (void*) r0;
|
||||||
|
|
|
@ -35,7 +35,7 @@ class BondMorse : public Bond {
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_data(FILE *);
|
void write_data(FILE *);
|
||||||
double single(int, double, int, int, double &);
|
double single(int, double, int, int, double &);
|
||||||
virtual void *extract(char *, int &);
|
virtual void *extract(const char *, int &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double *d0,*alpha,*r0;
|
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;
|
dim = 1;
|
||||||
if (strcmp(str,"epsilon")==0) return (void*) epsilon;
|
if (strcmp(str,"epsilon")==0) return (void*) epsilon;
|
||||||
|
|
|
@ -35,7 +35,7 @@ class BondNonlinear : public Bond {
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_data(FILE *);
|
void write_data(FILE *);
|
||||||
double single(int, double, int, int, double &);
|
double single(int, double, int, int, double &);
|
||||||
virtual void *extract(char *, int &);
|
virtual void *extract(const char *, int &);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double *epsilon,*r0,*lamda;
|
double *epsilon,*r0,*lamda;
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Bond : protected Pointers {
|
||||||
virtual void write_data(FILE *) {}
|
virtual void write_data(FILE *) {}
|
||||||
virtual double single(int, double, int, int, double &) = 0;
|
virtual double single(int, double, int, int, double &) = 0;
|
||||||
virtual double memory_usage();
|
virtual double memory_usage();
|
||||||
virtual void *extract(char *, int &) {return NULL;}
|
virtual void *extract(const char *, int &) {return NULL;}
|
||||||
virtual void reinit();
|
virtual void reinit();
|
||||||
|
|
||||||
void write_file(int, char**);
|
void write_file(int, char**);
|
||||||
|
|
Loading…
Reference in New Issue