aboutsummaryrefslogtreecommitdiff
path: root/src/nuc_eos/readtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nuc_eos/readtable.c')
-rw-r--r--src/nuc_eos/readtable.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/nuc_eos/readtable.c b/src/nuc_eos/readtable.c
index 5cdc229..b71229c 100644
--- a/src/nuc_eos/readtable.c
+++ b/src/nuc_eos/readtable.c
@@ -9,7 +9,7 @@
#include "cctk_Functions.h"
// Interface of function for fortran module eostable
-void CCTK_FNAME(allocate_eosmodule)
+void CCTK_FNAME(setup_eosmodule)
(CCTK_INT* , CCTK_INT* , CCTK_INT*, CCTK_REAL*,
CCTK_REAL*, CCTK_REAL*, CCTK_REAL*, CCTK_REAL*);
@@ -133,17 +133,10 @@ void EOS_OMNI_ReadTable(CCTK_ARGUMENTS)
HDF5_ERROR(H5Sclose(mem3));
HDF5_ERROR(H5Fclose(file));
- // Give all values to fortran - which will copy them until I can find out how
- // I can tell Fortran to use those pointers inside the module
- CCTK_FNAME(allocate_eosmodule)
+ // Give all values to fortran - which will store pointers to them, so don't
+ // free these arrays.
+ CCTK_FNAME(setup_eosmodule)
(&nrho, &ntemp, &nye, alltables, logrho, logtemp, ye, &energy_shift);
-
- // Free the memory again because fortran copied the whole thing now
- free(ye);
- free(logtemp);
- free(logrho);
- free(alltables);
-
}