CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
ChainMesh_Catalogue.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2010 by Federico Marulli and Alfonso Veropalumbo *
3  * federico.marulli3@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ********************************************************************/
20 
34 #include "Catalogue.h"
35 
36 
37 #ifndef __CHAINMESHCAT__
38 #define __CHAINMESHCAT__
39 
40 
41 namespace cbl {
42 
43  namespace chainmesh {
44 
55  {
56 
57  private:
58 
60  std::shared_ptr<catalogue::Catalogue> m_catalogue;
61 
62  public:
67  ChainMesh_Catalogue () = default;
68 
78  ChainMesh_Catalogue (const double cell_size, std::shared_ptr<catalogue::Catalogue> cat, const double rmax, const double rmin=-1.) : ChainMesh(cell_size, 3)
79  {
80  set_par(cell_size, cat, rmax, rmin);
81  }
82 
86  ~ChainMesh_Catalogue () = default;
87 
95  void set_par (const double cell_size, std::shared_ptr<catalogue::Catalogue> cat, const double rmax, const double rmin=-1.);
96 
101  void get_order (std::vector<int> &order) const;
102 
110  std::vector<std::shared_ptr<catalogue::Object>> object_list (std::shared_ptr<catalogue::Object> object, const int ii=-1);
111 
116  std::shared_ptr<catalogue::Catalogue> catalogue () const { return m_catalogue; }
117 
118  };
119  }
120 }
121 
122 #endif
The class Catalogue
The class ChainMesh_Catalogue.
std::shared_ptr< catalogue::Catalogue > catalogue() const
get the internal variable m_catalogue
std::vector< std::shared_ptr< catalogue::Object > > object_list(std::shared_ptr< catalogue::Object > object, const int ii=-1)
get list of objects close to the input
std::shared_ptr< catalogue::Catalogue > m_catalogue
pointer to catalogue used for the chain-mesh
~ChainMesh_Catalogue()=default
default destructor
void set_par(const double cell_size, std::shared_ptr< catalogue::Catalogue > cat, const double rmax, const double rmin=-1.)
function that set parameters for the chain-mesh
ChainMesh_Catalogue(const double cell_size, std::shared_ptr< catalogue::Catalogue > cat, const double rmax, const double rmin=-1.)
constructor
ChainMesh_Catalogue()=default
default constructor _Catalogue
void get_order(std::vector< int > &order) const
order the catalogue according to the input vector
The class ChainMesh.
Definition: ChainMesh.h:60
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38