Skip to content

Commit

Permalink
Refactor register
Browse files Browse the repository at this point in the history
  • Loading branch information
loumalouomega committed Dec 16, 2024
1 parent 7ca3645 commit 2ec223e
Showing 1 changed file with 34 additions and 31 deletions.
65 changes: 34 additions & 31 deletions kratos/sources/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,39 +61,42 @@ void Kernel::Initialize() {
// Print kernel info
this->PrintInfo();

// Boost is always available
Registry::AddItem<std::string>("libraries.boost");

// When using the nonfree version of TRIANGLE, add it to the list of libraries
#if USE_TRIANGLE_NONFREE_TPL
Registry::AddItem<std::string>("libraries.triangle");
#else
// Open-source version alternative to TRIANGLE
Registry::AddItem<std::string>("libraries.delaunator-cpp");
#endif

// When using the nonfree version of TETGEN, add it to the list of libraries
#if USE_TETGEN_NONFREE_TPL
Registry::AddItem<std::string>("libraries.tetgen");
#endif

// Add the libraries that are always available
Registry::AddItem<std::string>("libraries.amgcl");
Registry::AddItem<std::string>("libraries.benchmark");
Registry::AddItem<std::string>("libraries.clipper");
Registry::AddItem<std::string>("libraries.concurrentqueue");
Registry::AddItem<std::string>("libraries.ghc");
Registry::AddItem<std::string>("libraries.gidpost");
Registry::AddItem<std::string>("libraries.intrusive_ptr");
Registry::AddItem<std::string>("libraries.json");
Registry::AddItem<std::string>("libraries.pybind11");
Registry::AddItem<std::string>("libraries.span");
Registry::AddItem<std::string>("libraries.tinyexpr");
Registry::AddItem<std::string>("libraries.vexcl");
Registry::AddItem<std::string>("libraries.zlib");

// Import the Kratos core application (if not already imported)
if (!IsImported("KratosMultiphysics")) {
// Boost is always available
if (!Registry::HasItem("libraries.boost")) {
Registry::AddItem<std::string>("libraries.boost");

// When using the nonfree version of TRIANGLE, add it to the list of libraries
#if USE_TRIANGLE_NONFREE_TPL
Registry::AddItem<std::string>("libraries.triangle");
#else
// Open-source version alternative to TRIANGLE
Registry::AddItem<std::string>("libraries.delaunator-cpp");
#endif

// When using the nonfree version of TETGEN, add it to the list of libraries
#if USE_TETGEN_NONFREE_TPL
Registry::AddItem<std::string>("libraries.tetgen");
#endif

// Add the libraries that are always available
Registry::AddItem<std::string>("libraries.amgcl");
Registry::AddItem<std::string>("libraries.benchmark");
Registry::AddItem<std::string>("libraries.clipper");
Registry::AddItem<std::string>("libraries.concurrentqueue");
Registry::AddItem<std::string>("libraries.ghc");
Registry::AddItem<std::string>("libraries.gidpost");
Registry::AddItem<std::string>("libraries.intrusive_ptr");
Registry::AddItem<std::string>("libraries.json");
Registry::AddItem<std::string>("libraries.pybind11");
Registry::AddItem<std::string>("libraries.span");
Registry::AddItem<std::string>("libraries.tinyexpr");
Registry::AddItem<std::string>("libraries.vexcl");
Registry::AddItem<std::string>("libraries.zlib");
}

// Import core application
this->ImportApplication(mpKratosCoreApplication);
}
}
Expand Down

0 comments on commit 2ec223e

Please sign in to comment.