Commit 227f28c3 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1372 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 603894b8
Loading
Loading
Loading
Loading
+94 −195
Original line number Diff line number Diff line
@@ -71,28 +71,29 @@ PairLJCutCoulLongTIP4P::~PairLJCutCoulLongTIP4P()
void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
{
  int i,j,ii,jj,inum,jnum,itype,jtype,itable;
  int n,vlist[6];
  int iH1,iH2,jH1,jH2;
  double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
  double fraction,table;
  double delx1,dely1,delz1,delx2,dely2,delz2,delx3,dely3,delz3;
  double r,r2inv,r6inv,forcecoul,forcelj,cforce,negforce;
  double factor_coul,factor_lj;
  double grij,expm2,prefactor,t,erfc;
  int iH1,iH2,jH1,jH2;
  double xiM[3],xjM[3];
  double xiM[3],xjM[3],fO[3],fH[3],v[6];
  double *x1,*x2;
  double fO[3],fH[3]; 
  int *ilist,*jlist,*numneigh,**firstneigh;
  float rsq;
  int *int_rsq = (int *) &rsq;

  evdwl = ecoul = 0.0;
  if (eflag || vflag) ev_setup(eflag,vflag);
  else evflag = vflag_fdotr = 0;
  // if vflag_global = 2, reset vflag as if vflag_global = 1
  // necessary since TIP4P cannot compute virial as F dot r
  // due to find_M() finding bonded H atoms which are not near O atom
  
  // error check (for now)
  if (vflag % 4 == 2) vflag = 1 + vflag/4 * 4;

  if (eflag_atom || vflag_atom)
    error->all("Pair style lj/cut/coul/long/tip4p does not yet support peratom energy/virial");
  evdwl = ecoul = 0.0;
  if (eflag || vflag) ev_setup(eflag,vflag);
  else evflag = 0;

  double **f = atom->f;
  double **x = atom->x;
@@ -105,23 +106,6 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
  int newton_pair = force->newton_pair;
  double qqrd2e = force->qqrd2e;

  // grow and zero temporary force array if necessary

  if (vflag && atom->nmax > nmax) {
    memory->destroy_2d_double_array(ftmp);
    nmax = atom->nmax;
    ftmp = memory->create_2d_double_array(nmax,3,"pair:ftmp");
  }

  if (vflag) {
    for (i = 0; i < 6; i++) virialtmp[i] = 0.0;
    for (i = 0; i < nall; i++) {
      ftmp[i][0] = 0.0;
      ftmp[i][1] = 0.0;
      ftmp[i][2] = 0.0;
    }
  }

  inum = list->inum;
  ilist = list->ilist;
  numneigh = list->numneigh;
@@ -179,9 +163,12 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	    evdwl = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]) -
	      offset[itype][jtype];
	    evdwl *= factor_lj;
	  }
	  } else evdwl = 0.0;

	  if (evflag) ev_tally(i,j,nlocal,newton_pair,
			       evdwl,0.0,forcelj,delx,dely,delz);
	}

	// adjust rsq for off-site O charge(s)

	if (itype == typeO || jtype == typeO) { 
@@ -227,27 +214,25 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	  cforce = forcecoul * r2inv;

	  // if i,j are not O atoms, force is applied directly
	  // if i or j are O atoms, force is on fictitious atoms
	  // spread force to all 3 atoms in water molecule
	  // if i or j are O atoms, force is on fictitious atom
	  //   and is thus spread to all 3 atoms in water molecule
	  // formulas due to Feenstra et al, J Comp Chem, 20, 786 (1999)

	  n = 0;

	  if (itype != typeO) {
	    if (vflag == 0) {
	    f[i][0] += delx * cforce;
	    f[i][1] += dely * cforce;
	    f[i][2] += delz * cforce;

	    } else {
	      ftmp[i][0] += delx * cforce;
	      ftmp[i][1] += dely * cforce;
	      ftmp[i][2] += delz * cforce;

	      virialtmp[0] += 0.5 * delx * delx * cforce;
	      virialtmp[1] += 0.5 * dely * dely * cforce;
	      virialtmp[2] += 0.5 * delz * delz * cforce;
	      virialtmp[3] += 0.5 * dely * delx * cforce;
	      virialtmp[4] += 0.5 * delz * delx * cforce;
	      virialtmp[5] += 0.5 * delz * dely * cforce;
	    if (vflag) {
	      v[0] = 0.5 * delx * delx * cforce;
	      v[1] = 0.5 * dely * dely * cforce;
	      v[2] = 0.5 * delz * delz * cforce;
	      v[3] = 0.5 * delx * dely * cforce;
	      v[4] = 0.5 * delx * delz * cforce;
	      v[5] = 0.5 * dely * delz * cforce;
	      vlist[n++] = i;
	    }

	  } else {
@@ -259,7 +244,6 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	    fH[1] = alpha * (dely*cforce);
	    fH[2] = alpha * (delz*cforce);

	    if (vflag == 0) {
	    f[i][0] += fO[0];
	    f[i][1] += fO[1];
	    f[i][2] += fO[2];
@@ -272,19 +256,7 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	    f[iH2][1] += fH[1];
	    f[iH2][2] += fH[2];

	    } else {
	      ftmp[i][0] += fO[0];
	      ftmp[i][1] += fO[1];
	      ftmp[i][2] += fO[2];

	      ftmp[iH1][0] += fH[0];
	      ftmp[iH1][1] += fH[1];
	      ftmp[iH1][2] += fH[2];
	       
	      ftmp[iH2][0] += fH[0];
	      ftmp[iH2][1] += fH[1];
	      ftmp[iH2][2] += fH[2];

	    if (vflag) {
	      delx1 = x[i][0] - x2[0];
	      dely1 = x[i][1] - x2[1];
	      delz1 = x[i][2] - x2[2];
@@ -300,32 +272,33 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	      delz3 = x[iH2][2] - x2[2];
	      domain->minimum_image(delx3,dely3,delz3);

	      virialtmp[0] += 0.5 * (delx1 * fO[0] + (delx2 + delx3) * fH[0]);
	      virialtmp[1] += 0.5 * (dely1 * fO[1] + (dely2 + dely3) * fH[1]);
	      virialtmp[2] += 0.5 * (delz1 * fO[2] + (delz2 + delz3) * fH[2]);
	      virialtmp[3] += 0.5 * (dely1 * fO[0] + (dely2 + dely3) * fH[0]);
	      virialtmp[4] += 0.5 * (delz1 * fO[0] + (delz2 + delz3) * fH[0]);
	      virialtmp[5] += 0.5 * (delz1 * fO[1] + (delz2 + delz3) * fH[1]);
	      v[0] = 0.5 * (delx1 * fO[0] + (delx2 + delx3) * fH[0]);
	      v[1] = 0.5 * (dely1 * fO[1] + (dely2 + dely3) * fH[1]);
	      v[2] = 0.5 * (delz1 * fO[2] + (delz2 + delz3) * fH[2]);
	      v[3] = 0.5 * (dely1 * fO[0] + (dely2 + dely3) * fH[0]);
	      v[4] = 0.5 * (delz1 * fO[0] + (delz2 + delz3) * fH[0]);
	      v[5] = 0.5 * (delz1 * fO[1] + (delz2 + delz3) * fH[1]);

	      vlist[n++] = i;
	      vlist[n++] = iH1;
	      vlist[n++] = iH2;
	    }
	  }

	  if (jtype != typeO) {
	    if (vflag == 0) {
	    f[j][0] -= delx * cforce;
	    f[j][1] -= dely * cforce;
	    f[j][2] -= delz * cforce;

	    } else {
	      ftmp[j][0] -= delx * cforce;
	      ftmp[j][1] -= dely * cforce;
	      ftmp[j][2] -= delz * cforce;

	      virialtmp[0] += 0.5 * delx * delx * cforce;
	      virialtmp[1] += 0.5 * dely * dely * cforce;
	      virialtmp[2] += 0.5 * delz * delz * cforce;
	      virialtmp[3] += 0.5 * dely * delx * cforce;
	      virialtmp[4] += 0.5 * delz * delx * cforce;
	      virialtmp[5] += 0.5 * delz * dely * cforce;
	    if (vflag) {
	      v[0] += 0.5 * delx * delx * cforce;
	      v[1] += 0.5 * dely * dely * cforce;
	      v[2] += 0.5 * delz * delz * cforce;
	      v[3] += 0.5 * delx * dely * cforce;
	      v[4] += 0.5 * delx * delz * cforce;
	      v[5] += 0.5 * dely * delz * cforce;

	      vlist[n++] = j;
	    }

	  } else {
@@ -339,7 +312,6 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	    fH[1] = alpha * (dely*negforce);
	    fH[2] = alpha * (delz*negforce);

	    if (vflag != 2) {
	    f[j][0] += fO[0]; 
	    f[j][1] += fO[1]; 
	    f[j][2] += fO[2]; 
@@ -352,19 +324,7 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	    f[jH2][1] += fH[1];
	    f[jH2][2] += fH[2];

	    } else {
	      ftmp[j][0] += fO[0];
	      ftmp[j][1] += fO[1];
	      ftmp[j][2] += fO[2];

	      ftmp[jH1][0] += fH[0];
	      ftmp[jH1][1] += fH[1];
	      ftmp[jH1][2] += fH[2];
	      
	      ftmp[jH2][0] += fH[0];
	      ftmp[jH2][1] += fH[1];
	      ftmp[jH2][2] += fH[2];

	    if (vflag) {
	      delx1 = x[j][0] - x1[0];
	      dely1 = x[j][1] - x1[1];
	      delz1 = x[j][2] - x1[2];
@@ -380,12 +340,16 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	      delz3 = x[jH2][2] - x1[2];
	      domain->minimum_image(delx3,dely3,delz3);

	      virialtmp[0] += 0.5 * (delx1 * fO[0] + (delx2 + delx3) * fH[0]);
	      virialtmp[1] += 0.5 * (dely1 * fO[1] + (dely2 + dely3) * fH[1]);
	      virialtmp[2] += 0.5 * (delz1 * fO[2] + (delz2 + delz3) * fH[2]);
	      virialtmp[3] += 0.5 * (dely1 * fO[0] + (dely2 + dely3) * fH[0]);
	      virialtmp[4] += 0.5 * (delz1 * fO[0] + (delz2 + delz3) * fH[0]);
	      virialtmp[5] += 0.5 * (delz1 * fO[1] + (delz2 + delz3) * fH[1]);
	      v[0] += 0.5 * (delx1 * fO[0] + (delx2 + delx3) * fH[0]);
	      v[1] += 0.5 * (dely1 * fO[1] + (dely2 + dely3) * fH[1]);
	      v[2] += 0.5 * (delz1 * fO[2] + (delz2 + delz3) * fH[2]);
	      v[3] += 0.5 * (dely1 * fO[0] + (dely2 + dely3) * fH[0]);
	      v[4] += 0.5 * (delz1 * fO[0] + (delz2 + delz3) * fH[0]);
	      v[5] += 0.5 * (delz1 * fO[1] + (delz2 + delz3) * fH[1]);

	      vlist[n++] = j;
	      vlist[n++] = jH1;
	      vlist[n++] = jH2;
	    }
	  }

@@ -397,22 +361,11 @@ void PairLJCutCoulLongTIP4P::compute(int eflag, int vflag)
	      ecoul = qtmp*q[j] * table;
	    }
	    if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor;
	  }
	  } else ecoul = 0.0;

	if (evflag) ev_tally(i,j,nlocal,newton_pair,
			     evdwl,ecoul,fpair,delx,dely,delz);
      }
	  if (evflag) ev_tally_list(n,vlist,ecoul,v);
	}
      }

  if (vflag_fdotr) {
    virial_compute();
    for (int i = 0; i < 6; i++) virial[i] += virialtmp[i];
    for (int i = 0; i < nall; i++) {
      f[i][0] += ftmp[i][0];
      f[i][1] += ftmp[i][1];
      f[i][2] += ftmp[i][2];
    }
  }
}
@@ -459,68 +412,14 @@ void PairLJCutCoulLongTIP4P::init_style()
    error->all("Pair style lj/cut/coul/long/tip4p requires newton pair on");
  if (!atom->q_flag)
    error->all("Pair style lj/cut/coul/long/tip4p requires atom attribute q");

  // request regular or rRESPA neighbor lists

  int irequest;

  if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) {
    int respa = 0;
    if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
    if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;

    if (respa == 0) irequest = neighbor->request(this);
    else if (respa == 1) {
      irequest = neighbor->request(this);
      neighbor->requests[irequest]->id = 1;
      neighbor->requests[irequest]->half = 0;
      neighbor->requests[irequest]->respainner = 1;
      irequest = neighbor->request(this);
      neighbor->requests[irequest]->id = 3;
      neighbor->requests[irequest]->half = 0;
      neighbor->requests[irequest]->respaouter = 1;
    } else {
      irequest = neighbor->request(this);
      neighbor->requests[irequest]->id = 1;
      neighbor->requests[irequest]->half = 0;
      neighbor->requests[irequest]->respainner = 1;
      irequest = neighbor->request(this);
      neighbor->requests[irequest]->id = 2;
      neighbor->requests[irequest]->half = 0;
      neighbor->requests[irequest]->respamiddle = 1;
      irequest = neighbor->request(this);
      neighbor->requests[irequest]->id = 3;
      neighbor->requests[irequest]->half = 0;
      neighbor->requests[irequest]->respaouter = 1;
    }

  } else irequest = neighbor->request(this);

  cut_coulsq = cut_coul * cut_coul;

  // set & error check interior rRESPA cutoffs

  if (strcmp(update->integrate_style,"respa") == 0) {
    if (((Respa *) update->integrate)->level_inner >= 0) {
      cut_respa = ((Respa *) update->integrate)->cutoff;
      for (i = 1; i <= atom->ntypes; i++)
	for (j = i; j <= atom->ntypes; j++)
	  if (MIN(cut_lj[i][j],cut_coul) < cut_respa[3])
	    error->all("Pair cutoff < Respa interior cutoff");
    }
  } else cut_respa = NULL;

  // insure use of correct KSpace long-range solver, set g_ewald

  if (force->kspace == NULL) 
  if (strcmp(force->kspace_style,"pppm/tip4p") != 0)
    error->all("Pair style is incompatible with KSpace style");
  if (strcmp(force->kspace_style,"pppm/tip4p") == 0)
    g_ewald = force->kspace->g_ewald;
  else error->all("Pair style is incompatible with KSpace style");

  // setup force tables
  if (force->bond == NULL)
    error->all("Must use a bond style with TIP4P potential");
  if (force->angle == NULL)
    error->all("Must use an angle style with TIP4P potential");

  if (ncoultablebits) init_tables();
  PairLJCutCoulLong::init_style();

  // set alpha parameter

+403 −264

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -82,9 +82,9 @@ class PairAIREBO : public Pair {
  void FLJ(int, int);
  void TORSION(int, int);

  double bondorder(int, int, double *, double, double, double **);
  double bondorder(int, int, double *, double, double, double **, int);
  double bondorderLJ(int, int, double *, double, double,
		     double *, double, double **);
		     double *, double, double **, int);

  double Sp(double, double, double, double &);
  double Sp2(double, double, double, double &);
+1 −1
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ void PairTersoff::compute(int eflag, int vflag)
	f[k][1] += fk[1];
	f[k][2] += fk[2];

	if (evflag) ev_tally3(i,j,k,0.0,0.0,fj,fk,delr1,delr2);
	if (vflag_atom) v_tally3(i,j,k,fj,fk,delr1,delr2);
      }
    }
  }
+53 −95
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ PairMEAM::PairMEAM(LAMMPS *lmp) : Pair(lmp)
  rho = rho0 = rho1 = rho2 = rho3 = frhop = NULL;
  gamma = dgamma1 = dgamma2 = dgamma3 = arho2b = NULL;
  arho1 = arho2 = arho3 = arho3b = t_ave = NULL;
  strssa = NULL;

  maxneigh = 0;
  scrfcn = dscrfcn = fcpair = NULL;
@@ -96,8 +95,6 @@ PairMEAM::~PairMEAM()
  memory->destroy_2d_double_array(arho3b);
  memory->destroy_2d_double_array(t_ave);

  memory->destroy_3d_double_array(strssa);

  memory->sfree(scrfcn);
  memory->sfree(dscrfcn);
  memory->sfree(fcpair);
@@ -127,11 +124,6 @@ void PairMEAM::compute(int eflag, int vflag)
  if (eflag || vflag) ev_setup(eflag,vflag);
  else evflag = vflag_fdotr = 0;

  // error check (for now)

  if (eflag_atom || vflag_atom)
    error->all("Pair style meam does not yet support peratom energy/virial");

  int newton_pair = force->newton_pair;

  // grow local arrays if necessary
@@ -153,7 +145,6 @@ void PairMEAM::compute(int eflag, int vflag)
    memory->destroy_2d_double_array(arho3);
    memory->destroy_2d_double_array(arho3b);
    memory->destroy_2d_double_array(t_ave);
    memory->destroy_3d_double_array(strssa);

    nmax = atom->nmax;

@@ -173,7 +164,6 @@ void PairMEAM::compute(int eflag, int vflag)
    arho3 = memory->create_2d_double_array(nmax,10,"pair:arho3");
    arho3b = memory->create_2d_double_array(nmax,3,"pair:arho3b");
    t_ave = memory->create_2d_double_array(nmax,3,"pair:t_ave");
    strssa = memory->create_3d_double_array(nmax,3,3,"pair:strssa");
  }

  // neighbor list info
@@ -238,7 +228,7 @@ void PairMEAM::compute(int eflag, int vflag)
  for (ii = 0; ii < inum_half; ii++) {
    i = ilist_half[ii];
    ifort = i+1;
    meam_dens_init_(&ifort,&nmax,&eflag,&evdwl,&ntype,type,fmap,&x[0][0],
    meam_dens_init_(&ifort,&nmax,&ntype,type,fmap,&x[0][0],
		    &numneigh_half[i],firstneigh_half[i],
		    &numneigh_full[i],firstneigh_full[i],
		    &scrfcn[offset],&dscrfcn[offset],&fcpair[offset],
@@ -252,10 +242,10 @@ void PairMEAM::compute(int eflag, int vflag)
    offset += numneigh_half[i];
  }

  reverse_flag = 0;
  comm->reverse_comm_pair(this);

  meam_dens_final_(&nlocal,&nmax,&eflag,&evdwl,&ntype,type,fmap,
  meam_dens_final_(&nlocal,&nmax,&eflag_either,&eflag_global,&eflag_atom,
		   &eng_vdwl,eatom,&ntype,type,fmap,
		   &arho1[0][0],&arho2[0][0],arho2b,&arho3[0][0],
		   &arho3b[0][0],&t_ave[0][0],gamma,dgamma1,
		   dgamma2,dgamma3,rho,rho0,rho1,rho2,rho3,frhop,&errorflag);
@@ -269,16 +259,24 @@ void PairMEAM::compute(int eflag, int vflag)

  offset = 0;

  // vptr is first value in vatom if it will be used by meam_force()
  // else vatom may not exist, so pass dummy ptr

  double *vptr;
  if (vflag_atom) vptr = &vatom[0][0];
  else vptr = &cutmax;

  for (ii = 0; ii < inum_half; ii++) {
    i = ilist_half[ii];
    ifort = i+1;
    meam_force_(&ifort,&nmax,&eflag,&evdwl,&ntype,type,fmap,&x[0][0],
    meam_force_(&ifort,&nmax,&eflag_either,&eflag_global,&eflag_atom,
		&vflag_atom,&eng_vdwl,eatom,&ntype,type,fmap,&x[0][0],
		&numneigh_half[i],firstneigh_half[i],
		&numneigh_full[i],firstneigh_full[i],
		&scrfcn[offset],&dscrfcn[offset],&fcpair[offset],
		dgamma1,dgamma2,dgamma3,rho0,rho1,rho2,rho3,frhop,
		&arho1[0][0],&arho2[0][0],arho2b,&arho3[0][0],&arho3b[0][0],
		&t_ave[0][0],&f[0][0],&strssa[0][0][0],&errorflag);
		&t_ave[0][0],&f[0][0],vptr,&errorflag);
    if (errorflag) {
      char str[128];
      sprintf(str,"MEAM library error %d",errorflag);
@@ -287,17 +285,11 @@ void PairMEAM::compute(int eflag, int vflag)
    offset += numneigh_half[i];
  }

  reverse_flag = 1;
  comm->reverse_comm_pair(this);

  // change neighbor list indices back to C indexing

  neigh_f2c(inum_half,ilist_half,numneigh_half,firstneigh_half);
  neigh_f2c(inum_half,ilist_half,numneigh_full,firstneigh_full);

  // just sum global energy (for now)

  if (evflag) ev_tally(0,0,nlocal,newton_pair,evdwl,0.0,0.0,0.0,0.0,0.0);
  if (vflag_fdotr) virial_compute();
}

@@ -811,7 +803,6 @@ int PairMEAM::pack_reverse_comm(int n, int first, double *buf)

  m = 0;
  last = first + n;
  if (reverse_flag == 0) {
  for (i = first; i < last; i++) {
    buf[m++] = rho0[i];
    buf[m++] = arho2b[i];
@@ -832,24 +823,8 @@ int PairMEAM::pack_reverse_comm(int n, int first, double *buf)
    buf[m++] = t_ave[i][1];
    buf[m++] = t_ave[i][2];
  }
    size = 27;

  } else {
    for (i = first; i < last; i++) {
      buf[m++] = strssa[i][0][0];
      buf[m++] = strssa[i][0][1];
      buf[m++] = strssa[i][0][2];
      buf[m++] = strssa[i][1][0];
      buf[m++] = strssa[i][1][1];
      buf[m++] = strssa[i][1][2];
      buf[m++] = strssa[i][2][0];
      buf[m++] = strssa[i][2][1];
      buf[m++] = strssa[i][2][2];
    }
    size = 9;
  }

  return size;
  return m;
}

/* ---------------------------------------------------------------------- */
@@ -859,7 +834,6 @@ void PairMEAM::unpack_reverse_comm(int n, int *list, double *buf)
  int i,j,k,m;

  m = 0;
  if (reverse_flag == 0) {
  for (i = 0; i < n; i++) {
    j = list[i];
    rho0[j] += buf[m++];
@@ -881,21 +855,6 @@ void PairMEAM::unpack_reverse_comm(int n, int *list, double *buf)
    t_ave[j][1] += buf[m++];
    t_ave[j][2] += buf[m++];
  }

  } else {
    for (i = 0; i < n; i++) {
      j = list[i];
      strssa[j][0][0] += buf[m++];
      strssa[j][0][1] += buf[m++];
      strssa[j][0][2] += buf[m++];
      strssa[j][1][0] += buf[m++];
      strssa[j][1][1] += buf[m++];
      strssa[j][1][2] += buf[m++];
      strssa[j][2][0] += buf[m++];
      strssa[j][2][1] += buf[m++];
      strssa[j][2][2] += buf[m++];
    }
  }
}

/* ----------------------------------------------------------------------
@@ -906,7 +865,6 @@ double PairMEAM::memory_usage()
{
  double bytes = 11 * nmax * sizeof(double);
  bytes += (3 + 6 + 10 + 3 + 3) * nmax * sizeof(double);
  bytes += 3*3 * nmax * sizeof(double);
  bytes += 3 * maxneigh * sizeof(double);
  return bytes;
}
Loading