Commit b02a9984 authored by GILLES Sebastien's avatar GILLES Sebastien

#1443 Now all the methods of \a GodOfDof are properly documented, and most of...

#1443 Now all the methods of \a GodOfDof are properly documented, and most of them are properly renamed (Init1, Init2 and Init3 will probably shortly follow suite when I will pursue deeper two step paralellism...).
parent dc161772
......@@ -165,8 +165,7 @@ namespace MoReFEM
void GodOfDof::Init3(DoConsiderProcessorWiseLocal2Global do_consider_proc_wise_local_2_global,
const std::map<unsigned int, std::vector<unsigned int>>& dof_list_per_felt_space,
const Internal::Parallelism* parallelism)
const std::map<unsigned int, std::vector<unsigned int>>& dof_list_per_felt_space)
{
assert("do_consider_proc_wise_local_2_global_ is only stored in debug mode (in release its value "
"is propagated through arguments) but it is not expected to change in the process" &&
......@@ -216,13 +215,10 @@ namespace MoReFEM
felt_space.ComputeDofList(dof_unique_id_list);
}
Init4(do_consider_proc_wise_local_2_global,
parallelism);
}
void GodOfDof::Init4(DoConsiderProcessorWiseLocal2Global do_consider_proc_wise_local_2_global,
void GodOfDof::FinalizeInitialization(DoConsiderProcessorWiseLocal2Global do_consider_proc_wise_local_2_global,
const Internal::Parallelism* parallelism)
{
decltype(auto) mpi = GetMpi();
......@@ -906,8 +902,6 @@ namespace MoReFEM
break;
}
}
}
......
......@@ -558,11 +558,9 @@ namespace MoReFEM
*
* \copydetails doxygen_hide_do_consider_processor_wise_local_2_global
* \copydetails doxygen_hide_dof_list_per_felt_space_arg
* \param[in] parallelism Internal object which holds the parallelism behaviour to use. If none given, might be nullptr.
*/
void Init3(DoConsiderProcessorWiseLocal2Global do_consider_processor_wise_local_2_global,
const std::map<unsigned int, std::vector<unsigned int>>& dof_list_per_felt_space,
const Internal::Parallelism* parallelism);
const std::map<unsigned int, std::vector<unsigned int>>& dof_list_per_felt_space);
/*!
* \brief Init the output directories and the list of \a FEltSpace to consider.
......@@ -594,40 +592,33 @@ namespace MoReFEM
/*!
* \brief The method called by \a Init() when the parallelism strategy is "run_from_preprocessed_data"
*
* \copydetails doxygen_hide_do_consider_processor_wise_local_2_global
* \copydoc doxygen_hide_morefem_data_param
*
* <b>Prerequisite:</b> \a FEltSpace and output directories must have been initialized.
*
*/
template<class MoReFEMDataT>
void InitFromPreprocessedData(const MoReFEMDataT& morefem_data,
DoConsiderProcessorWiseLocal2Global do_consider_processor_wise_local_2_global);
// ============================
//! \cond IGNORE_BLOCK_IN_DOXYGEN
// #1443 As this is in flux, I don't see the need to comment this properly at the moment.
// Arguments are already described above, and the methods will be renamed and maybe not stay exactly the same way.
// ============================
void Init4(DoConsiderProcessorWiseLocal2Global do_consider_proc_wise_local_2_global,
const Internal::Parallelism* parallelism);
void FromPreprocessedInit(LuaOptionFile& god_of_dof_prepartioned_data,
DoConsiderProcessorWiseLocal2Global do_consider_proc_wise_local_2_global,
const Internal::Parallelism* parallelism);
void InitFromPreprocessedData(const MoReFEMDataT& morefem_data);
/*!
* \brief The method that does the heavy bulk of \a InitFromPreprocessedData - once the correct data have been extracted from the input data file.
*
* The perk is that this method is compiled, leaving only a very restrained part in the \a InitFromPreprocessedData method.
*
* \param[in] god_of_dof_prepartioned_data The \a LuaOptionFile which contains the data required to reconstruct properly the \a GodOfDof
* in a run fron preprocessed data. It should really be seen as an input only - the fact it is not const is due to the constraints of the \a LuaOptionFile
* implementation.
*/
void InitFromPreprocessedDataHelper(LuaOptionFile& god_of_dof_prepartioned_data);
// Documentation for some former arguments of Init methods, athat we might need again:
// * \param[out] \copydetails doxygen_hide_dof_list_per_felt_space_arg
// * \param[in] output_directory Output directory for data specific to the mesh covered by the \a GodOfDof.
// * \param[in] parallelism Internal object which holds the parallelism behaviour to use. If none given, might be nullptr.
/*!
* \brief Finalize the initialization of the \a GodOfDof (through \a Init() call).
*
* \copydoc doxygen_hide_do_consider_processor_wise_local_2_global
* \param[in] parallelism Object which holds the parallelism strategy to use. or some of them, additional informations will be written on disk.
*/
void FinalizeInitialization(DoConsiderProcessorWiseLocal2Global do_consider_proc_wise_local_2_global,
const Internal::Parallelism* parallelism);
public:
......@@ -636,10 +627,6 @@ namespace MoReFEM
const std::map<unsigned int, unsigned int>& NprogramWiseDofPerNumberingSubset() const noexcept;
// ============================
//! \endcond IGNORE_BLOCK_IN_DOXYGEN
// ============================
public:
# ifndef NDEBUG
......
......@@ -59,19 +59,21 @@ namespace MoReFEM
}
case Advanced::parallelism_strategy::run_from_preprocessed:
{
InitFromPreprocessedData(morefem_data,
do_consider_proc_wise_local_2_global);
InitFromPreprocessedData(morefem_data);
break;
}
}
}
FinalizeInitialization(do_consider_proc_wise_local_2_global,
morefem_data.GetParallelismPtr());
}
template<class MoReFEMDataT>
void GodOfDof::InitFromPreprocessedData(const MoReFEMDataT& morefem_data,
DoConsiderProcessorWiseLocal2Global do_consider_processor_wise_local_2_global)
void GodOfDof::InitFromPreprocessedData(const MoReFEMDataT& morefem_data)
{
namespace ipl = Utilities::InputDataNS;
......@@ -93,9 +95,7 @@ namespace MoReFEM
LuaOptionFile god_of_dof_prepartitioned_data(god_of_dof_prepartitioned_data_file, __FILE__, __LINE__);
FromPreprocessedInit(god_of_dof_prepartitioned_data,
do_consider_processor_wise_local_2_global,
morefem_data.GetParallelismPtr());
InitFromPreprocessedDataHelper(god_of_dof_prepartitioned_data);
}
......@@ -110,7 +110,7 @@ namespace MoReFEM
Init2(morefem_data);
Init3(do_consider_proc_wise_local_2_global, dof_list_per_felt_space, morefem_data.GetParallelismPtr());
Init3(do_consider_proc_wise_local_2_global, dof_list_per_felt_space);
}
......
......@@ -269,9 +269,7 @@ namespace MoReFEM
} // namespace anonymous
void GodOfDof::FromPreprocessedInit(LuaOptionFile& god_of_dof_prepartitioned_data,
DoConsiderProcessorWiseLocal2Global do_consider_processor_wise_local_2_global,
const Internal::Parallelism* parallelism)
void GodOfDof::InitFromPreprocessedDataHelper(LuaOptionFile& god_of_dof_prepartitioned_data)
{
CreateNodeList();
......@@ -336,9 +334,6 @@ namespace MoReFEM
matrix_pattern_per_numbering_subset_ = ReloadMatrixPatternPerNumberingSubset(god_of_dof_prepartitioned_data,
numbering_subset_list);
Init4(do_consider_processor_wise_local_2_global, parallelism);
}
......
......@@ -163,9 +163,11 @@ namespace MoReFEM::TestNS::LoadPrepartitionedGodOfDofNS
reconstructed_god_of_dof.do_consider_proc_wise_local_2_global_ = DoConsiderProcessorWiseLocal2Global::yes;
#endif // NDEBUG
reconstructed_god_of_dof.FromPreprocessedInit(god_of_dof_prepartitioned_data,
DoConsiderProcessorWiseLocal2Global::yes,
nullptr);
reconstructed_god_of_dof.InitFromPreprocessedDataHelper(god_of_dof_prepartitioned_data);
reconstructed_god_of_dof.FinalizeInitialization(DoConsiderProcessorWiseLocal2Global::yes,
nullptr);
}
}
......
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