ESPResSo 3.2.0-167-g2c9ead1-git
Extensible Simulation Package for Soft Matter Research
statistics_cluster.h
Go to the documentation of this file.
00001 /*
00002   Copyright (C) 2010,2012,2013 The ESPResSo project
00003   Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 
00004     Max-Planck-Institute for Polymer Research, Theory Group
00005   
00006   This file is part of ESPResSo.
00007   
00008   ESPResSo is free software: you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License as published by
00010   the Free Software Foundation, either version 3 of the License, or
00011   (at your option) any later version.
00012   
00013   ESPResSo is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016   GNU General Public License for more details.
00017   
00018   You should have received a copy of the GNU General Public License
00019   along with this program.  If not, see <http://www.gnu.org/licenses/>. 
00020 */
00021 #ifndef STATISTICS_CLUSTER_H
00022 #define STATISTICS_CLUSTER_H
00023 /** \file statistics_cluster.h
00024  *
00025  *  1: This file contains the necklace cluster algorithm. It can be used
00026  *  to identify the substructures 'pearls' and 'strings' on a linear
00027  *  chain.
00028  *
00029  *  2: mesh based cluster algorithm to identify hole spaces 
00030  *  (see thesis chapter 3 of H. Schmitz for details) 
00031  */
00032 
00033 #include "interaction_data.h"
00034 #include "particle_data.h"
00035 
00036 /** \name Data structures */
00037 /************************************************************/
00038 /*@{*/
00039 
00040 /** Structure for cluster element */
00041 struct StructClusterElement{  
00042     /** Element identity */
00043     int id;
00044     /** Pointer to next cluster element.*/
00045     struct StructClusterElement *next;
00046 };
00047 
00048 /** Cluster Element */
00049 typedef struct StructClusterElement ClusterElement;
00050 
00051 /** Structure for Cluster */
00052 struct StructCluster {  
00053     /** Cluster identity */
00054     int id;
00055     /** Cluster size */
00056     int size;
00057     /** Pointer to first cluster element.*/
00058     ClusterElement *first;
00059     /** Pointer to next cluster */
00060     struct StructCluster *next;
00061     /** Pointer to previous cluster */
00062     struct StructCluster *prev;
00063 };
00064 
00065 /** Cluster */
00066 typedef struct StructCluster Cluster;
00067 
00068 /*@}*/
00069 
00070 /** \name Variables */
00071 /************************************************************/
00072 /*@{*/
00073 
00074 /** NULL terminated linked list of elements of a cluster (indices in particle list) */
00075 extern ClusterElement *element;
00076 /** Double linked list of \ref statistics_cluster::Cluster */
00077 extern Cluster        *cluster;
00078 /** first cluster in list of \ref statistics_cluster::Cluster */
00079 extern Cluster        *first_cluster;
00080 /** last cluster in list of \ref statistics_cluster::Cluster */
00081 extern Cluster        *last_cluster;
00082 
00083 /** parameter of necklace cluster algorithm */
00084 extern int    backbone_distance;
00085 /** parameter of necklace cluster algorithm */
00086 extern double space_distance2;
00087 /** parameter of necklace cluster algorithm */
00088 extern int    pearl_treshold;
00089 
00090 /*@}*/
00091 
00092 void cluster_free();
00093 void create_free_volume_grid(IntList mesh, int dim[3], int probe_part_type);
00094 int analyze_necklace(Particle *part, int np);
00095 int cluster_free_volume_grid(IntList mesh, int dim[3], int ***holes);
00096 void cluster_free_volume_surface(IntList mesh, int dim[3], int nholes, int **holes, int *surface);
00097 
00098 #endif