mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Fixing CAPI function for unstructured mesh.
This commit is contained in:
parent
f3f114ff0e
commit
483ec403fd
1 changed files with 13 additions and 2 deletions
15
src/mesh.cpp
15
src/mesh.cpp
|
|
@ -1419,11 +1419,22 @@ extern "C" int openmc_add_unstrucutred_mesh(const char filename[],
|
|||
const char library[],
|
||||
int* mesh_id)
|
||||
{
|
||||
bool valid_lib = false;
|
||||
#ifdef DAGMC
|
||||
if (library == "moab") {
|
||||
model::meshes.push_back(std::move(std::make_unique<UnstructuredMesh>(filename)));
|
||||
} else if (library == "libmesh") {
|
||||
valid_lib = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LIBMESH
|
||||
if (library == "libmesh") {
|
||||
model::meshes.push_back(std::move(std::make_unique<LibMesh>(filename)));
|
||||
} else {
|
||||
valid_lib = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!valid_lib) {
|
||||
set_errmsg("Mesh library " + std::string(library) + \
|
||||
"is not supported by this build of OpenMC");
|
||||
return OPENMC_E_INVALID_ARGUMENT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue