Memory saving opportunities for lage KDTrees
This commit is contained in:
parent
113a14e00c
commit
f0a951e38d
4 changed files with 33 additions and 10 deletions
|
@ -2,6 +2,7 @@ SET(tolink ${GSL_LIBRARIES} CosmoTool ${CosmoTool_LIBS})
|
|||
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||
include_directories(${FFTW3_INCLUDE_DIRS}
|
||||
${EIGEN3_INCLUDE_DIRS} ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH})
|
||||
include_directories(${CMAKE_SOURCE_DIR}/sample)
|
||||
|
||||
IF(SHARP_INCLUDE_PATH)
|
||||
include_directories(BEFORE ${SHARP_INCLUDE_PATH})
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "omptl/algorithm"
|
||||
#include <cassert>
|
||||
#include "yorick.hpp"
|
||||
#include "sphSmooth.hpp"
|
||||
|
@ -106,7 +107,7 @@ int main(int argc, char **argv)
|
|||
|
||||
array3_type out_den_1(boost::extents[Nres][Nres][Nres]);
|
||||
array4_type out_v3d_1(boost::extents[Nres][Nres][Nres][3]);
|
||||
array3_type out_rad_1(boost::extents[Nres][Nres][Nres]);
|
||||
// array3_type out_rad_1(boost::extents[Nres][Nres][Nres]);
|
||||
|
||||
cout << "Weighing..." << endl;
|
||||
|
||||
|
@ -174,7 +175,7 @@ int main(int argc, char **argv)
|
|||
out_v3d_1[rx][ry][rz][1] = 0;
|
||||
out_v3d_1[rx][ry][rz][2] = 0;
|
||||
out_den_1[rx][ry][rz] = 0;
|
||||
out_rad_1[rx][ry][rz] = -1;
|
||||
//out_rad_1[rx][ry][rz] = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -184,9 +185,7 @@ int main(int argc, char **argv)
|
|||
else
|
||||
smooth1.fetchNeighbours(c);
|
||||
|
||||
float val;
|
||||
|
||||
out_rad_1[rx][ry][rz] = smooth1.getSmoothingLen();
|
||||
//out_rad_1[rx][ry][rz] = smooth1.getSmoothingLen();
|
||||
out_v3d_1[rx][ry][rz][0] = smooth1.computeSmoothedValue(c, getVelocity<0>);
|
||||
out_v3d_1[rx][ry][rz][1] = smooth1.computeSmoothedValue(c, getVelocity<1>);
|
||||
out_v3d_1[rx][ry][rz][2] = smooth1.computeSmoothedValue(c, getVelocity<2>);
|
||||
|
@ -196,7 +195,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
hdf5_write_array(out_f, "radii", out_rad_1);
|
||||
//hdf5_write_array(out_f, "radii", out_rad_1);
|
||||
hdf5_write_array(out_f, "velocity", out_v3d_1);
|
||||
hdf5_write_array(out_f, "density", out_den_1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue