Commit 95c5ff23 authored by DIAZ Jerome's avatar DIAZ Jerome Committed by GILLES Sebastien

#20 Moved up the singleton in charge of the instantiation of the check for...

#20 Moved up the singleton in charge of the instantiation of the check for inverted elements so that it belongs to the Core library instead of the FiniteElement one.
parent 864d2654
This diff is collapsed.
......@@ -13,9 +13,9 @@
#include "Utilities/Containers/UnorderedMap.hpp"
#include "Utilities/InputData/Base.hpp"
#include "FiniteElement/FiniteElementSpace/Internal/CheckInvertedElements.hpp"
#include "Core/MoReFEMData/Internal/CheckInvertedElements.hpp"
namespace MoReFEM::Internal::FEltSpaceNS
namespace MoReFEM::Internal::MoReFEMDataNS
{
......@@ -35,4 +35,4 @@ namespace MoReFEM::Internal::FEltSpaceNS
}
} // namepsace MoReFEM::Internal::FEltSpaceNS
} // namepsace MoReFEM::Internal::MoReFEMDataNS
......@@ -6,8 +6,8 @@
// Copyright © 2019 Inria. All rights reserved.
//
#ifndef MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HPP_
# define MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HPP_
#ifndef MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HPP_
# define MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HPP_
# include <cstdlib>
......@@ -18,10 +18,10 @@
# include "Utilities/Exceptions/Exception.hpp"
# include "Utilities/Singleton/Singleton.hpp"
# include "FiniteElement/FiniteElementSpace/Internal/EnumInvertedElements.hpp"
# include "Core/MoReFEMData/Internal/EnumInvertedElements.hpp"
namespace MoReFEM::Internal::FEltSpaceNS
namespace MoReFEM::Internal::MoReFEMDataNS
{
......@@ -89,25 +89,11 @@ namespace MoReFEM::Internal::FEltSpaceNS
};
} // namespace MoReFEM::Internal::FEltSpaceNS
} // namespace MoReFEM::Internal::MoReFEMDataNS
/// @} // addtogroup FiniteElementGroup
# include "FiniteElement/FiniteElementSpace/Internal/CheckInvertedElements.hxx"
#endif // MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HPP_
# include "Core/MoReFEMData/Internal/CheckInvertedElements.hxx"
#endif // MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HPP_
......@@ -6,19 +6,19 @@
// Copyright © 2019 Inria. All rights reserved.
//
#ifndef MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HXX_
# define MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HXX_
#ifndef MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HXX_
# define MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HXX_
namespace MoReFEM::Internal::FEltSpaceNS
namespace MoReFEM::Internal::MoReFEMDataNS
{
inline check_inverted_elements_policy CheckInvertedElements::DoCheckInvertedElements() const noexcept
{
return check_inverted_elements_policy_;
}
} // namepsace MoReFEM::Internal::FEltSpaceNS
#endif // MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HXX_
#endif // MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_CHECK_INVERTED_ELEMENTS_HXX_
......@@ -6,8 +6,8 @@
// Copyright © 2019 Inria. All rights reserved.
//
#ifndef MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_ENUM_INVERTED_ELEMENTS_HPP_
# define MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_ENUM_INVERTED_ELEMENTS_HPP_
#ifndef MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_ENUM_INVERTED_ELEMENTS_HPP_
# define MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_ENUM_INVERTED_ELEMENTS_HPP_
namespace MoReFEM
{
......@@ -22,4 +22,4 @@ namespace MoReFEM
}
#endif // MOREFEM_x_FINITE_ELEMENT_x_FINITE_ELEMENT_SPACE_x_INTERNAL_x_ENUM_INVERTED_ELEMENTS_HPP_
#endif // MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_INTERNAL_x_ENUM_INVERTED_ELEMENTS_HPP_
......@@ -10,9 +10,13 @@
target_sources(${MOREFEM_CORE}
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/CheckInvertedElements.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Helper.cpp"
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/CheckInvertedElements.hpp"
"${CMAKE_CURRENT_LIST_DIR}/CheckInvertedElements.hxx"
"${CMAKE_CURRENT_LIST_DIR}/EnumInvertedElements.hpp"
"${CMAKE_CURRENT_LIST_DIR}/Helper.hpp"
"${CMAKE_CURRENT_LIST_DIR}/Helper.hxx"
"${CMAKE_CURRENT_LIST_DIR}/Parallelism.hpp"
......
......@@ -35,7 +35,7 @@
# include "Core/MoReFEMData/Internal/Helper.hpp"
# include "Core/InputData/Instances/Parameter/Solid/Solid.hpp"
# include "FiniteElement/FiniteElementSpace/Internal/CheckInvertedElements.hpp"
# include "Core/MoReFEMData/Internal/CheckInvertedElements.hpp"
namespace MoReFEM
{
......
......@@ -104,8 +104,8 @@ namespace MoReFEM
const auto& do_check_inverted_elements = ipl::Extract<InputDataNS::Solid::CheckInvertedElements>
::Value(*input_data_);
MoReFEM::Internal::FEltSpaceNS::CheckInvertedElements
::CreateOrGetInstance(__FILE__, __LINE__, do_check_inverted_elements);
MoReFEM::Internal::MoReFEMDataNS::CheckInvertedElements
::CreateOrGetInstance(__FILE__, __LINE__, do_check_inverted_elements);
}
}
catch(const ExceptionNS::GracefulExit& e)
......
......@@ -11,7 +11,6 @@ target_sources(${MOREFEM_FELT}
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/BreakCircularDependancy.cpp"
"${CMAKE_CURRENT_LIST_DIR}/CheckInvertedElements.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ComputeMatrixPattern.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Connectivity.cpp"
"${CMAKE_CURRENT_LIST_DIR}/CreateNodeListHelper.cpp"
......@@ -28,8 +27,6 @@ target_sources(${MOREFEM_FELT}
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/BreakCircularDependancy.hpp"
"${CMAKE_CURRENT_LIST_DIR}/CheckInvertedElements.hpp"
"${CMAKE_CURRENT_LIST_DIR}/CheckInvertedElements.hxx"
"${CMAKE_CURRENT_LIST_DIR}/ComputeMatrixPattern.hpp"
"${CMAKE_CURRENT_LIST_DIR}/Connectivity.hpp"
"${CMAKE_CURRENT_LIST_DIR}/Connectivity.hxx"
......@@ -41,7 +38,6 @@ target_sources(${MOREFEM_FELT}
"${CMAKE_CURRENT_LIST_DIR}/DofProgramWiseIndexListPerVertexCoordIndexList.hxx"
"${CMAKE_CURRENT_LIST_DIR}/DofProgramWiseIndexListPerVertexCoordIndexListManager.hpp"
"${CMAKE_CURRENT_LIST_DIR}/DofProgramWiseIndexListPerVertexCoordIndexListManager.hxx"
"${CMAKE_CURRENT_LIST_DIR}/EnumInvertedElements.hpp"
"${CMAKE_CURRENT_LIST_DIR}/FEltSpace.hpp"
"${CMAKE_CURRENT_LIST_DIR}/FEltSpace.hxx"
"${CMAKE_CURRENT_LIST_DIR}/FEltSpaceStorage.hpp"
......
......@@ -26,7 +26,7 @@
# include "Parameters/InitParameterFromInputData/InitParameterFromInputData.hpp"
# include "ParameterInstances/Compound/Solid/Solid.hpp"
# include "FiniteElement/FiniteElementSpace/Internal/CheckInvertedElements.hpp"
# include "Core/MoReFEMData/Internal/CheckInvertedElements.hpp"
# include "Operators/Enum.hpp"
......
......@@ -455,7 +455,7 @@ namespace MoReFEM
const auto& De = derivative_green_lagrange.Update(gradient_displacement);
const auto& transposed_De = derivative_green_lagrange.GetTransposed();
switch (MoReFEM::Internal::FEltSpaceNS::CheckInvertedElements::GetInstance(__FILE__, __LINE__).DoCheckInvertedElements())
switch (MoReFEM::Internal::MoReFEMDataNS::CheckInvertedElements::GetInstance(__FILE__, __LINE__).DoCheckInvertedElements())
{
case check_inverted_elements_policy::do_check:
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment