Skip to content

Commit

Permalink
Merge pull request #11502 from KratosMultiphysics/core/better-debuggi…
Browse files Browse the repository at this point in the history
…ng-entities_utilities
  • Loading branch information
loumalouomega authored Aug 24, 2023
2 parents bb82304 + 5045b18 commit d725ad8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kratos/utilities/entities_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
// Philipp Bucher (https://github.com/philbucher)
Expand Down Expand Up @@ -65,6 +65,7 @@ bool EntitityIdentifier<TEntity>::IsInitialized() const
template<class TEntity>
const TEntity& EntitityIdentifier<TEntity>::GetPrototypeEntity(typename GeometryType::Pointer pGeometry) const
{
KRATOS_DEBUG_ERROR_IF(mTypes[static_cast<std::size_t>(pGeometry->GetGeometryType())] == nullptr) << "Prototype not initialized for " << GeometryUtils::GetGeometryName(pGeometry->GetGeometryType()) << std::endl;
return *mTypes[static_cast<std::size_t>(pGeometry->GetGeometryType())];
}

Expand All @@ -74,6 +75,7 @@ const TEntity& EntitityIdentifier<TEntity>::GetPrototypeEntity(typename Geometry
template<class TEntity>
const TEntity& EntitityIdentifier<TEntity>::GetPrototypeEntity(const GeometryType& rGeometry) const
{
KRATOS_DEBUG_ERROR_IF(mTypes[static_cast<std::size_t>(rGeometry.GetGeometryType())] == nullptr) << "Prototype not initialized for " << GeometryUtils::GetGeometryName(rGeometry.GetGeometryType()) << std::endl;
return *mTypes[static_cast<std::size_t>(rGeometry.GetGeometryType())];
}

Expand Down

0 comments on commit d725ad8

Please sign in to comment.