Adding check that the LibMeshInit object is set.

This commit is contained in:
Patrick Shriwise 2020-12-07 19:29:59 -06:00
parent 6b91138957
commit 19cea16ef9

View file

@ -68,7 +68,7 @@ int openmc_init(int argc, char* argv[], const void* intracomm)
#endif
// initialize libMesh if it hasn't been initialized already
// by a call external to OpenMC
// (if initialized externally, the LMI object needs to be provided also)
if (!settings::LMI && !libMesh::initialized())
{
#ifdef OPENMC_MPI
@ -81,6 +81,10 @@ if (!settings::LMI && !libMesh::initialized())
settings::LMI = std::make_unique<libMesh::LibMeshInit>(argc, argv, 0, n_threads);
#endif
}
if (!settings::LMI) {
fatal_error("libMesh::LibMeshInit object isn't set.");
}
#endif
// Start total and initialization timer