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

This commit is contained in:
sjplimp 2011-04-18 22:16:24 +00:00
parent 8cd382fef6
commit 2f7aaf73f4
6 changed files with 21 additions and 1365 deletions

View File

@ -5,7 +5,6 @@
if (test $1 = 1) then
cp atom_vec_ellipsoid.cpp ..
cp compute_erotate_asphere.cpp ..
cp compute_temp_asphere.cpp ..
cp fix_nh_asphere.cpp ..
@ -16,7 +15,6 @@ if (test $1 = 1) then
cp pair_gayberne.cpp ..
cp pair_resquared.cpp ..
cp atom_vec_ellipsoid.h ..
cp compute_erotate_asphere.h ..
cp compute_temp_asphere.h ..
cp fix_nh_asphere.h ..
@ -33,7 +31,6 @@ if (test $1 = 1) then
elif (test $1 = 0) then
rm ../atom_vec_ellipsoid.cpp
rm ../compute_erotate_asphere.cpp
rm ../compute_temp_asphere.cpp
rm ../fix_nh_asphere.cpp
@ -44,7 +41,6 @@ elif (test $1 = 0) then
rm ../pair_gayberne.cpp
rm ../pair_resquared.cpp
rm ../atom_vec_ellipsoid.h
rm ../compute_erotate_asphere.h
rm ../compute_temp_asphere.h
rm ../fix_nh_asphere.h

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +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 ATOM_CLASS
AtomStyle(ellipsoid,AtomVecEllipsoid)
#else
#ifndef LMP_ATOM_VEC_ELLIPSOID_H
#define LMP_ATOM_VEC_ELLIPSOID_H
#include "atom_vec.h"
namespace LAMMPS_NS {
class AtomVecEllipsoid : public AtomVec {
public:
struct Bonus {
double shape[3];
double quat[4];
int ilocal;
};
struct Bonus *bonus;
AtomVecEllipsoid(class LAMMPS *, int, char **);
~AtomVecEllipsoid();
void grow(int);
void grow_reset();
void copy(int, int, int);
int pack_comm(int, int *, double *, int, int *);
int pack_comm_vel(int, int *, double *, int, int *);
int pack_comm_hybrid(int, int *, double *);
void unpack_comm(int, int, double *);
void unpack_comm_vel(int, int, double *);
int unpack_comm_hybrid(int, int, double *);
int pack_reverse(int, int, double *);
int pack_reverse_hybrid(int, int, double *);
void unpack_reverse(int, int *, double *);
int unpack_reverse_hybrid(int, int *, double *);
int pack_border(int, int *, double *, int, int *);
int pack_border_vel(int, int *, double *, int, int *);
int pack_border_hybrid(int, int *, double *);
void unpack_border(int, int, double *);
void unpack_border_vel(int, int, double *);
int unpack_border_hybrid(int, int, double *);
int pack_exchange(int, double *);
int unpack_exchange(double *);
int size_restart();
int pack_restart(int, double *);
int unpack_restart(double *);
void create_atom(int, double *);
void data_atom(double *, int, char **);
int data_atom_hybrid(int, char **);
void data_vel(int, char **);
int data_vel_hybrid(int, char **);
bigint memory_usage();
// manipulate Bonus data structure for extra atom info
void grow_bonus();
void copy_bonus(int, int);
void set_bonus(int, double, double, double);
void clear_bonus();
void data_atom_bonus(int, char **);
private:
double PI;
int *tag,*type,*mask,*image;
double **x,**v,**f;
double *rmass;
double **angmom,**torque;
int *ellipsoid;
int nlocal_bonus,nghost_bonus,nmax_bonus;
};
}
#endif
#endif

View File

@ -16,6 +16,7 @@
------------------------------------------------------------------------- */
#include "mpi.h"
#include "string.h"
#include "compute_temp_asphere.h"
#include "math_extra.h"
#include "atom.h"

View File

@ -545,7 +545,8 @@ double PairGayBerne::gayberne_analytic(const int i,const int j,double a1[3][3],
double g12[3][3];
MathExtra::plus3(g1,g2,g12);
double kappa[3];
MathExtra::mldivide3(g12,r12,kappa,error);
int ierror = MathExtra::mldivide3(g12,r12,kappa);
if (error) error->all("Bad matrix inversion in mldivide3");
// tempv = G12^-1*r12hat
@ -575,7 +576,8 @@ double PairGayBerne::gayberne_analytic(const int i,const int j,double a1[3][3],
double b12[3][3];
double iota[3];
MathExtra::plus3(b1,b2,b12);
MathExtra::mldivide3(b12,r12,iota,error);
ierror = MathExtra::mldivide3(b12,r12,iota);
if (error) error->all("Bad matrix inversion in mldivide3");
// tempv = G12^-1*r12hat
@ -724,7 +726,8 @@ double PairGayBerne::gayberne_lj(const int i,const int j,double a1[3][3],
g12[0][2] = g1[0][2]; g12[2][0] = g1[2][0];
g12[1][2] = g1[1][2]; g12[2][1] = g1[2][1];
double kappa[3];
MathExtra::mldivide3(g12,r12,kappa,error);
int ierror = MathExtra::mldivide3(g12,r12,kappa);
if (error) error->all("Bad matrix inversion in mldivide3");
// tempv = G12^-1*r12hat
@ -759,7 +762,8 @@ double PairGayBerne::gayberne_lj(const int i,const int j,double a1[3][3],
b12[0][1] = b1[0][1]; b12[1][0] = b1[1][0];
b12[0][2] = b1[0][2]; b12[2][0] = b1[2][0];
b12[1][2] = b1[1][2]; b12[2][1] = b1[2][1];
MathExtra::mldivide3(b12,r12,iota,error);
ierror = MathExtra::mldivide3(b12,r12,iota);
if (error) error->all("Bad matrix inversion in mldivide3");
// tempv = G12^-1*r12hat

View File

@ -612,7 +612,9 @@ double PairRESquared::resquared_analytic(const int i, const int j,
double temp[3][3];
MathExtra::plus3(wi.gamma,wj.gamma,temp);
MathExtra::mldivide3(temp,rhat,s,error);
int ierror = MathExtra::mldivide3(temp,rhat,s);
if (error) error->all("Bad matrix inversion in mldivide3");
sigma12 = 1.0/sqrt(0.5*MathExtra::dot3(s,rhat));
MathExtra::times_column3(wi.A,rhat,z1);
MathExtra::times_column3(wj.A,rhat,z2);
@ -642,7 +644,9 @@ double PairRESquared::resquared_analytic(const int i, const int j,
double temp2[3][3];
MathExtra::times3(wj.aTe,wj.A,temp2);
MathExtra::plus3(temp,temp2,temp);
MathExtra::mldivide3(temp,rhat,w,error);
ierror = MathExtra::mldivide3(temp,rhat,w);
if (error) error->all("Bad matrix inversion in mldivide3");
h12 = rnorm-sigma12;
eta = lambda/nu;
chi = 2.0*MathExtra::dot3(rhat,w);
@ -894,14 +898,18 @@ double PairRESquared::resquared_lj(const int i, const int j,
// energy
MathExtra::mldivide3(gamma,rhat,s,error);
int ierror = MathExtra::mldivide3(gamma,rhat,s);
if (error) error->all("Bad matrix inversion in mldivide3");
sigma12 = 1.0/sqrt(0.5*MathExtra::dot3(s,rhat));
double temp[3][3];
MathExtra::times3(wi.aTe,wi.A,temp);
temp[0][0] += 1.0;
temp[1][1] += 1.0;
temp[2][2] += 1.0;
MathExtra::mldivide3(temp,rhat,w,error);
ierror = MathExtra::mldivide3(temp,rhat,w);
if (error) error->all("Bad matrix inversion in mldivide3");
h12 = rnorm-sigma12;
chi = 2.0*MathExtra::dot3(rhat,w);
sigh = sigma[type[i]][type[j]]/h12;