...
 
Commits (5)
......@@ -6,7 +6,8 @@ add_executable(io main.cpp
MetaParser/MetaParser_unit_test.cpp
HDF5_wr/HDF5_writer_cuda.cu
ObjReader/ObjReader_unit_test.cpp
../../openfpm_vcluster/src/VCluster/VCluster.cpp
../../openfpm_vcluster/src/VCluster/VCluster.cpp ../../openfpm_vcluster/src/VCluster/InVis.cpp ../../openfpm_vcluster/src/VCluster/InVisVolume.cpp
../../openfpm_devices/src/memory/ShmAllocator_manager.cpp ../../openfpm_devices/src/memory/SemManager.cpp ../../openfpm_devices/src/memory/ShmAllocator.cpp ../../openfpm_devices/src/memory/ShmBuffer.cpp
../../openfpm_devices/src/memory/CudaMemory.cu
../../openfpm_devices/src/memory/HeapMemory.cpp
../../openfpm_devices/src/Memleak_check.cpp
......@@ -29,6 +30,8 @@ if (CUDA_FOUND)
endif()
endif()
set(JAVA_HOME /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64)
target_include_directories (io PUBLIC ${CUDA_INCLUDE_DIRS})
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_devices/src/)
......@@ -40,11 +43,13 @@ target_include_directories (io PUBLIC ${HDF5_ROOT}/include)
target_include_directories (io PUBLIC ${TINYOBJLOADER_INCLUDE_DIRS} )
target_include_directories (io PUBLIC ${Boost_INCLUDE_DIRS})
target_include_directories (io PUBLIC ${OPENFPM_PDATA_DIR}/src)
target_include_directories (io PUBLIC ${JAVA_HOME}/include ${JAVA_HOME}/include/linux)
if (PETSC_FOUND)
target_include_directories(io PUBLIC ${PETSC_INCLUDES})
endif()
target_link_libraries(io ${JAVA_HOME}/lib/server/libjvm.so)
target_link_libraries(io ${Boost_LIBRARIES})
target_link_libraries(io -L${HDF5_ROOT}/lib hdf5 hdf5_hl)
target_link_libraries(io -L${TINYOBJLOADER_LIBRARY_DIRS} -ltinyobjloader )
......
......@@ -24,7 +24,7 @@ class HDF5_reader<GRID_DIST>
hid_t plist_id,
hid_t dataset_2,
openfpm::vector<device_grid> & loc_grid_old,
openfpm::vector<GBoxes<device_grid::dims>> & gdb_ext_old)
openfpm::vector_ofp<GBoxes<device_grid::dims>> & gdb_ext_old)
{
hsize_t offset[1];
hsize_t block[1];
......@@ -66,7 +66,7 @@ class HDF5_reader<GRID_DIST>
Unpack_stat ps;
openfpm::vector<device_grid> loc_grid_old_unp;
openfpm::vector<GBoxes<device_grid::dims>> gdb_ext_old_unp;
openfpm::vector_ofp<GBoxes<device_grid::dims>> gdb_ext_old_unp;
Unpacker<typename std::remove_reference<decltype(loc_grid_old)>::type,HeapMemory>::unpack(mem,loc_grid_old_unp,ps,1);
Unpacker<typename std::remove_reference<decltype(gdb_ext_old)>::type,HeapMemory>::unpack(mem,gdb_ext_old_unp,ps,1);
......@@ -86,7 +86,7 @@ public:
template<typename device_grid> inline void load(const std::string & filename,
openfpm::vector<device_grid> & loc_grid_old,
openfpm::vector<GBoxes<device_grid::dims>> & gdb_ext_old)
openfpm::vector_ofp<GBoxes<device_grid::dims>> & gdb_ext_old)
{
Vcluster<> & v_cl = create_vcluster();
......
......@@ -22,7 +22,7 @@ public:
template<typename device_grid>
inline void save(const std::string & filename,
const openfpm::vector<device_grid> & loc_grid,
const openfpm::vector<GBoxes<device_grid::dims>> & gdb_ext) const
const openfpm::vector_ofp<GBoxes<device_grid::dims>> & gdb_ext) const
{
Vcluster<> & v_cl = create_vcluster();
......
......@@ -45,6 +45,22 @@ struct GBoxes
//! origin of GDbox in global grid coordinates
Point<dim,long int> origin;
/*! \brief Produce a string from the object
*
* \return string
*
*/
std::string toString() const
{
std::stringstream str;
str << "GDBox: " << GDbox.toString() << " ";
str << "DBox: " << Dbox.toString() << " ";
str << "Origin: " << origin.toString();
return str.str();
}
/*! \brief Indicate that this structure has no pointers inside
*
* \return true
......