SPPARKS WWW Site - SPPARKS Documentation - SPPARKS Commands

diag_style cluster command

Syntax:

diag_style cluster keyword value keyword value ... 

Examples:

diag_style cluster
diag_style cluster stats no delt 1.0 filename cluster3d.a.0.1.dat dump opendx cluster3d.a.0.1.dump 

Description:

The cluster diagnostic computes a clustering analysis on all lattice sites in the system, identifying geometric groupings of identical spin values, e.g. a grain in a grain growth model. The total number of clusters is printed as stats output via the stats command.

Clustering uses a connectivity definition provided by the application (e.g. sites are adjacent and have same spin value) to identify the set of connected clusters.

The variants cluster, cluster2d, and cluster3d are used with applications based on lattice, lattice2d, and lattice3d, respectively.

The filename keyword allows an output file to be specified. Every time the cluster analysis is performed, the key properties of each cluster are appended to this file. The output format is:

Clustering Analysis for Lattice (diag_style cluster) nglobal = nprocs =

-------------------------------------------------- Time =

cluster_id is an arbitrary integer assigned uniquely to each cluster. It will be different for different numbers of processors.

ivalue is an application-specific integer associated with each cluster. For lattice applications, it is the spin value of all sites in the cluster dvalue is an application-specific double associated with each cluster. size is the numbers of sites in the cluster.

The dump keyword causes the cluster ID for each site to be printed out in snapshot format which can be used for visualization purposes. The cluster IDs are arbitrary integers such that two sites have the same ID if and only if they belong to the same cluster. The standard setting generates LAMMPS-style. For cluster2d and cluster3d styles only two values are printed for each site: site index and cluster ID. For the cluster style, three additional values are printed: the x, y, and z coordinate of the site (for 2d lattices, z=0). These files can be visualized with various tools in the LAMMPS package and the Pizza.py package.

The opendx keyword generates a set of files that can be read by the OpenDX script called aniso0.net to visualize the clusters in 3D. The filenames are composed of the input filename, followed by a sequential number, followed by '.dx'. Because the OpenDX format assumes a particular ordering of the sites, the opendx style can only be used with square and simple cubic lattices.

Restrictions:

This diagnostic can only be used for on-lattice applications.

Applications need to provide push_connected_neighbors() and connected_ghosts() functions which are called by this diagnostic. If they are not defined, SPPARKS will print an error message.

Related commands:

diag_style, stats

Default: none