mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
Merge branch 'master' of /home/lavaux/Dropbox/gitRoot/zobovPerso
This commit is contained in:
commit
6d54b42ad5
3 changed files with 14 additions and 3 deletions
|
@ -10,7 +10,7 @@ if ((NOT QHULL_INCLUDE_PATH) OR (NOT QHULL_CPP_LIBRARY))
|
||||||
message(SEND_ERROR "Qhull library not found")
|
message(SEND_ERROR "Qhull library not found")
|
||||||
endif((NOT QHULL_INCLUDE_PATH) OR (NOT QHULL_CPP_LIBRARY))
|
endif((NOT QHULL_INCLUDE_PATH) OR (NOT QHULL_CPP_LIBRARY))
|
||||||
|
|
||||||
set(QHULL_INCLUDES ${QHULL_INCLUDE_PATH} ${QHULL_CPP_INCLUDE_PATH} ${QHULL_BASE_PATH}/src)
|
set(QHULL_INCLUDES ${QHULL_INCLUDE_PATH} ${QHULL_INCLUDE_PATH}/.. ${QHULL_CPP_INCLUDE_PATH} ${QHULL_BASE_PATH}/src)
|
||||||
set(QHULL_LIBRARIES ${QHULL_CPP_LIBRARY} ${QHULL_P_LIBRARY})
|
set(QHULL_LIBRARIES ${QHULL_CPP_LIBRARY} ${QHULL_P_LIBRARY})
|
||||||
|
|
||||||
add_definitions(-Dqh_QHpointer)
|
add_definitions(-Dqh_QHpointer)
|
||||||
|
|
|
@ -18,6 +18,8 @@ using namespace CosmoTool;
|
||||||
|
|
||||||
#define LIGHT_SPEED 299792.458
|
#define LIGHT_SPEED 299792.458
|
||||||
|
|
||||||
|
static double gadgetUnit=1e-3;
|
||||||
|
|
||||||
SimuData *doLoadRamses(const char *basename, int baseid, int velAxis, bool goRedshift)
|
SimuData *doLoadRamses(const char *basename, int baseid, int velAxis, bool goRedshift)
|
||||||
{
|
{
|
||||||
SimuData *d, *outd;
|
SimuData *d, *outd;
|
||||||
|
@ -65,7 +67,13 @@ SimuData *doLoadRamses(const char *basename, int baseid, int velAxis, bool goRed
|
||||||
|
|
||||||
SimuData *myLoadGadget(const char *fname, int id, int flags)
|
SimuData *myLoadGadget(const char *fname, int id, int flags)
|
||||||
{
|
{
|
||||||
return loadGadgetMulti(fname, id, flags);
|
SimuData *sim = loadGadgetMulti(fname, id, flags);
|
||||||
|
sim->BoxSize *= gadgetUnit*1000;
|
||||||
|
for (int j = 0; j < 3; j++)
|
||||||
|
for (long i = 0; i < sim->NumPart; i++)
|
||||||
|
sim->Pos[j][i] *= gadgetUnit*1000;
|
||||||
|
|
||||||
|
return sim;
|
||||||
}
|
}
|
||||||
|
|
||||||
SimuData *doLoadSimulation(const char *gadgetname, int velAxis, bool goRedshift, SimuData *(*loadFunction)(const char *fname, int id, int flags))
|
SimuData *doLoadSimulation(const char *gadgetname, int velAxis, bool goRedshift, SimuData *(*loadFunction)(const char *fname, int id, int flags))
|
||||||
|
@ -490,6 +498,8 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
generateMock_conf_print_version();
|
generateMock_conf_print_version();
|
||||||
|
|
||||||
|
gadgetUnit=args_info.gadgetUnit_arg;
|
||||||
|
|
||||||
if (args_info.ramsesBase_given || args_info.ramsesId_given)
|
if (args_info.ramsesBase_given || args_info.ramsesId_given)
|
||||||
{
|
{
|
||||||
if (args_info.ramsesBase_given && args_info.ramsesId_given)
|
if (args_info.ramsesBase_given && args_info.ramsesId_given)
|
||||||
|
|
|
@ -30,3 +30,4 @@ option "cosmo" - "Apply cosmological redshift" flag on
|
||||||
option "subsample" - "Subsample the input simulation by the specified amount" double optional
|
option "subsample" - "Subsample the input simulation by the specified amount" double optional
|
||||||
|
|
||||||
option "inputParameter" - "Input geometry (optional, warning!)" string optional
|
option "inputParameter" - "Input geometry (optional, warning!)" string optional
|
||||||
|
option "gadgetUnit" - "Unit of length in gadget file in Mpc/h" double optional default="0.001"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue