Commit 4dd32968 authored by GILLES Sebastien's avatar GILLES Sebastien

#1210 Increase the role of InitMoReFEM, which has been renamed here MoReFEMData().

parent 7ab3ac63
This diff is collapsed.
......@@ -5,27 +5,18 @@
/// Created by Sebastien Gilles <sebastien.gilles@inria.fr> on the Wed, 7 Jan 2015 14:19:22 +0100
/// Copyright (c) Inria. All rights reserved.
///
/// \ingroup CoreGroup
/// \addtogroup CoreGroup
/// \{
#ifndef MOREFEM_x_CORE_x_INIT_TIME_KEEP_LOG_HXX_
# define MOREFEM_x_CORE_x_INIT_TIME_KEEP_LOG_HXX_
#include "InitTimeKeepLog.hpp"
namespace MoReFEM
{
template<class InputParameterDataT>
void InitTimeKeepLog(const Wrappers::Mpi& mpi,
const InputParameterDataT& input_parameter_data)
const std::string& result_directory)
{
namespace IPL = Utilities::InputParameterListNS;
using Result = InputParameter::Result;
decltype(auto) result_directory = IPL::Extract<Result::OutputDirectory>::Folder(input_parameter_data);
std::string time_log_filename;
{
......@@ -43,9 +34,3 @@ namespace MoReFEM
} // namespace MoReFEM
/// @} // addtogroup CoreGroup
#endif // MOREFEM_x_CORE_x_INIT_TIME_KEEP_LOG_HXX_
......@@ -35,11 +35,11 @@ namespace MoReFEM
* This function is to be called early in your main if you want to time keep some information lines.
*
* \copydetails doxygen_hide_mpi_param
* \copydoc doxygen_hide_input_parameter_data_arg
* \param[in] result_directory Directory into which all outputs should be written. It is assumed to exist when
* it is given to this function.
*/
template<class InputParameterDataT>
void InitTimeKeepLog(const Wrappers::Mpi& mpi,
const InputParameterDataT& input_parameter_data);
const std::string& result_directory);
......@@ -52,7 +52,4 @@ namespace MoReFEM
/// @} // addtogroup CoreGroup
# include "Core/InitTimeKeepLog.hxx"
#endif // MOREFEM_x_CORE_x_INIT_TIME_KEEP_LOG_HPP_
......@@ -41,7 +41,10 @@ namespace MoReFEM
static std::string ret("Directory in which all the results will be written. This path may use the "
"environment variable MOREFEM_RESULT_DIR, which is either provided in user's "
"environment or automatically set to '/Volumes/Data/${USER}/Morefem/Results' "
"in MoReFEM initialization step.");
"in MoReFEM initialization step. Please do not read this value directly: it "
"might have been extended in MoReFEMData class! Rather call the GetResultDirectory() "
"from this class."
);
return ret;
}
......
......@@ -22,6 +22,9 @@
# include "Utilities/Mpi/Mpi.hpp"
# include "Core/MoReFEMData/MoReFEMData.hpp" // not used here directly, but all models which include current header
// nedd this one at the same time.
namespace MoReFEM
{
......@@ -38,6 +41,17 @@ namespace MoReFEM
* \param[in] input_parameter_data Object which hold the values of all the parameters defined in
* the input file.
*/
/*!
*
* \class doxygen_hide_init_morefem_param
*
* \param[in] morefem_data The object which encapsulates some stuff that acts as global data, such as:
* - The content of the input parameter data.
* - Mpi related informations.
* - The directory into which output is to be written.
*/
/*!
......
......@@ -9,8 +9,8 @@
/// \addtogroup CoreGroup
/// \{
#ifndef MOREFEM_x_CORE_x_INIT_MO_RE_F_E_M_HPP_
# define MOREFEM_x_CORE_x_INIT_MO_RE_F_E_M_HPP_
#ifndef MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_MO_RE_F_E_M_DATA_HPP_
# define MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_MO_RE_F_E_M_DATA_HPP_
# include "ThirdParty/Wrappers/Mpi/Mpi.hpp"
......@@ -57,7 +57,7 @@ namespace MoReFEM
Utilities::InputParameterListNS::DoTrackUnusedFields DoTrackUnusedFieldsT = Utilities::InputParameterListNS::DoTrackUnusedFields::yes,
class AdditionalCommandLineArgumentsT = std::false_type
>
class InitMoReFEM
class MoReFEMData
{
public:
......@@ -65,23 +65,30 @@ namespace MoReFEM
/// \name Special members.
///@{
//! Constructor.
explicit InitMoReFEM(int argc, char** argv);
/*!
* \brief Constructor.
*
* \param[in] argc Number of argument in the command line (including the program name).
* \param[in] argv List of arguments read.
* \param[in] suppl_result_subdir If not empty, add to the path read in the input parameter file the subdir
* specified here. The whole directory is created if it doesn't exist already.
*/
explicit MoReFEMData(int argc, char** argv, std::string&& suppl_result_subdir = "");
//! Destructor.
~InitMoReFEM();
~MoReFEMData();
//! Copy constructor.
InitMoReFEM(const InitMoReFEM&) = delete;
MoReFEMData(const MoReFEMData&) = delete;
//! Move constructor.
InitMoReFEM(InitMoReFEM&&) = delete;
MoReFEMData(MoReFEMData&&) = delete;
//! Copy affectation.
InitMoReFEM& operator=(const InitMoReFEM&) = delete;
MoReFEMData& operator=(const MoReFEMData&) = delete;
//! Move affectation.
InitMoReFEM& operator=(InitMoReFEM&&) = delete;
MoReFEMData& operator=(MoReFEMData&&) = delete;
///@}
......@@ -91,6 +98,8 @@ namespace MoReFEM
//! Accessor to underlying InputParameterList object.
const InputParameterDataT& GetInputParameterList() const;
//! Accessor to the result directory, in which all the outputs of MoReFEM should be written.
const std::string& GetResultDirectory() const;
private:
......@@ -103,6 +112,9 @@ namespace MoReFEM
//! Holds InputParameterList.
typename InputParameterDataT::const_unique_ptr input_parameter_data_ = nullptr;
//! Result directory, in which all the outputs of MoReFEM should be written.
std::string result_directory_;
};
......@@ -115,7 +127,7 @@ namespace MoReFEM
/// @} // addtogroup CoreGroup
# include "Core/InitMoReFEM.hxx"
# include "Core/MoReFEMData/MoReFEMData.hxx"
#endif // MOREFEM_x_CORE_x_INIT_MO_RE_F_E_M_HPP_
#endif // MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_MO_RE_F_E_M_DATA_HPP_
......@@ -9,8 +9,8 @@
/// \addtogroup CoreGroup
/// \{
#ifndef MOREFEM_x_CORE_x_INIT_MO_RE_F_E_M_HXX_
# define MOREFEM_x_CORE_x_INIT_MO_RE_F_E_M_HXX_
#ifndef MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_MO_RE_F_E_M_DATA_HXX_
# define MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_MO_RE_F_E_M_DATA_HXX_
namespace MoReFEM
......@@ -23,8 +23,8 @@ namespace MoReFEM
Utilities::InputParameterListNS::DoTrackUnusedFields DoTrackUnusedFieldsT,
class AdditionalCommandLineArgumentsT
>
InitMoReFEM<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>
::InitMoReFEM(int argc, char** argv)
MoReFEMData<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>
::MoReFEMData(int argc, char** argv, std::string&& suppl_result_subdir)
{
Wrappers::Mpi::InitEnvironment(argc, argv);
......@@ -146,7 +146,22 @@ namespace MoReFEM
mpi,
DoTrackUnusedFieldsT);
InitTimeKeepLog(mpi, GetInputParameterList());
namespace ipl = Utilities::InputParameterListNS;
using Result = InputParameter::Result;
result_directory_ = ipl::Extract<Result::OutputDirectory>::Folder(*input_parameter_data_);
if (!suppl_result_subdir.empty())
{
result_directory_ += "/" + suppl_result_subdir;
if (mpi.IsRootProcessor() && !FilesystemNS::Folder::DoExist(result_directory_))
FilesystemNS::Folder::Create(result_directory_, __FILE__, __LINE__);
mpi.Barrier();
}
InitTimeKeepLog(mpi, result_directory_);
}
......@@ -156,8 +171,8 @@ namespace MoReFEM
Utilities::InputParameterListNS::DoTrackUnusedFields DoTrackUnusedFieldsT,
class AdditionalCommandLineArgumentsT
>
InitMoReFEM<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>
::~InitMoReFEM()
MoReFEMData<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>
::~MoReFEMData()
{
// Flush all the standard outputs. Catch all exceptions: exceptions in destructor are naughty!
......@@ -170,7 +185,7 @@ namespace MoReFEM
}
catch (const std::exception& e)
{
std::cerr << "Untimely exception caught in ~InitMoReFEM(): " << e.what() << std::endl;
std::cerr << "Untimely exception caught in ~MoReFEMData(): " << e.what() << std::endl;
assert(false && "No exception in destructors!");
}
catch (...)
......@@ -195,7 +210,7 @@ namespace MoReFEM
class AdditionalCommandLineArgumentsT
>
inline const Wrappers::Mpi&
InitMoReFEM<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>
MoReFEMData<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>
::GetMpi() const
{
assert(!(!mpi_));
......@@ -209,17 +224,30 @@ namespace MoReFEM
Utilities::InputParameterListNS::DoTrackUnusedFields DoTrackUnusedFieldsT,
class AdditionalCommandLineArgumentsT
>
const InputParameterDataT& InitMoReFEM<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>::GetInputParameterList() const
const InputParameterDataT& MoReFEMData<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>::GetInputParameterList() const
{
assert(!(!input_parameter_data_));
return *input_parameter_data_;
}
template
<
class InputParameterDataT,
Utilities::InputParameterListNS::DoTrackUnusedFields DoTrackUnusedFieldsT,
class AdditionalCommandLineArgumentsT
>
const std::string& MoReFEMData<InputParameterDataT, DoTrackUnusedFieldsT, AdditionalCommandLineArgumentsT>
::GetResultDirectory() const
{
return result_directory_;
}
} // namespace MoReFEM
/// @} // addtogroup CoreGroup
#endif // MOREFEM_x_CORE_x_INIT_MO_RE_F_E_M_HXX_
#endif // MOREFEM_x_CORE_x_MO_RE_F_E_M_DATA_x_MO_RE_F_E_M_DATA_HXX_
......@@ -8,6 +8,7 @@ custom = imp.load_source('custom_scons_functions', '{0}/custom_scons_functions.p
core_src = Split('''
./InitTimeKeepLog.cpp
./EnsightCaseReader/EnsightCaseReader.cpp
./InputParameter/Crtp/Section.cpp
./InputParameter/DirichletBoundaryCondition/Impl/DirichletBoundaryCondition.cpp
......
......@@ -29,19 +29,19 @@ namespace MoReFEM
const auto& matrix_pattern = god_of_dof.GetMatrixPattern(row_numbering_subset, col_numbering_subset);
const auto& mpi_morefem = god_of_dof.GetMpi();
const auto& mpi = god_of_dof.GetMpi();
const unsigned int Nrow_processor_wise_dof = god_of_dof.NprocessorWiseDof(row_numbering_subset);
const unsigned int Ncolumn_processor_wise_dof = god_of_dof.NprocessorWiseDof(col_numbering_subset);
namespace Petsc = Wrappers::Petsc;
const unsigned int Nproc = mpi_morefem.template Nprocessor<unsigned int>();
const unsigned int Nproc = mpi.template Nprocessor<unsigned int>();
if (Nproc == 1)
{
matrix.InitSequentialMatrix(Nrow_processor_wise_dof, Ncolumn_processor_wise_dof,
matrix_pattern, mpi_morefem,
matrix_pattern, mpi,
__FILE__, __LINE__);
}
else
......@@ -52,7 +52,7 @@ namespace MoReFEM
matrix.InitParallelMatrix(Nrow_processor_wise_dof, Ncolumn_processor_wise_dof,
Nrow_program_wise_dof, Ncolumn_program_wise_dof,
matrix_pattern,
mpi_morefem,
mpi,
__FILE__, __LINE__);
}
......@@ -95,16 +95,16 @@ namespace MoReFEM
// Now fill the structure of the matrix as in AllocateGlobalMatrix().
// ===================================================
const auto& mpi_morefem = god_of_dof.GetMpi();
const auto& mpi = god_of_dof.GetMpi();
namespace Petsc = Wrappers::Petsc;
const unsigned int Nproc = mpi_morefem.template Nprocessor<unsigned int>();
const unsigned int Nproc = mpi.template Nprocessor<unsigned int>();
if (Nproc == 1)
{
matrix.InitSequentialMatrix(Nrow_proc_wise, Nrow_proc_wise,
diagonal_pattern, mpi_morefem,
diagonal_pattern, mpi,
__FILE__, __LINE__);
}
else
......@@ -114,7 +114,7 @@ namespace MoReFEM
matrix.InitParallelMatrix(Nrow_proc_wise, Nrow_proc_wise,
Nrow_program_wise, Nrow_program_wise,
diagonal_pattern,
mpi_morefem,
mpi,
__FILE__, __LINE__);
}
......@@ -126,7 +126,7 @@ namespace MoReFEM
void AllocateGlobalVector(const GodOfDof& god_of_dof,
GlobalVector& vector)
{
const auto& mpi_morefem = god_of_dof.GetMpi();
const auto& mpi = god_of_dof.GetMpi();
const auto& numbering_subset = vector.GetNumberingSubset();
......@@ -134,10 +134,10 @@ namespace MoReFEM
namespace Petsc = Wrappers::Petsc;
const unsigned int Nproc = mpi_morefem.template Nprocessor<unsigned int>();
const unsigned int Nproc = mpi.template Nprocessor<unsigned int>();
if (Nproc == 1)
vector.InitSequentialVector(Nprocessor_wise_dof, mpi_morefem, __FILE__, __LINE__);
vector.InitSequentialVector(Nprocessor_wise_dof, mpi, __FILE__, __LINE__);
else
{
std::vector<PetscInt> ghosted_dof_index_list;
......@@ -163,7 +163,7 @@ namespace MoReFEM
vector.InitMpiVectorWithGhost(Nprocessor_wise_dof,
Nprogram_wise_dof,
ghosted_dof_index_list,
mpi_morefem,
mpi,
__FILE__, __LINE__);
}
......
......@@ -131,12 +131,13 @@ namespace MoReFEM
* class, and this class knows this call must occur (it is already coded once and for all in its internals).
*
* \copydetails doxygen_hide_mpi_param
\copydetails doxygen_hide_time_manager_arg
* \copydetails doxygen_hide_time_manager_arg
* \param[in] god_of_dof God of dof into which the formulation works.
* \param[in] boundary_condition_list List of Dirichlet boundary conditions to take into account in the
* variational formulation.
*/
VariationalFormulation(const Wrappers::Mpi& mpi,
template<class MoReFEMDataT>
VariationalFormulation(const MoReFEMDataT& morefem_data,
TimeManager& time_manager,
const GodOfDof& god_of_dof,
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list);
......@@ -168,10 +169,9 @@ namespace MoReFEM
* Must be called immediately after the constructor (but it is already taken care of - see constructor
* help for more details).
*
* \copydoc doxygen_hide_input_parameter_data_arg
*/
template<class InputParameterDataT>
void Init(const InputParameterDataT& input_parameter_data);
template<class MoReFEMDataT>
void Init(const MoReFEMDataT& morefem_data);
public:
......@@ -426,6 +426,15 @@ namespace MoReFEM
public:
/*!
* \brief Get the directory into which all outputs are written.
*
* It is assumed to already exist when this call is made.
*
* \return Directory into which all outputs are written.
*/
const std::string& GetResultDirectory() const noexcept;
/*!
* \brief Returns the output directory into which solutions for \a numbering_subset are written.
......@@ -614,6 +623,8 @@ namespace MoReFEM
///@}
//! Directory into which all outputs are written.
const std::string& result_directory_;
//! Felisce transient parameters.
TimeManager& time_manager_;
......
......@@ -23,12 +23,14 @@ namespace MoReFEM
class DerivedT,
unsigned int SolverIndexT
>
template<class MoReFEMDataT>
VariationalFormulation<DerivedT, SolverIndexT>
::VariationalFormulation(const Wrappers::Mpi& mpi,
::VariationalFormulation(const MoReFEMDataT& morefem_data,
TimeManager& time_manager,
const GodOfDof& god_of_dof,
DirichletBoundaryCondition::vector_shared_ptr&& boundary_condition_list)
: Crtp::CrtpMpi<VariationalFormulation<DerivedT, SolverIndexT>>(mpi),
: Crtp::CrtpMpi<VariationalFormulation<DerivedT, SolverIndexT>>(morefem_data.GetMpi()),
result_directory_(morefem_data.GetResultDirectory()),
time_manager_(time_manager),
snes_(nullptr),
god_of_dof_(god_of_dof),
......@@ -764,7 +766,18 @@ namespace MoReFEM
{
return GetGodOfDof().GetOutputDirectoryForNumberingSubset(numbering_subset);
}
template
<
class DerivedT,
unsigned int SolverIndexT
>
const std::string& VariationalFormulation<DerivedT, SolverIndexT>
::GetResultDirectory() const noexcept
{
return result_directory_;
}
template
<
......
......@@ -21,6 +21,7 @@
# include "ThirdParty/Wrappers/Petsc/Print.hpp"
# include "ThirdParty/Wrappers/Petsc/Vector/Internal/CheckUpdateGhostManager.hpp"
# include "Core/MoReFEMData/MoReFEMData.hpp"
# include "Core/InputParameterData/Advanced/SetFromInputParameterData.hpp"
# include "Core/NumberingSubset/Internal/NumberingSubsetManager.hpp"
# include "Core/TimeManager/TimeManagerInstance.hpp"
......@@ -94,13 +95,12 @@ namespace MoReFEM
* steps (for instance VariationalFormulation or dof numebering are fully built there).
*
* \param[in] mpi Object in charge of mpi.
* \copydoc doxygen_hide_input_parameter_data_arg
* \copydoc doxygen_hide_init_morefem_param
* \param[in] a_create_domain_list_for_coords Whether the model will compute the list of domains a coord is in or not.
*
*/
template<class InputParameterDataT>
explicit Model(const Wrappers::Mpi& mpi,
const InputParameterDataT& input_parameter_data,
template<class MorefemDataT>
explicit Model(const MorefemDataT& morefem_data,
create_domain_list_for_coords a_create_domain_list_for_coords = create_domain_list_for_coords::no);
......@@ -205,8 +205,8 @@ namespace MoReFEM
* \copydoc doxygen_hide_input_parameter_data_arg
* \copydoc doxygen_hide_do_create_output_dir_arg
*/
template<class InputParameterDataT>
void Run(const InputParameterDataT& input_parameter_data,
template<class MoReFEMDataT>
void Run(const MoReFEMDataT& morefem_data,
create_output_dir do_create_output_dir = create_output_dir::yes);
......@@ -277,7 +277,7 @@ namespace MoReFEM
TimeManager::unique_ptr time_manager_ = nullptr;
//! Output directory.
std::string output_directory_;
const std::string& output_directory_;
//! Files will be written every \a display_value_ time iteration. Choose 1 to write all of them.
unsigned int display_value_;
......
......@@ -18,11 +18,11 @@ namespace MoReFEM
template<class DerivedT, DoConsiderProcessorWiseLocal2Global DoConsiderProcessorWiseLocal2GlobalT>
template<class InputParameterDataT>
Model<DerivedT, DoConsiderProcessorWiseLocal2GlobalT>::Model(const Wrappers::Mpi& a_mpi,
const InputParameterDataT& input_parameter_data,
template<class MorefemDataT>
Model<DerivedT, DoConsiderProcessorWiseLocal2GlobalT>::Model(const MorefemDataT& morefem_data,
create_domain_list_for_coords a_create_domain_list_for_coords)
: Crtp::CrtpMpi<Model<DerivedT, DoConsiderProcessorWiseLocal2GlobalT>>(a_mpi)
: Crtp::CrtpMpi<Model<DerivedT, DoConsiderProcessorWiseLocal2GlobalT>>(morefem_data.GetMpi()),
output_directory_(morefem_data.GetResultDirectory())
{
if (a_create_domain_list_for_coords == create_domain_list_for_coords::yes)
Coords::SetCreateDomainListForCoords();
......@@ -34,6 +34,8 @@ namespace MoReFEM
namespace IPL = Utilities::InputParameterListNS;
using TimeManager = InputParameter::TimeManager;
using Result = InputParameter::Result;
decltype(auto) input_parameter_data = morefem_data.GetInputParameterList();
decltype(auto) time_evolution_policy =
IPL::Extract<TimeManager::TimeEvolutionPolicy>::Value(input_parameter_data);
......@@ -54,8 +56,6 @@ namespace MoReFEM
const auto& mpi = this->GetMpi();
output_directory_ = IPL::Extract<Result::OutputDirectory>::Folder(input_parameter_data);
if (mpi.IsRootProcessor())
{
{
......@@ -160,12 +160,15 @@ namespace MoReFEM
template<class DerivedT, DoConsiderProcessorWiseLocal2Global DoConsiderProcessorWiseLocal2GlobalT>
template<class InputParameterDataT>
template<class MoReFEMDataT>
void Model<DerivedT, DoConsiderProcessorWiseLocal2GlobalT>
::Initialize(const InputParameterDataT& input_parameter_data,
::Initialize(const MoReFEMDataT& morefem_data,
create_output_dir do_create_output_dir)
{
const auto& mpi = this->GetMpi();
decltype(auto) input_parameter_data = morefem_data.GetInputParameterList();
decltype(auto) output_directory = GetOutputDirectory();
const bool is_root_processor = mpi.IsRootProcessor();
......@@ -244,7 +247,7 @@ namespace MoReFEM
}
static_cast<DerivedT&>(*this).SupplInitialize(input_parameter_data);
static_cast<DerivedT&>(*this).SupplInitialize(morefem_data);
if (do_clear_god_of_dof_temporary_data_after_initialize_)
ClearGodOfDofTemporaryData();
......@@ -312,13 +315,13 @@ namespace MoReFEM
template<class DerivedT, DoConsiderProcessorWiseLocal2Global DoConsiderProcessorWiseLocal2GlobalT>
template<class InputParameterDataT>
void Model<DerivedT, DoConsiderProcessorWiseLocal2GlobalT>::Run(const InputParameterDataT& input_parameter_data,
template<class MoReFEMDataT>
void Model<DerivedT, DoConsiderProcessorWiseLocal2GlobalT>::Run(const MoReFEMDataT& morefem_data,
create_output_dir do_create_output_dir)
{
auto& crtp_helper = static_cast<DerivedT&>(*this);
crtp_helper.Initialize(input_parameter_data, do_create_output_dir);
crtp_helper.Initialize(morefem_data, do_create_output_dir);
while (!crtp_helper.HasFinished())
{
......
......@@ -22,14 +22,13 @@ namespace MoReFEM
{
ElasticityModel::ElasticityModel(const Wrappers::Mpi& mpi_ptr,
const InputParameterList& input_parameter_data)
: parent(mpi_ptr, input_parameter_data),
ElasticityModel::ElasticityModel(const morefem_data_type& morefem_data)
: parent(morefem_data),
variational_formulation_(nullptr)
{ }
void ElasticityModel::SupplInitialize(const InputParameterList& input_parameter_data)
void ElasticityModel::SupplInitialize(const morefem_data_type& morefem_data)
{
const auto& god_of_dof = this->GetGodOfDof(EnumUnderlyingType(MeshIndex::mesh));
const auto& numbering_subset_ptr = god_of_dof.GetNumberingSubsetPtr(EnumUnderlyingType(NumberingSubsetIndex::monolithic));
......@@ -44,7 +43,7 @@ namespace MoReFEM
const auto& neumannn_felt_space = god_of_dof.GetFEltSpace(EnumUnderlyingType(FEltSpaceIndex::neumann));
const auto& unknown = UnknownManager::GetInstance().GetUnknown(EnumUnderlyingType(UnknownIndex::solid_displacement));
variational_formulation_ = std::make_unique<variational_formulation_type>(GetMpi(),
variational_formulation_ = std::make_unique<variational_formulation_type>(morefem_data,
main_felt_space,
neumannn_felt_space,
unknown,
......@@ -55,7 +54,7 @@ namespace MoReFEM
}
auto& formulation = this->GetNonCstVariationalFormulation();
formulation.Init(input_parameter_data);
formulation.Init(morefem_data.GetInputParameterList());
const auto& mpi = this->GetMpi();
......
......@@ -54,8 +54,7 @@ namespace MoReFEM
*
* \copydetails doxygen_hide_mpi_param
*/
ElasticityModel(const Wrappers::Mpi& mpi,
const InputParameterList& input_parameter_data);
ElasticityModel(const morefem_data_type& morefem_data);
//! Destructor.
~ElasticityModel() = default;
......@@ -84,7 +83,7 @@ namespace MoReFEM
*
* This initialisation includes the resolution of the static problem.
*/
void SupplInitialize(const InputParameterList& input_parameter_data);
void SupplInitialize(const morefem_data_type& morefem_data);