2007-02-22 04:57:31 +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_AVE_SPATIAL_H
|
|
|
|
#define FIX_AVE_SPATIAL_H
|
|
|
|
|
|
|
|
#include "stdio.h"
|
|
|
|
#include "fix.h"
|
|
|
|
|
|
|
|
namespace LAMMPS_NS {
|
|
|
|
|
|
|
|
class FixAveSpatial : public Fix {
|
|
|
|
public:
|
|
|
|
FixAveSpatial(class LAMMPS *, int, char **);
|
|
|
|
~FixAveSpatial();
|
|
|
|
int setmask();
|
|
|
|
void init();
|
|
|
|
void end_of_step();
|
2007-10-15 23:07:04 +08:00
|
|
|
double compute_vector(int);
|
2007-02-22 04:57:31 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
int me;
|
2007-10-04 00:22:30 +08:00
|
|
|
int nrepeat,nfreq,irepeat,nvalid;
|
2007-02-22 04:57:31 +08:00
|
|
|
int dim,originflag,which,normflag;
|
|
|
|
double origin,delta;
|
2007-10-04 00:22:30 +08:00
|
|
|
char *id_compute,*id_fix;
|
2007-02-22 04:57:31 +08:00
|
|
|
FILE *fp;
|
|
|
|
|
2007-10-04 00:22:30 +08:00
|
|
|
int nlayers,nvalues,maxlayer,scaleflag,size_peratom;
|
2007-02-22 04:57:31 +08:00
|
|
|
double xscale,yscale,zscale;
|
|
|
|
double layer_volume;
|
|
|
|
double *coord;
|
|
|
|
double *count_one,*count_many,*count_total;
|
|
|
|
double **values_one,**values_many,**values_total;
|
|
|
|
double offset,invdelta;
|
2007-10-04 00:22:30 +08:00
|
|
|
int ncompute;
|
|
|
|
class Compute **compute;
|
|
|
|
class Fix *fix;
|
2007-02-22 04:57:31 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|