Adjusting how the LibMesh comm is stored.

This commit is contained in:
Patrick Shriwise 2020-04-24 17:22:54 -05:00
parent 7323ae526f
commit b54bbad9d9
4 changed files with 10 additions and 3 deletions

View file

@ -68,7 +68,11 @@ int openmc_init(int argc, char* argv[], const void* intracomm)
#endif
// initialize libmesh
if (!settings::LMI) settings::LMI = std::make_unique<libMesh::LibMeshInit>(argc, argv, n_threads);
if (!settings::LMI && !libMesh::initialized())
{
settings::LMI = std::make_unique<libMesh::LibMeshInit>(argc, argv, n_threads);
settings::libmesh_comm = &(settings::LMI->comm());
}
#endif