2009-02-28 05:23:41 +08:00
|
|
|
/* ----------------------------------------------------------------------
|
|
|
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
|
|
|
http://lammps.sandia.gov, Sandia National Laboratories
|
|
|
|
Steve Plimpton, sjplimp@sandia.gov
|
|
|
|
|
|
|
|
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_BOX_RELAX_H
|
|
|
|
#define FIX_BOX_RELAX_H
|
|
|
|
|
|
|
|
#include "fix.h"
|
|
|
|
|
|
|
|
namespace LAMMPS_NS {
|
|
|
|
|
|
|
|
class FixBoxRelax : public Fix {
|
|
|
|
public:
|
|
|
|
FixBoxRelax(class LAMMPS *, int, char **);
|
|
|
|
~FixBoxRelax();
|
|
|
|
int setmask();
|
|
|
|
void init();
|
|
|
|
double min_energy(double *);
|
|
|
|
void min_store();
|
|
|
|
void min_step(double, double *);
|
2009-03-06 04:49:19 +08:00
|
|
|
double max_alpha(double *);
|
2009-02-28 05:23:41 +08:00
|
|
|
int min_dof();
|
2009-03-25 22:59:54 +08:00
|
|
|
int modify_param(int, char **);
|
2009-02-28 05:23:41 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
int p_flag[3];
|
|
|
|
int press_couple,allremap;
|
2009-02-28 05:24:57 +08:00
|
|
|
int dimension;
|
2009-02-28 05:23:41 +08:00
|
|
|
double p_target[3],p_current[3];
|
|
|
|
double dilation[3];
|
|
|
|
double volinit,xprdinit,yprdinit,zprdinit;
|
2009-03-06 05:21:18 +08:00
|
|
|
double vmax,pv2e,pflagsum;
|
2009-02-28 05:23:41 +08:00
|
|
|
|
2009-02-28 05:24:57 +08:00
|
|
|
double boxlo0[3],boxhi0[3]; // box bounds at start of line search
|
|
|
|
double s0[6]; // scale matrix in Voigt notation
|
|
|
|
double ds[6]; // increment in scale matrix
|
2009-02-28 05:23:41 +08:00
|
|
|
|
|
|
|
char *id_temp,*id_press;
|
|
|
|
class Compute *temperature,*pressure;
|
|
|
|
int tflag,pflag;
|
|
|
|
|
|
|
|
int nrigid;
|
|
|
|
int *rfix;
|
|
|
|
|
|
|
|
void remap();
|
|
|
|
void couple();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|