mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Adding check that the LibMeshInit object is set.
This commit is contained in:
parent
6b91138957
commit
19cea16ef9
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue