2006-09-28 03:51:33 +08:00
|
|
|
/* ----------------------------------------------------------------------
|
|
|
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
2007-01-30 08:22:05 +08:00
|
|
|
http://lammps.sandia.gov, Sandia National Laboratories
|
|
|
|
Steve Plimpton, sjplimp@sandia.gov
|
2006-09-28 03:51:33 +08:00
|
|
|
|
|
|
|
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
|
|
|
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
|
|
|
certain rights in this software. This software is distributed under
|
|
|
|
the GNU General Public License.
|
|
|
|
|
|
|
|
See the README file in the top-level LAMMPS directory.
|
|
|
|
------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#ifndef FIX_SPRING_SELF_H
|
|
|
|
#define FIX_SPRING_SELF_H
|
|
|
|
|
|
|
|
#include "fix.h"
|
|
|
|
|
2007-01-30 08:22:05 +08:00
|
|
|
namespace LAMMPS_NS {
|
|
|
|
|
2006-09-28 03:51:33 +08:00
|
|
|
class FixSpringSelf : public Fix {
|
|
|
|
public:
|
2007-01-30 08:22:05 +08:00
|
|
|
FixSpringSelf(class LAMMPS *, int, char **);
|
2006-09-28 03:51:33 +08:00
|
|
|
~FixSpringSelf();
|
|
|
|
int setmask();
|
|
|
|
void init();
|
2008-01-10 05:56:57 +08:00
|
|
|
void setup(int);
|
2006-09-28 03:51:33 +08:00
|
|
|
void post_force(int);
|
|
|
|
void post_force_respa(int, int, int);
|
2008-06-07 07:21:07 +08:00
|
|
|
void min_post_force(int);
|
|
|
|
double compute_scalar();
|
2006-09-28 03:51:33 +08:00
|
|
|
|
2007-10-05 01:57:04 +08:00
|
|
|
double memory_usage();
|
2006-09-28 03:51:33 +08:00
|
|
|
void grow_arrays(int);
|
|
|
|
void copy_arrays(int, int);
|
|
|
|
int pack_exchange(int, double *);
|
|
|
|
int unpack_exchange(int, double *);
|
|
|
|
int pack_restart(int, double *);
|
|
|
|
void unpack_restart(int, int);
|
|
|
|
int size_restart(int);
|
|
|
|
int maxsize_restart();
|
|
|
|
|
|
|
|
private:
|
2008-06-07 07:21:07 +08:00
|
|
|
double k,espring;
|
2006-09-28 03:51:33 +08:00
|
|
|
double **xoriginal; // original coords of atoms
|
|
|
|
int nlevels_respa;
|
|
|
|
};
|
|
|
|
|
2007-01-30 08:22:05 +08:00
|
|
|
}
|
|
|
|
|
2006-09-28 03:51:33 +08:00
|
|
|
#endif
|