Commit 5c46274f authored by GILLES Sebastien's avatar GILLES Sebastien

#1249 Model: remove now useless morefem_data aerguments in methods.

parent 886d2b27
......@@ -164,11 +164,9 @@ namespace MoReFEM
* must be implemented in DerivedT::SupplInitialize() (this method must be defined even
* in cases its content is null).
*
* \copydoc doxygen_hide_input_parameter_data_arg
* \copydoc doxygen_hide_do_create_output_dir_arg
*/
void Initialize(const morefem_data_type& input_parameter_data,
create_output_dir do_create_output_dir = create_output_dir::yes);
void Initialize(create_output_dir do_create_output_dir = create_output_dir::yes);
/*!
......@@ -223,13 +221,9 @@ namespace MoReFEM
*
* \endcode
*
* \copydoc doxygen_hide_init_morefem_param
* \copydoc doxygen_hide_do_create_output_dir_arg
*/
void Run(const morefem_data_type& morefem_data,
create_output_dir do_create_output_dir = create_output_dir::yes);
void Run(create_output_dir do_create_output_dir = create_output_dir::yes);
//! Access to the object in charge of transient data.
const TimeManager& GetTimeManager() const;
......@@ -261,17 +255,21 @@ namespace MoReFEM
//! Files will be written every \a GetDisplayValue() time iterations.
unsigned int GetDisplayValue() const;
/*!
* \brief Accessor to the underlying \a MoReFEMData object.
*
* \return Constant reference to the \a MoReFEMData object.
*/
const morefem_data_type& GetMoReFEMData() const noexcept;
private:
/*!
* \brief Go the the next iteration step.
*
*/
void UpdateTime();
//! Print a banner with text, the time and the iteration number
void PrintNewTimeIterationBanner() const;
......@@ -299,12 +297,6 @@ namespace MoReFEM
*/
bool DoPrintBanner() const noexcept;
/*!
* \brief Accessor to the underlying \a MoReFEMData object.
*
* \return Constant reference to the \a MoReFEMData object.
*/
const morefem_data_type& GetMoReFEMData() const noexcept;
private:
......
......@@ -190,11 +190,11 @@ namespace MoReFEM
DoConsiderProcessorWiseLocal2Global DoConsiderProcessorWiseLocal2GlobalT
>
void Model<DerivedT, MoReFEMDataT, DoConsiderProcessorWiseLocal2GlobalT>
::Initialize(const morefem_data_type& morefem_data,
create_output_dir do_create_output_dir)
::Initialize(create_output_dir do_create_output_dir)
{
const auto& mpi = this->GetMpi();
decltype(auto) morefem_data = this->GetMoReFEMData();
decltype(auto) input_parameter_data = morefem_data.GetInputParameterList();
decltype(auto) output_directory = GetOutputDirectory();
......@@ -277,7 +277,7 @@ namespace MoReFEM
}
static_cast<DerivedT&>(*this).SupplInitialize(morefem_data);
static_cast<DerivedT&>(*this).SupplInitialize();
if (do_clear_god_of_dof_temporary_data_after_initialize_)
ClearGodOfDofTemporaryData();
......@@ -369,12 +369,11 @@ namespace MoReFEM
DoConsiderProcessorWiseLocal2Global DoConsiderProcessorWiseLocal2GlobalT
>
void Model<DerivedT, MoReFEMDataT, DoConsiderProcessorWiseLocal2GlobalT>
::Run(const morefem_data_type& morefem_data,
create_output_dir do_create_output_dir)
::Run(create_output_dir do_create_output_dir)
{
auto& crtp_helper = static_cast<DerivedT&>(*this);
crtp_helper.Initialize(morefem_data, do_create_output_dir);
crtp_helper.Initialize(do_create_output_dir);
while (!crtp_helper.HasFinished())
{
......
......@@ -28,10 +28,12 @@ namespace MoReFEM
{ }
void ElasticityModel::SupplInitialize(const morefem_data_type& morefem_data)
void ElasticityModel::SupplInitialize()
{
const auto& god_of_dof = this->GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
const auto& numbering_subset_ptr = god_of_dof.GetNumberingSubsetPtr(EnumUnderlyingType(NumberingSubsetIndex::monolithic));
decltype(auto) morefem_data = parent::GetMoReFEMData();
const auto& numbering_subset_ptr =
god_of_dof.GetNumberingSubsetPtr(EnumUnderlyingType(NumberingSubsetIndex::monolithic));
const auto& numbering_subset = *numbering_subset_ptr;
{
......@@ -39,9 +41,11 @@ namespace MoReFEM
auto&& bc_list = { bc_manager.GetDirichletBoundaryConditionPtr("sole") };
const auto& main_felt_space = god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::highest_dimension));
const auto& main_felt_space =
god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::highest_dimension));
const auto& neumannn_felt_space = god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::neumann));
const auto& unknown = UnknownManager::GetInstance(__FILE__, __LINE__).GetUnknown(EnumUnderlyingType(UnknownIndex::solid_displacement));
decltype(auto) unknown_manager = UnknownManager::GetInstance(__FILE__, __LINE__);
const auto& unknown = unknown_manager.GetUnknown(EnumUnderlyingType(UnknownIndex::solid_displacement));
variational_formulation_ = std::make_unique<variational_formulation_type>(morefem_data,
main_felt_space,
......
......@@ -88,7 +88,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -34,7 +34,7 @@ int main(int argc, char** argv)
try
{
ElasticityNS::ElasticityModel model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -25,10 +25,10 @@ namespace MoReFEM
{ }
void HeatModel::SupplInitialize(const morefem_data_type& morefem_data)
void HeatModel::SupplInitialize()
{
const GodOfDof& god_of_dof = GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
decltype(auto) morefem_data = parent::GetMoReFEMData();
const NumberingSubset& numbering_subset = god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::monolithic));
{
......
......@@ -89,7 +89,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -34,7 +34,7 @@ int main(int argc, char** argv)
try
{
HeatNS::HeatModel model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -21,9 +21,10 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
const auto& god_of_dof = GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
decltype(auto) morefem_data = parent::GetMoReFEMData();
const auto& felt_space_volume =
god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::volume));
......
......@@ -85,9 +85,8 @@ namespace MoReFEM
* \brief Initialise the problem.
*
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -32,7 +32,7 @@ int main(int argc, char** argv)
try
{
MidpointHyperelasticityNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -25,10 +25,10 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
const GodOfDof& god_of_dof = GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
decltype(auto) morefem_data = parent::GetMoReFEMData();
const NumberingSubset& numbering_subset =
god_of_dof.GetNumberingSubset(EnumUnderlyingType(NumberingSubsetIndex::monolithic));
......
......@@ -86,7 +86,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -34,7 +34,7 @@ int main(int argc, char** argv)
try
{
LaplacianNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -21,11 +21,12 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
const auto& god_of_dof = GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
const auto& numbering_subset = god_of_dof.GetNumberingSubset(1);
decltype(auto) morefem_data = parent::GetMoReFEMData();
{
const auto& bc_manager = DirichletBoundaryConditionManager::GetInstance(__FILE__, __LINE__);
......
......@@ -88,9 +88,8 @@ namespace MoReFEM
* \brief Initialise the problem.
*
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -34,7 +34,7 @@ int main(int argc, char** argv)
try
{
RivlinCubeNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -25,7 +25,7 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
const auto& god_of_dof = this->GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
......@@ -46,7 +46,8 @@ namespace MoReFEM
// This form takes care of both monolithic and non monolithic case (in the former front == back...).
constexpr const double uzawa_coupling_term = 15.;
decltype(auto) morefem_data = parent::GetMoReFEMData();
{
const auto& bc_manager = DirichletBoundaryConditionManager::GetInstance(__FILE__, __LINE__);
......
......@@ -82,7 +82,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -34,7 +34,7 @@ int main(int argc, char** argv)
try
{
StokesNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -90,9 +90,8 @@ namespace MoReFEM
*
* This initialisation includes the resolution of the static problem.
*
* \copydoc doxygen_hide_input_parameter_data_arg
*/
void SupplInitialize(const MoReFEMDataT& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -28,10 +28,8 @@ namespace MoReFEM
template<class MoReFEMDataT>
void Model<MoReFEMDataT>::SupplInitialize(const MoReFEMDataT& morefem_data)
void Model<MoReFEMDataT>::SupplInitialize()
{
static_cast<void>(morefem_data);
decltype(auto) god_of_dof = GodOfDofManager::GetInstance(__FILE__, __LINE__).GetGodOfDof(1);
decltype(auto) felt_space = god_of_dof.GetFEltSpace(1);
decltype(auto) unknown = UnknownManager::GetInstance(__FILE__, __LINE__).GetUnknown(1);
......
......@@ -74,7 +74,7 @@ int main(int argc, char** argv)
try
{
RefineMeshNS::Model<morefem_data_type> model(morefem_data);
model.Run(morefem_data, create_output_dir::no);
model.Run(create_output_dir::no);
std::cout << "End of Post-Processing. Refined mesh created." << std::endl;
}
catch(const std::exception& e)
......
......@@ -22,9 +22,10 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
static_cast<void>(morefem_data);
void SupplInitialize();
}
......
......@@ -81,9 +81,8 @@ namespace MoReFEM
* \brief Initialise the problem.
*
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -33,7 +33,7 @@ int main(int argc, char** argv)
try
{
TestVariableTimeStepNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
//input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -30,10 +30,11 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
static_cast<void>(morefem_data);
void SupplInitialize();
auto& manager = Internal::MeshNS::GeometricMeshRegionManager::CreateOrGetInstance(__FILE__, __LINE__);
......
......@@ -88,7 +88,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -38,7 +38,7 @@ int main(int argc, char** argv)
try
{
TestNS::ColoringNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
}
catch(const std::exception& e)
{
......
......@@ -30,7 +30,7 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& )
void Model::SupplInitialize()
{ }
......
......@@ -90,7 +90,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -33,7 +33,7 @@ int main(int argc, char** argv)
try
{
TestNS::CoordsInParallelNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -44,9 +44,10 @@ namespace MoReFEM
} // namespace anonymous
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
static_cast<void>(morefem_data);
void SupplInitialize();
const auto& god_of_dof = GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
......
......@@ -96,7 +96,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -36,7 +36,7 @@ int main(int argc, char** argv)
try
{
DomainListInCoordsNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -51,9 +51,10 @@ namespace MoReFEM
} // namespace anonymous
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
static_cast<void>(morefem_data);
void SupplInitialize();
decltype(auto) lightweigth_domain_manager = Advanced::LightweightDomainListManager::GetInstance(__FILE__, __LINE__);
......
......@@ -95,7 +95,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -36,7 +36,7 @@ int main(int argc, char** argv)
try
{
LightweightDomainListNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -79,9 +79,10 @@ namespace MoReFEM
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
static_cast<void>(morefem_data);
void SupplInitialize();
decltype(auto) god_of_dof = parent::GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
decltype(auto) mpi = parent::GetMpi();
......
......@@ -82,9 +82,8 @@ namespace MoReFEM
* \brief Initialise the problem.
*
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -32,7 +32,7 @@ int main(int argc, char** argv)
try
{
TestNS::MovemeshNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -21,7 +21,7 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& /*morefem_data*/)
void Model::SupplInitialize()
{
decltype(auto) god_of_dof = GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
......
......@@ -84,9 +84,8 @@ namespace MoReFEM
* \brief Initialise the problem.
*
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -34,7 +34,7 @@ int main(int argc, char** argv)
try
{
TestNcoordInDomainNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -21,7 +21,7 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
const auto& god_of_dof = GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
......@@ -34,6 +34,7 @@ namespace MoReFEM
{ bc_manager.GetDirichletBoundaryConditionPtr("face123"),
};
decltype(auto) morefem_data = parent::GetMoReFEMData();
variational_formulation_ =
std::make_unique<VariationalFormulation>(morefem_data,
numbering_subset,
......@@ -45,6 +46,7 @@ namespace MoReFEM
auto& variational_formulation = GetNonCstVariationalFormulation();
const auto& mpi = GetMpi();
decltype(auto) morefem_data = parent::GetMoReFEMData();
variational_formulation.Init(morefem_data.GetInputParameterList());
Wrappers::Petsc::PrintMessageOnFirstProcessor("\n----------------------------------------------\n",
......
......@@ -85,9 +85,8 @@ namespace MoReFEM
* \brief Initialise the problem.
*
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -34,7 +34,7 @@ int main(int argc, char** argv)
try
{
OndomaticNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -102,9 +102,10 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
static_cast<void>(morefem_data);
void SupplInitialize();
using interpolator = ConformInterpolatorNS::SubsetOrSuperset;
......
......@@ -86,9 +86,8 @@ namespace MoReFEM
* \brief Initialise the problem.
*
* This initialisation includes the resolution of the static problem.
* \copydoc doxygen_hide_morefem_data_param
*/
void SupplInitialize(const morefem_data_type& morefem_data);
void SupplInitialize();
//! Manage time iteration.
......
......@@ -34,7 +34,7 @@ int main(int argc, char** argv)
try
{
ConformProjectorNS::Model model(morefem_data);
model.Run(morefem_data);
model.Run();
input_parameter_data.PrintUnused(std::cout);
}
......
......@@ -24,9 +24,10 @@ namespace MoReFEM
{ }
void Model::SupplInitialize(const morefem_data_type& morefem_data)
void Model::SupplInitialize()
{
using type = NonConformInterpolatorNS::FromVertexMatching;
decltype(auto) morefem_data = parent::GetMoReFEMData();
unknown_solid_2_fluid_ =
std::make_unique<type>(morefem_data.GetInputParameterList(),
......
......@@ -88,7 +88,7 @@ namespace MoReFEM
* This initialisation includes the resolution of the static problem.