Skip to content
Snippets Groups Projects
compute_voronoi_atom.h 2.6 KiB
Newer Older
sjplimp's avatar
 
sjplimp committed
/* -*- c++ -*- ----------------------------------------------------------
sjplimp's avatar
sjplimp committed
   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 COMPUTE_CLASS

ComputeStyle(voronoi/atom,ComputeVoronoi)

#else

#ifndef LMP_COMPUTE_VORONOI_H
#define LMP_COMPUTE_VORONOI_H

#include "compute.h"

namespace voro {
  class container;
  class container_poly;
  class voronoicell_neighbor;
}
sjplimp's avatar
sjplimp committed

namespace LAMMPS_NS {

class ComputeVoronoi : public Compute {
 public:
  ComputeVoronoi(class LAMMPS *, int, char **);
  ~ComputeVoronoi();
  void init();
  void compute_peratom();
sjplimp's avatar
 
sjplimp committed
  void compute_vector();
athomps's avatar
athomps committed
  void compute_local();
sjplimp's avatar
sjplimp committed
  double memory_usage();

sjplimp's avatar
 
sjplimp committed
  int pack_forward_comm(int, int *, double *, int, int *);
  void unpack_forward_comm(int, int, double *);
sjplimp's avatar
 
sjplimp committed

sjplimp's avatar
sjplimp committed
 private:
sjplimp's avatar
 
sjplimp committed
  voro::container *con_mono;
  voro::container_poly *con_poly;

  void buildCells();
  void checkOccupation();
  void loopCells();
sjplimp's avatar
 
sjplimp committed
  void processCell(voro::voronoicell_neighbor&, int);

  int nmax, rmax, maxedge, sgroupbit;
  char *radstr;
  double fthresh, ethresh;
sjplimp's avatar
sjplimp committed
  double **voro;
sjplimp's avatar
 
sjplimp committed
  double *edge, *sendvector, *rfield;
  enum { VOROSURF_NONE, VOROSURF_ALL, VOROSURF_GROUP } surface;
sjplimp's avatar
 
sjplimp committed
  bool onlyGroup, occupation;

sjplimp's avatar
 
sjplimp committed
  tagint *tags, oldmaxtag;
sjplimp's avatar
 
sjplimp committed
  int *occvec, *sendocc, *lroot, *lnext, lmax, oldnatoms, oldnall;
athomps's avatar
athomps committed
  int faces_flag, nfaces, nfacesmax;
  double **faces;
sjplimp's avatar
sjplimp committed
};

}

#endif
#endif

/* ERROR/WARNING messages:

E: Illegal ... command

Self-explanatory.  Check the input script syntax and compare to the
documentation for the command.  You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.

sjplimp's avatar
 
sjplimp committed
E: Could not find compute/voronoi surface group ID
sjplimp's avatar
 
sjplimp committed

sjplimp's avatar
 
sjplimp committed
Self-explanatory.
sjplimp's avatar
 
sjplimp committed

sjplimp's avatar
 
sjplimp committed
E: Illegal compute voronoi/atom command (occupation and (surface or edges))
sjplimp's avatar
 
sjplimp committed

sjplimp's avatar
 
sjplimp committed
Self-explanatory.

E: Compute voronoi/atom occupation requires an atom map, see atom_modify

UNDOCUMENTED

E: Compute voronoi/atom occupation requires atom IDs

UNDOCUMENTED

sjplimp's avatar
 
sjplimp committed
E: Variable name for voronoi radius does not exist

Self-explanatory.

E: Variable for voronoi radius is not atom style

Self-explanatory.

E: Voro++ error: narea and neigh have a different size

This error is returned by the Voro++ library.
sjplimp's avatar
 
sjplimp committed

sjplimp's avatar
sjplimp committed
*/