SISCone
2.0.6
siscone
spherical
hash.h
1
// -*- C++ -*-
3
// File: hash.h //
4
// Description: header file for classes hash_element and hash_cones //
5
// This file is part of the SISCone project. //
6
// WARNING: this is not the main SISCone trunk but //
7
// an adaptation to spherical coordinates //
8
// For more details, see http://projects.hepforge.org/siscone //
9
// //
10
// Copyright (c) 2006-2008 Gavin Salam and Gregory Soyez //
11
// //
12
// This program is free software; you can redistribute it and/or modify //
13
// it under the terms of the GNU General Public License as published by //
14
// the Free Software Foundation; either version 2 of the License, or //
15
// (at your option) any later version. //
16
// //
17
// This program is distributed in the hope that it will be useful, //
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
20
// GNU General Public License for more details. //
21
// //
22
// You should have received a copy of the GNU General Public License //
23
// along with this program; if not, write to the Free Software //
24
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
25
// //
26
// $Revision:: 294 $//
27
// $Date:: 2009-05-01 17:15:04 +0200 (Fri, 01 May 2009) $//
29
30
#ifndef __SPH_HASH_H__
31
#define __SPH_HASH_H__
32
33
#include "momentum.h"
34
35
namespace
siscone_spherical{
36
46
class
sph_hash_element
{
47
public
:
48
CSph3vector
centre
;
49
bool
is_stable
;
50
51
sph_hash_element
*
next
;
52
};
53
61
class
sph_hash_cones
{
62
public
:
65
sph_hash_cones
(
int
_Np,
double
_radius);
66
68
~sph_hash_cones
();
69
79
int
insert
(
CSphmomentum
*v,
CSphmomentum
*parent,
CSphmomentum
*child,
bool
p_io,
bool
c_io);
80
88
int
insert
(
CSphmomentum
*v);
89
91
sph_hash_element
**
hash_array
;
92
94
int
n_cones
;
95
97
#ifdef DEBUG_STABLE_CONES
98
int
n_occupied_cells;
99
#endif
100
102
int
mask
;
103
106
double
R2
;
107
109
double
tan2R
;
110
};
111
112
}
113
#endif
siscone_spherical::sph_hash_cones::sph_hash_cones
sph_hash_cones(int _Np, double _radius)
Definition:
hash.cpp:49
siscone_spherical::sph_hash_cones::tan2R
double tan2R
its squreed tangent
Definition:
hash.h:109
siscone_spherical::sph_hash_cones::hash_array
sph_hash_element ** hash_array
the cone data itself
Definition:
hash.h:91
siscone_spherical::sph_hash_cones::~sph_hash_cones
~sph_hash_cones()
destructor
Definition:
hash.cpp:80
siscone_spherical::sph_hash_element::next
sph_hash_element * next
pointer to the next element
Definition:
hash.h:51
siscone_spherical::sph_hash_element
Definition:
hash.h:46
siscone_spherical::sph_hash_cones::insert
int insert(CSphmomentum *v, CSphmomentum *parent, CSphmomentum *child, bool p_io, bool c_io)
insert a new candidate into the hash.
Definition:
hash.cpp:105
siscone_spherical::CSph3vector
base class for managing the spatial part of Cmomentum (defined after)
Definition:
momentum.h:54
siscone_spherical::sph_hash_cones::n_cones
int n_cones
number of elements
Definition:
hash.h:94
siscone_spherical::sph_hash_element::centre
CSph3vector centre
centre of the cone
Definition:
hash.h:48
siscone_spherical::CSphmomentum
base class for dynamic coordinates management
Definition:
momentum.h:158
siscone_spherical::sph_hash_cones
Definition:
hash.h:61
siscone_spherical::sph_hash_cones::R2
double R2
circle radius (squared) NOTE: need to be set before any call to 'insert'
Definition:
hash.h:106
siscone_spherical::sph_hash_cones::mask
int mask
number of occupied cells
Definition:
hash.h:102
siscone_spherical::sph_hash_element::is_stable
bool is_stable
true if stable w.r.t. "border particles"
Definition:
hash.h:49
The
SISCone
project has been developed by
Gavin Salam
and
Gregory Soyez
Documentation generated for SISCone by
Doxygen
1.8.17