SISCone  2.0.5
siscone/spherical/hash.h
00001 // -*- C++ -*-
00003 // File: hash.h                                                              //
00004 // Description: header file for classes hash_element and hash_cones          //
00005 // This file is part of the SISCone project.                                 //
00006 // WARNING: this is not the main SISCone trunk but                           //
00007 //          an adaptation to spherical coordinates                           //
00008 // For more details, see http://projects.hepforge.org/siscone                //
00009 //                                                                           //
00010 // Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez                          //
00011 //                                                                           //
00012 // This program is free software; you can redistribute it and/or modify      //
00013 // it under the terms of the GNU General Public License as published by      //
00014 // the Free Software Foundation; either version 2 of the License, or         //
00015 // (at your option) any later version.                                       //
00016 //                                                                           //
00017 // This program is distributed in the hope that it will be useful,           //
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of            //
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             //
00020 // GNU General Public License for more details.                              //
00021 //                                                                           //
00022 // You should have received a copy of the GNU General Public License         //
00023 // along with this program; if not, write to the Free Software               //
00024 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
00025 //                                                                           //
00026 // $Revision:: 294                                                          $//
00027 // $Date:: 2009-05-01 17:15:04 +0200 (Fri, 01 May 2009)                     $//
00029 
00030 #ifndef __SPH_HASH_H__
00031 #define __SPH_HASH_H__
00032 
00033 #include "momentum.h"
00034 
00035 namespace siscone_spherical{
00036 
00046 class sph_hash_element{
00047  public:
00048   CSph3vector centre;  
00049   bool is_stable;      
00050 
00051   sph_hash_element *next;  
00052 };
00053 
00061 class sph_hash_cones{
00062  public:
00065   sph_hash_cones(int _Np, double _radius);
00066 
00068   ~sph_hash_cones();
00069 
00079   int insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool c_io);
00080 
00088   int insert(CSphmomentum *v);
00089 
00091   sph_hash_element **hash_array;
00092 
00094   int n_cones;
00095 
00097 #ifdef DEBUG_STABLE_CONES
00098   int n_occupied_cells;
00099 #endif
00100 
00102   int mask;
00103 
00106   double R2;
00107 
00109   double tan2R;
00110 };
00111 
00112 }
00113 #endif
The SISCone project has been developed by Gavin Salam and Gregory Soyez
Documentation generated on Mon Jun 4 2012 18:23:38 for SISCone by  Doxygen 1.7.6.1