Use namespace in finalize.h/cpp

This commit is contained in:
Paul Romano 2018-10-14 16:05:12 -05:00
parent 8ebd26b160
commit bbccbf436d
2 changed files with 9 additions and 1 deletions

View file

@ -1,6 +1,10 @@
#ifndef OPENMC_FINALIZE_H
#define OPENMC_FINALIZE_H
namespace openmc {
extern "C" void openmc_free_bank();
} // namespace openmc
#endif // OPENMC_FINALIZE_H

View file

@ -2,9 +2,13 @@
#include "openmc/message_passing.h"
namespace openmc {
void openmc_free_bank()
{
#ifdef OPENMC_MPI
MPI_Type_free(&openmc::mpi::bank);
MPI_Type_free(&mpi::bank);
#endif
}
} // namespace openmc