From 9fd17a3650141c287d05f1b8df76975c10637287 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Tue, 7 Aug 2018 20:01:40 +0100 Subject: [PATCH] Correctly include the velociraptor particle information in the Makefile. Re-arrange the content of the inteface files slightly. --- src/Makefile.am | 2 +- ...swift_vel_part.h => swift_velociraptor_part.h} | 0 src/velociraptor_interface.c | 15 +++++++++++++++ src/velociraptor_interface.h | 15 ++------------- 4 files changed, 18 insertions(+), 14 deletions(-) rename src/{swift_vel_part.h => swift_velociraptor_part.h} (100%) diff --git a/src/Makefile.am b/src/Makefile.am index 6b6fb33da8..7e54ecab60 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -48,7 +48,7 @@ include_HEADERS = space.h runner.h queue.h task.h lock.h cell.h part.h const.h \ dump.h logger.h active.h timeline.h xmf.h gravity_properties.h gravity_derivatives.h \ gravity_softened_derivatives.h vector_power.h collectgroup.h hydro_space.h sort_part.h \ chemistry.h chemistry_io.h chemistry_struct.h cosmology.h restart.h space_getsid.h utilities.h \ - mesh_gravity.h cbrt.h velociraptor_interface.h + mesh_gravity.h cbrt.h velociraptor_interface.h swift_velociraptor_part.h # Common source files AM_SOURCES = space.c runner.c queue.c task.c cell.c engine.c \ diff --git a/src/swift_vel_part.h b/src/swift_velociraptor_part.h similarity index 100% rename from src/swift_vel_part.h rename to src/swift_velociraptor_part.h diff --git a/src/velociraptor_interface.c b/src/velociraptor_interface.c index 7fb7117976..3d9dab8ee6 100644 --- a/src/velociraptor_interface.c +++ b/src/velociraptor_interface.c @@ -29,6 +29,21 @@ /* Local includes. */ #include "common_io.h" +#include "engine.h" +#include "swift_velociraptor_part.h" + +#ifdef HAVE_VELOCIRAPTOR + +/* VELOCIraptor interface. */ +int InitVelociraptor(char *config_name, char *output_name, + struct cosmoinfo cosmo_info, struct unitinfo unit_info, + struct siminfo sim_info); +int InvokeVelociraptor(const size_t num_gravity_parts, + const size_t num_hydro_parts, + struct swift_vel_part *swift_parts, + const int *cell_node_ids, char *output_name); + +#endif /* HAVE_VELOCIRAPTOR */ /** * @brief Initialise VELOCIraptor with input and output file names along with diff --git a/src/velociraptor_interface.h b/src/velociraptor_interface.h index 96c2b0fd13..0f6b8d3394 100644 --- a/src/velociraptor_interface.h +++ b/src/velociraptor_interface.h @@ -22,10 +22,8 @@ /* Config parameters. */ #include "../config.h" -/* Includes. */ -#include "engine.h" -#include "hydro.h" -#include "swift_vel_part.h" +/* Forward declaration */ +struct engine; /* Structure for passing cosmological information to VELOCIraptor. */ struct cosmoinfo { @@ -100,15 +98,6 @@ struct siminfo { int icosmologicalsim; }; -/* VELOCIraptor interface. */ -int InitVelociraptor(char *config_name, char *output_name, - struct cosmoinfo cosmo_info, struct unitinfo unit_info, - struct siminfo sim_info); -int InvokeVelociraptor(const size_t num_gravity_parts, - const size_t num_hydro_parts, - struct swift_vel_part *swift_parts, - const int *cell_node_ids, char *output_name); - /* VELOCIraptor wrapper functions. */ void velociraptor_init(struct engine *e); void velociraptor_invoke(struct engine *e); -- GitLab