15#include "gadgetconfig.h"
19#include "../data/allvars.h"
20#include "../data/dtypes.h"
21#include "../data/lcparticles.h"
22#include "../data/mmparticles.h"
23#include "../data/simparticles.h"
24#include "../data/symtensors.h"
25#include "../mpi_utils/setcomm.h"
26#include "../time_integration/driftfac.h"
28#ifdef LIGHTCONE_MASSMAPS
32#ifndef LIGHTCONE_MAX_BOXREPLICAS
33#define LIGHTCONE_MAX_BOXREPLICAS 1000
36#ifndef LIGHTCONE_ORDER_NSIDE
37#define LIGHTCONE_ORDER_NSIDE 256
40#define LC_TYPE_FULLSKY 0
41#define LC_TYPE_OCTANT 1
42#define LC_TYPE_PENCIL 2
44#define LC_TYPE_SQUAREMAP 4
51#if defined(LIGHTCONE_PARTICLES)
54#if defined(LIGHTCONE_MASSMAPS)
59#if defined(LIGHTCONE_PARTICLES) && defined(LIGHTCONE_MASSMAPS)
60 lightcone(MPI_Comm comm,
simparticles *Sp_ptr, lcparticles *Lp_ptr, mmparticles *Mp_ptr) :
parameters(comm)
69#if defined(LIGHTCONE_PARTICLES)
78#if defined(LIGHTCONE_MASSMAPS)
90 void lightcone_init_intposconverter(
double linklength);
94 void register_parameters(
void);
96 void makeimage(
int argc,
char **argv);
98#ifdef LIGHTCONE_PARTICLES
113 int OnlyMostBoundFlag;
119 double PencilAngleRad;
122 double DiskThickness;
128 double SquareMapAngle;
129 double SquareMapAngleRad;
135 double ConeGlobAstart;
138 double ConeGlobTime_start;
139 double ConeGlobTime_end;
141 double ConeGlobComDistStart;
142 double ConeGlobComDistEnd;
156 void lightcone_init_geometry(
char *fname);
157 void lightcone_add_position_particles(
particle_data *P,
double *pos,
double ascale);
158 int lightcone_init_times(
void);
159 bool lightcone_is_cone_member(
int i,
int cone);
160 bool lightcone_is_cone_member_basic(
double ascale,
vector<double> &pos,
bool previously,
int cone);
162 bool lightcone_box_at_corner_overlaps_at_least_with_one_cone(
double *corner,
double &rmin,
double &rmax);
163 void lightcone_clear_boxlist(
double ascale);
165 static bool lightcone_compare_BoxList_Rmax(
const boxlist &a,
const boxlist &b)
167 return a.Rmax > b.Rmax;
170#ifdef LIGHTCONE_MASSMAPS
174 int NumMassMapBoundaries;
175 double *MassMapBoundariesAscale;
177 double *MassMapBoundariesComDist;
179 void lightcone_init_massmaps(
void);
180 void lightcone_massmap_binning(
void);
181 void lightcone_massmap_flush(
int dump_allowed_flag);
182 int lightcone_add_position_massmaps(
particle_data *P,
double *pos,
double ascale);
183 int lightcone_massmap_report_boundaries(
void);
185 static bool compare_doubles(
const double &a,
const double &b) {
return a < b; }