Deallocate CMFD arrays in openmc_finalize

This commit is contained in:
Shikhar Kumar 2018-12-12 18:13:26 -05:00
parent 8535a8953a
commit f049f76bb4
2 changed files with 14 additions and 0 deletions

View file

@ -84,6 +84,9 @@ contains
subroutine free_memory_bank() bind(C)
end subroutine free_memory_bank
subroutine free_memory_cmfd() bind(C)
end subroutine free_memory_cmfd
end interface
call free_memory_geometry()
@ -101,6 +104,7 @@ contains
call free_memory_tally_filter()
call free_memory_tally_derivative()
call free_memory_bank()
call free_memory_cmfd()
#ifdef DAGMC
call free_memory_dagmc()
#endif

View file

@ -348,5 +348,15 @@ int openmc_run_linsolver(const double* A_data, const double* b, double* x,
}
}
//==============================================================================
// Fortran compatibility
//==============================================================================
extern "C" void free_memory_cmfd()
{
cmfd::indptr.clear();
cmfd::indices.clear();
}
} // namespace openmc