git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@952 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2007-10-04 19:21:45 +00:00
parent aef3f32236
commit 7d398e213b
10 changed files with 63 additions and 42 deletions

View File

@ -890,9 +890,9 @@ void PairMEAM::unpack_reverse_comm(int n, int *list, double *buf)
memory usage of local atom-based arrays
------------------------------------------------------------------------- */
int PairMEAM::memory_usage()
double PairMEAM::memory_usage()
{
int bytes = 7 * nmax * sizeof(double);
double bytes = 7 * nmax * sizeof(double);
bytes += (3 + 6 + 10 + 3 + 3) * nmax * sizeof(double);
bytes += 3*3 * nmax * sizeof(double);
bytes += 2 * maxneigh * sizeof(double);

View File

@ -64,7 +64,7 @@ class PairMEAM : public Pair {
void unpack_comm(int, int, double *);
int pack_reverse_comm(int, int, double *);
void unpack_reverse_comm(int, int *, double *);
int memory_usage();
double memory_usage();
private:
double cutmax; // max cutoff for all elements

View File

@ -1540,10 +1540,10 @@ void FixPOEMS::copy_arrays(int i, int j)
memory usage of local atom-based arrays
------------------------------------------------------------------------- */
int FixPOEMS::memory_usage()
double FixPOEMS::memory_usage()
{
int nmax = atom->nmax;
int bytes = nmax * sizeof(int);
int double = nmax * sizeof(int);
bytes += nmax*MAXBODY * sizeof(int);
bytes += nmax*3 * sizeof(double);
return bytes;

View File

@ -34,9 +34,9 @@ class FixPOEMS : public Fix {
void grow_arrays(int);
void copy_arrays(int, int);
int memory_usage();
int pack_exchange(int, double *);
int unpack_exchange(int, double *);
double memory_usage();
void pre_neighbor();
int dof(int);

View File

@ -378,8 +378,8 @@ void ComputeAcklandAtom::select2(int k, int n, double *arr, int *iarr)
memory usage of local atom-based array
------------------------------------------------------------------------- */
int ComputeAcklandAtom::memory_usage()
double ComputeAcklandAtom::memory_usage()
{
int bytes = nmax * sizeof(double);
double bytes = nmax * sizeof(double);
return bytes;
}

View File

@ -24,7 +24,7 @@ class ComputeAcklandAtom : public Compute {
~ComputeAcklandAtom();
void init();
void compute_peratom();
int memory_usage();
double memory_usage();
private:
int nmax,maxneigh;

View File

@ -87,6 +87,30 @@ void PairHybrid::compute(int eflag, int vflag)
if (vflag == 2) virial_compute();
}
/* ---------------------------------------------------------------------- */
void PairHybrid::compute_inner()
{
for (int m = 0; m < nstyles; m++)
if (styles[m]->respa_enable) styles[m]->compute_inner();
}
/* ---------------------------------------------------------------------- */
void PairHybrid::compute_middle()
{
for (int m = 0; m < nstyles; m++)
if (styles[m]->respa_enable) styles[m]->compute_middle();
}
/* ---------------------------------------------------------------------- */
void PairHybrid::compute_outer(int eflag, int vflag)
{
for (int m = 0; m < nstyles; m++)
if (styles[m]->respa_enable) styles[m]->compute_outer(eflag,vflag);
}
/* ----------------------------------------------------------------------
allocate all arrays
------------------------------------------------------------------------- */
@ -187,9 +211,12 @@ void PairHybrid::settings(int narg, char **arg)
}
// single_enable = 0 if any sub-style = 0
// respa_enable = 1 if any sub-style is set
for (m = 0; m < nstyles; m++)
if (styles[m] && styles[m]->single_enable == 0) single_enable = 0;
if (styles[m]->single_enable == 0) single_enable = 0;
for (m = 0; m < nstyles; m++)
if (styles[m]->respa_enable) respa_enable = 1;
}
/* ----------------------------------------------------------------------
@ -380,8 +407,8 @@ double PairHybrid::init_one(int i, int j)
// call init/mixing for all sub-styles of I,J
// set cutsq in sub-style just as pair::init_one() does
// sum tail corrections for I,J
// compute max cutoff
// if sub-style = none, cutmax of 0.0 will be returned
// return max cutoff of all sub-styles assigned to I,J
// if no sub-styles assigned to I,J (pair_coeff none), cutmax = 0.0 returned
double cutmax = 0.0;
if (tail_flag) etail_ij = ptail_ij = 0.0;

View File

@ -38,6 +38,10 @@ class PairHybrid : public Pair {
void single_embed(int, int, double &);
void modify_params(int narg, char **arg);
double memory_usage();
void compute_inner();
void compute_middle();
void compute_outer(int, int);
void *extract(char *);
protected:

View File

@ -0,0 +1,20 @@
/* ----------------------------------------------------------------------
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.
------------------------------------------------------------------------- */
#ifdef ComputeInclude
#include "compute_ackland_atom.h"
#endif
#ifdef ComputeClass
ComputeStyle(ackland/atom,ComputeAcklandAtom)
#endif

View File

@ -1,30 +0,0 @@
/* ----------------------------------------------------------------------
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.
------------------------------------------------------------------------- */
#ifdef KSpaceInclude
#include "ewald_n.h"
#endif
#ifdef KSpaceClass
KSpaceStyle(ewald/n,EwaldN)
#endif
#ifdef PairInclude
#include "pair_buck_coul.h"
#include "pair_lj_coul.h"
#endif
#ifdef PairClass
PairStyle(buck/coul,PairBuckCoul)
PairStyle(lj/coul,PairLJCoul)
#endif