Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 86354266 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1525 Create a function which calls most of the singleton managers - so that...

#1525 Create a function which calls most of the singleton managers - so that it isn't too much a hassle to declare them in the Model equivalent in the tests.
parent f008214c
......@@ -51,7 +51,15 @@ namespace MoReFEM
std::map<unsigned int, ::MoReFEM::FilesystemNS::Directory::const_unique_ptr>&& output_directory_per_mesh_index);
/*!
* \brief Init most of the singleton managers, using the data from the input data file,
*
* \copydoc doxygen_hide_morefem_data_param
*/
template<class MoReDEMDataT>
void InitMostSingletonManager(const MoReDEMDataT& morefem_data);
/*!
* \brief Create all the finite element spaces.
*
......
......@@ -63,6 +63,49 @@ namespace MoReFEM
}
template<class MoReDEMDataT>
void InitMostSingletonManager(const MoReDEMDataT& morefem_data)
{
decltype(auto) input_data = morefem_data.GetInputData();
decltype(auto) mpi = morefem_data.GetMpi();
{
auto& manager = Internal::MeshNS::MeshManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = Internal::NumberingSubsetNS::NumberingSubsetManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = UnknownManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = DomainManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = Advanced::LightweightDomainListManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = DirichletBoundaryConditionManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = GodOfDofManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager, mpi);
}
}
template<class MoReDEMDataT>
void InitGodOfDof(const MoReDEMDataT& morefem_data,
DoConsiderProcessorWiseLocal2Global do_consider_proc_wise_local_2_global,
......
......@@ -91,39 +91,9 @@ namespace MoReFEM::TestNS::PetscNS::VectorIONS
: Crtp::CrtpMpi<Model>(morefem_data.GetMpi()),
output_directory_(ExtractResultDirectory(morefem_data))
{
decltype(auto) input_data = morefem_data.GetInputData();
decltype(auto) mpi = GetMpi();
{
auto& manager = Internal::NumberingSubsetNS::NumberingSubsetManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = UnknownManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = DomainManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = DirichletBoundaryConditionManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = Internal::MeshNS::MeshManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager);
}
{
auto& manager = GodOfDofManager::CreateOrGetInstance(__FILE__, __LINE__);
Advanced::SetFromInputData<>(input_data, manager, mpi);
}
Internal::ModelNS::InitMostSingletonManager(morefem_data);
Internal::ModelNS::InitGodOfDof(morefem_data,
DoConsiderProcessorWiseLocal2Global::no,
......
......@@ -16,8 +16,6 @@
# include "Core/InputData/Instances/Result.hpp"
# include "Model/Model.hpp" // TMP!
# include "Test/ThirdParty/PETSc/VectorIO/InputData.hpp"
......@@ -49,7 +47,7 @@ namespace MoReFEM
public:
//! Define as a trait.
//! Define as a trait - I need that to use it with \a TestNS::FixtureNS::Model .
using morefem_data_type = morefem_data_type;
......
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