Commit 53cf0d70 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1443 Fix the issues related to some tests.

parent 633cb931
......@@ -148,6 +148,10 @@ namespace MoReFEM
//! \return True if there is one.
static constexpr bool IsParallelismField();
//! Whether there is a Parallelism block in MoReFEM input data.
//! \return The value of the dedicated enum class.
static constexpr is_parallelism_field IsParallelismFieldEnumClass();
private:
//! Accessor to the object which keeps the data related to parallelism strategy.
......
......@@ -36,6 +36,22 @@ namespace MoReFEM
}
template
<
class InputDataT,
program_type ProgramTypeT,
is_parallelism_field IsParallelismFieldT,
Utilities::InputDataNS::DoTrackUnusedFields DoTrackUnusedFieldsT,
class AdditionalCommandLineArgumentsPolicyT
>
constexpr is_parallelism_field
MoReFEMData<InputDataT, ProgramTypeT, IsParallelismFieldT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsPolicyT>
::IsParallelismFieldEnumClass()
{
return IsParallelismFieldT;
}
template
<
class InputDataT,
......
......@@ -132,7 +132,7 @@ namespace MoReFEM
using InputData = InputData<InputDataTuple>;
//! \copydoc doxygen_hide_morefem_data_type
using morefem_data_type = MoReFEMData<InputData, program_type::model>;
using morefem_data_type = MoReFEMData<InputData, program_type::model, is_parallelism_field::yes>;
} // namespace CardiacMechanicsPrestressNS
......
......@@ -32,7 +32,7 @@ int main(int argc, char** argv)
try
{
MoReFEMData<InputData, program_type::model> morefem_data(argc, argv);
MoReFEMData<InputData, program_type::model, is_parallelism_field::yes> morefem_data(argc, argv);
const auto& input_data = morefem_data.GetInputData();
const auto& mpi = morefem_data.GetMpi();
......
......@@ -112,7 +112,7 @@ namespace MoReFEM
using InputData = InputData<InputDataTuple>;
//! \copydoc doxygen_hide_morefem_data_type
using morefem_data_type = MoReFEMData<InputData, program_type::test>;
using morefem_data_type = MoReFEMData<InputData, program_type::test, is_parallelism_field::yes>;
} // namespace LoadPrepartitionedGodOfDofNS
......
......@@ -70,7 +70,7 @@ namespace MoReFEM
using InputData = InputData<InputDataTuple>;
//! \copydoc doxygen_hide_morefem_data_type
using morefem_data_type = MoReFEMData<InputData, program_type::test>;
using morefem_data_type = MoReFEMData<InputData, program_type::test, is_parallelism_field::yes>;
} // namespace LoadPrepartitionedMeshNS
......
......@@ -90,7 +90,7 @@ namespace MoReFEM
using input_data_type = typename morefem_data_type::input_data_type;
//! Alias to the proper InitializeTestMoReFEMData type.
using initialize_type = TestNS::InitializeTestMoReFEMData<input_data_type>;
using initialize_type = TestNS::InitializeTestMoReFEMData<input_data_type, morefem_data_type::IsParallelismFieldEnumClass()>;
/*!
* \brief Static method which yields the model considered for the tests.
......
......@@ -34,17 +34,17 @@ namespace MoReFEM
* so the Lua file is given as is in the main program. Under the hood we have to mimic the argument argv
* we would have obtained from the command line; it is the point of current class.
*/
template<class InputDataT>
template<class InputDataT, is_parallelism_field IsParallelismFieldT = is_parallelism_field::no>
class InitializeTestMoReFEMData
{
public:
//! \copydoc doxygen_hide_alias_self
using self = InitializeTestMoReFEMData<InputDataT>;
using self = InitializeTestMoReFEMData<InputDataT, IsParallelismFieldT>;
//! Alias to the type of \a MoReFEMData.
using morefem_data_type = MoReFEMData<InputDataT, program_type::test>;
using morefem_data_type = MoReFEMData<InputDataT, program_type::test, IsParallelismFieldT>;
//! Alias to unique pointer.
using const_unique_ptr = std::unique_ptr<const self>;
......
......@@ -20,9 +20,9 @@ namespace MoReFEM
{
template<class InputDataT>
template<class InputDataT, is_parallelism_field IsParallelismFieldT>
template<class T>
InitializeTestMoReFEMData<InputDataT>
InitializeTestMoReFEMData<InputDataT, IsParallelismFieldT>
::InitializeTestMoReFEMData(T&& lua_file)
{
decltype(auto) environment = Utilities::Environment::CreateOrGetInstance(__FILE__, __LINE__);
......@@ -40,9 +40,9 @@ namespace MoReFEM
}
template<class InputDataT>
const typename InitializeTestMoReFEMData<InputDataT>::morefem_data_type&
InitializeTestMoReFEMData<InputDataT>::GetMoReFEMData() const noexcept
template<class InputDataT, is_parallelism_field IsParallelismFieldT>
const typename InitializeTestMoReFEMData<InputDataT, IsParallelismFieldT>::morefem_data_type&
InitializeTestMoReFEMData<InputDataT, IsParallelismFieldT>::GetMoReFEMData() const noexcept
{
assert(!(!morefem_data_));
return *morefem_data_;
......
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