Commit 49d74ad2 authored by GILLES Sebastien's avatar GILLES Sebastien

#1371 Rename everywhere InputParameterList into InputData.

parent 14efe190
......@@ -224,36 +224,36 @@ These enum classes basically just define compilation constants; we will now use
````
//! \copydoc doxygen_hide_input_parameter_tuple
using InputParameterTuple = std::tuple
using InputDataTuple = std::tuple
<
InputParameter::TimeManager,
InputDataNS::TimeManager,
InputParameter::NumberingSubset<EnumUnderlyingType(NumberingSubsetIndex::monolithic)>,
InputDataNS::NumberingSubset<EnumUnderlyingType(NumberingSubsetIndex::monolithic)>,
InputParameter::Unknown<EnumUnderlyingType(UnknownIndex::displacement)>,
InputDataNS::Unknown<EnumUnderlyingType(UnknownIndex::displacement)>,
InputParameter::Mesh<EnumUnderlyingType(MeshIndex::mesh)>,
InputDataNS::Mesh<EnumUnderlyingType(MeshIndex::mesh)>,
InputParameter::Domain<EnumUnderlyingType(DomainIndex::highest_dimension)>,
InputParameter::Domain<EnumUnderlyingType(DomainIndex::neumann)>,
InputParameter::Domain<EnumUnderlyingType(DomainIndex::dirichlet)>,
InputParameter::Domain<EnumUnderlyingType(DomainIndex::full_mesh)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::highest_dimension)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::neumann)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::dirichlet)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::full_mesh)>,
InputParameter::DirichletBoundaryCondition<EnumUnderlyingType(BoundaryConditionIndex::sole)>,
InputDataNS::DirichletBoundaryCondition<EnumUnderlyingType(BoundaryConditionIndex::sole)>,
InputParameter::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::highest_dimension)>,
InputParameter::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::neumann)>,
InputDataNS::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::highest_dimension)>,
InputDataNS::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::neumann)>,
InputParameter::Petsc<EnumUnderlyingType(SolverIndex::solver)>,
InputDataNS::Petsc<EnumUnderlyingType(SolverIndex::solver)>,
InputParameter::Solid::VolumicMass,
InputParameter::Solid::YoungModulus,
InputParameter::Solid::PoissonRatio,
InputParameter::Solid::PlaneStressStrain,
InputDataNS::Solid::VolumicMass,
InputDataNS::Solid::YoungModulus,
InputDataNS::Solid::PoissonRatio,
InputDataNS::Solid::PlaneStressStrain,
InputParameter::VectorialTransientSource<EnumUnderlyingType(SourceIndex::surfacic)>,
InputDataNS::VectorialTransientSource<EnumUnderlyingType(SourceIndex::surfacic)>,
InputParameter::Result
InputDataNS::Result
>;
````
......@@ -285,7 +285,7 @@ You should get the message:
````
${HOME}/Codes/MoReFEM/CoreLibrary/Sources/ModelInstances/DemoElasticity/demo.lua wasn't existing and has just been created on processor 0; please edit it and then copy it onto all machines intended to run the code in parallel.
Exception caught from MoReFEMData<InputParameterList>: Exception found at Sources/Core/MoReFEMData/MoReFEMData.hxx, line 150: Input parameter file to edit and complete!
Exception caught from MoReFEMData<InputData>: Exception found at Sources/Core/MoReFEMData/MoReFEMData.hxx, line 150: Input parameter file to edit and complete!
````
This is normal: the path for the Lua file was valid but the file didn't exist yet; the choice was made in this case to create a Lua file with the blocks mentioned in the InputData.hpp file and default value written when possible.
......@@ -533,7 +533,7 @@ void Model::SupplInitialize()
}
decltype(auto) variational_formulation = GetNonCstVariationalFormulation();
variational_formulation.Init(morefem_data.GetInputParameterList());
variational_formulation.Init(morefem_data.GetInputData());
}
````
......@@ -647,18 +647,18 @@ void VariationalFormulation::SupplInit(const input_data_type& input_data)
decltype(auto) full_mesh_domain =
domain_manager.GetDomain(EnumUnderlyingType(DomainIndex::full_mesh), __FILE__, __LINE__);
volumic_mass_ = InitScalarParameterFromInputData<InputParameter::Solid::VolumicMass>("Volumic mass",
volumic_mass_ = InitScalarParameterFromInputData<InputDataNS::Solid::VolumicMass>("Volumic mass",
full_mesh_domain,
input_data);
if (!GetVolumicMass().IsConstant())
throw Exception("Current elastic model is restricted to a constant volumic mass!", __FILE__, __LINE__);
young_modulus_ = InitScalarParameterFromInputData<InputParameter::Solid::YoungModulus>("Young modulus",
young_modulus_ = InitScalarParameterFromInputData<InputDataNS::Solid::YoungModulus>("Young modulus",
full_mesh_domain,
input_data);
poisson_ratio_ = InitScalarParameterFromInputData<InputParameter::Solid::PoissonRatio>("Poisson ratio",
poisson_ratio_ = InitScalarParameterFromInputData<InputDataNS::Solid::PoissonRatio>("Poisson ratio",
full_mesh_domain,
input_data);
......@@ -667,7 +667,7 @@ void VariationalFormulation::SupplInit(const input_data_type& input_data)
source_parameter_ = InitThreeDimensionalParameterFromInputData
<
InputParameter::VectorialTransientSource<EnumUnderlyingType(SourceIndex::surfacic)>
InputDataNS::VectorialTransientSource<EnumUnderlyingType(SourceIndex::surfacic)>
>("Surfacic source",
neumann_domain,
input_data);
......@@ -1065,7 +1065,7 @@ Now we're able to assemble the stiffness operator into the stiffness matrix:
````
void VariationalFormulation
::SupplInit(const InputParameterList& input_data)
::SupplInit(const InputData& input_data)
{
...
......@@ -1150,7 +1150,7 @@ inline const GlobalVariationalOperatorNS::Mass& VariationalFormulation
<p><strong><font color="green">In VariationalFormulation.cpp, complete InitializeOperators():</font></strong></p>
````
void VariationalFormulation::InitializeOperators(const InputParameterList& input_data)
void VariationalFormulation::InitializeOperators(const InputData& input_data)
{
...
mass_operator_ = std::make_unique<GlobalVariationalOperatorNS::Mass>(felt_space_highest_dimension,
......
This diff is collapsed.
......@@ -42,7 +42,7 @@
*
* \class doxygen_hide_morefem_data_param
*
* \param[in] morefem_data Object which hold few objects (mpi, input parameter file, Petsc helper and directory into
* \param[in] morefem_data Object which hold few objects (mpi, input data file, Petsc helper and directory into
* which results are stored) that are almost global variables.
*/
......@@ -102,7 +102,7 @@
/*!
* \class doxygen_hide_input_parameter_tuple
* \class doxygen_hide_input_data_tuple
*
* \brief Tuple which enumerates all the quantities that are addressed in the input file.
*
......
......@@ -17,8 +17,8 @@
# include "Utilities/TimeKeep/TimeKeep.hpp"
# include "Utilities/Filesystem/File.hpp"
# include "Core/InputParameterData/InputParameterList.hpp"
# include "Core/InputParameter/Result.hpp"
# include "Core/InputData/InputData.hpp"
# include "Core/InputDataInstances/Result.hpp"
namespace MoReFEM
......
......@@ -9,10 +9,10 @@
/// \addtogroup CoreGroup
/// \{
#ifndef MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_ADVANCED_x_SET_FROM_INPUT_PARAMETER_DATA_HPP_
# define MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_ADVANCED_x_SET_FROM_INPUT_PARAMETER_DATA_HPP_
#ifndef MOREFEM_x_CORE_x_INPUT_DATA_x_ADVANCED_x_SET_FROM_INPUT_DATA_HPP_
# define MOREFEM_x_CORE_x_INPUT_DATA_x_ADVANCED_x_SET_FROM_INPUT_DATA_HPP_
# include "Core/InputParameterData/InputParameterList.hpp"
# include "Core/InputData/InputData.hpp"
namespace MoReFEM
......@@ -31,7 +31,7 @@ namespace MoReFEM
* \brief Create all the instances read from the input parameter data of the type held by \a ManagerT.
*
* \code
* SetFromInputParameterData<DomainManager>(input_data, domain_manager);
* SetFromInputData<DomainManager>(input_data, domain_manager);
* \endcode
*
* iterates through the entries of \a input_data and create all the domains encountered doing so.
......@@ -47,10 +47,10 @@ namespace MoReFEM
template
<
class ManagerT,
class InputParameterDataT,
class InputDataT,
typename... Args
>
void SetFromInputParameterData(const InputParameterDataT& input_data,
void SetFromInputData(const InputDataT& input_data,
ManagerT& manager,
Args&&... args);
......@@ -67,7 +67,7 @@ namespace MoReFEM
/// @} // addtogroup CoreGroup
# include "Core/InputParameterData/Advanced/SetFromInputParameterData.hxx"
# include "Core/InputData/Advanced/SetFromInputData.hxx"
#endif // MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_ADVANCED_x_SET_FROM_INPUT_PARAMETER_DATA_HPP_
#endif // MOREFEM_x_CORE_x_INPUT_DATA_x_ADVANCED_x_SET_FROM_INPUT_DATA_HPP_
......@@ -9,8 +9,8 @@
/// \addtogroup CoreGroup
/// \{
#ifndef MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_ADVANCED_x_SET_FROM_INPUT_PARAMETER_DATA_HXX_
# define MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_ADVANCED_x_SET_FROM_INPUT_PARAMETER_DATA_HXX_
#ifndef MOREFEM_x_CORE_x_INPUT_DATA_x_ADVANCED_x_SET_FROM_INPUT_DATA_HXX_
# define MOREFEM_x_CORE_x_INPUT_DATA_x_ADVANCED_x_SET_FROM_INPUT_DATA_HXX_
namespace MoReFEM
......@@ -24,10 +24,10 @@ namespace MoReFEM
template
<
class ManagerT,
class InputParameterDataT,
class InputDataT,
typename... Args
>
void SetFromInputParameterData(const InputParameterDataT& input_data,
void SetFromInputData(const InputDataT& input_data,
ManagerT& manager,
Args&&... args)
{
......@@ -36,18 +36,18 @@ namespace MoReFEM
manager.Create(section, std::forward<Args>(args)...);
};
namespace ipl = Internal::InputParameterListNS;
namespace ipl = Internal::InputDataNS;
using input_parameter_tuple_iteration =
using input_data_tuple_iteration =
ipl::TupleIteration
<
typename InputParameterDataT::Tuple,
typename InputDataT::Tuple,
0,
std::tuple_size<typename InputParameterDataT::Tuple>::value
std::tuple_size<typename InputDataT::Tuple>::value
>;
input_parameter_tuple_iteration
::template ActIfSection<typename ManagerT::input_parameter_type>(input_data.GetTuple(),
input_data_tuple_iteration
::template ActIfSection<typename ManagerT::input_data_type>(input_data.GetTuple(),
create);
}
......@@ -61,4 +61,4 @@ namespace MoReFEM
/// @} // addtogroup CoreGroup
#endif // MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_ADVANCED_x_SET_FROM_INPUT_PARAMETER_DATA_HXX_
#endif // MOREFEM_x_CORE_x_INPUT_DATA_x_ADVANCED_x_SET_FROM_INPUT_DATA_HXX_
target_sources(${MOREFEM_CORE}
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/SetFromInputData.hpp"
"${CMAKE_CURRENT_LIST_DIR}/SetFromInputData.hxx"
)
......@@ -9,14 +9,14 @@
/// \addtogroup CoreGroup
/// \{
#ifndef MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_INPUT_PARAMETER_LIST_HPP_
# define MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_INPUT_PARAMETER_LIST_HPP_
#ifndef MOREFEM_x_CORE_x_INPUT_DATA_x_INPUT_DATA_HPP_
# define MOREFEM_x_CORE_x_INPUT_DATA_x_INPUT_DATA_HPP_
# include <type_traits>
# include <map>
# include <string>
# include "Utilities/InputParameterList/Base.hpp"
# include "Utilities/InputData/Base.hpp"
# include "Utilities/Exceptions/Exception.hpp"
# include "Utilities/Containers/Print.hpp"
......@@ -42,13 +42,13 @@ namespace MoReFEM
*
*/
template<class TupleT>
class InputParameterList : public Utilities::InputParameterListNS::Base<InputParameterList<TupleT>, TupleT>
class InputData : public Utilities::InputDataNS::Base<InputData<TupleT>, TupleT>
{
public:
//! Alias to unique smart pointers.
using const_unique_ptr = std::unique_ptr<const InputParameterList>;
using const_unique_ptr = std::unique_ptr<const InputData>;
//! Special members.
//@{
......@@ -64,25 +64,25 @@ namespace MoReFEM
* purposes (namely mesh-related ones).
* \copydoc doxygen_hide_mpi_param
*/
explicit InputParameterList(const std::string& filename,
explicit InputData(const std::string& filename,
const Wrappers::Mpi& mpi,
Utilities::InputParameterListNS::DoTrackUnusedFields do_track_unused_fields =
Utilities::InputParameterListNS::DoTrackUnusedFields::yes);
Utilities::InputDataNS::DoTrackUnusedFields do_track_unused_fields =
Utilities::InputDataNS::DoTrackUnusedFields::yes);
//! Destructor
~InputParameterList() = default;
~InputData() = default;
//! Copy constructor.
InputParameterList(const InputParameterList&) = delete;
InputData(const InputData&) = delete;
//! Move constructor.
InputParameterList(InputParameterList&&) = delete;
InputData(InputData&&) = delete;
//! Copy affectation.
InputParameterList& operator=(const InputParameterList&) = delete;
InputData& operator=(const InputData&) = delete;
//! Move affectation.
InputParameterList& operator=(InputParameterList&&) = delete;
InputData& operator=(InputData&&) = delete;
//@}
......@@ -108,7 +108,7 @@ namespace MoReFEM
/// @} // addtogroup CoreGroup
# include "Core/InputParameterData/InputParameterList.hxx"
# include "Core/InputData/InputData.hxx"
#endif // MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_INPUT_PARAMETER_LIST_HPP_
#endif // MOREFEM_x_CORE_x_INPUT_DATA_x_INPUT_DATA_HPP_
......@@ -9,8 +9,8 @@
/// \addtogroup CoreGroup
/// \{
#ifndef MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_INPUT_PARAMETER_LIST_HXX_
# define MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_INPUT_PARAMETER_LIST_HXX_
#ifndef MOREFEM_x_CORE_x_INPUT_DATA_x_INPUT_DATA_HXX_
# define MOREFEM_x_CORE_x_INPUT_DATA_x_INPUT_DATA_HXX_
namespace MoReFEM
......@@ -19,10 +19,10 @@ namespace MoReFEM
template<class TupleT>
InputParameterList<TupleT>::InputParameterList(const std::string& filename,
InputData<TupleT>::InputData(const std::string& filename,
const Wrappers::Mpi& mpi,
Utilities::InputParameterListNS::DoTrackUnusedFields do_track_unused_fields)
: Utilities::InputParameterListNS::Base<InputParameterList, TupleT>(filename,
Utilities::InputDataNS::DoTrackUnusedFields do_track_unused_fields)
: Utilities::InputDataNS::Base<InputData, TupleT>(filename,
mpi,
do_track_unused_fields)
{
......@@ -33,12 +33,12 @@ namespace MoReFEM
// template<class TupleT>
// void InputParameterList<TupleT>::CheckVariableConsistency() const
// void InputData<TupleT>::CheckVariableConsistency() const
// {
// using SubTuple = std::tuple
// <
// InputParameter::Variable::Variable,
// InputParameter::Variable::DegreeOfExactness
// InputData::Variable::Variable,
// InputData::Variable::DegreeOfExactness
// >;
//
// this->template EnsureSameLength<SubTuple>();
......@@ -46,12 +46,12 @@ namespace MoReFEM
// template<class TupleT>
// void InputParameterList<TupleT>::CheckBoundaryConditionConsistency() const
// void InputData<TupleT>::CheckBoundaryConditionConsistency() const
// {
// using SubTuple = std::tuple
// <
// InputParameter::BoundaryCondition::Variable,
// InputParameter::BoundaryCondition::Component
// InputData::BoundaryCondition::Variable,
// InputData::BoundaryCondition::Component
// >;
//
// this->template EnsureSameLength<SubTuple>();
......@@ -65,4 +65,4 @@ namespace MoReFEM
/// @} // addtogroup CoreGroup
#endif // MOREFEM_x_CORE_x_INPUT_PARAMETER_DATA_x_INPUT_PARAMETER_LIST_HXX_
#endif // MOREFEM_x_CORE_x_INPUT_DATA_x_INPUT_DATA_HXX_
target_sources(${MOREFEM_CORE}
PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hpp"
"${CMAKE_CURRENT_LIST_DIR}/InputParameterList.hxx"
"${CMAKE_CURRENT_LIST_DIR}/InputData.hpp"
"${CMAKE_CURRENT_LIST_DIR}/InputData.hxx"
)
include(${CMAKE_CURRENT_LIST_DIR}/Advanced/SourceList.cmake)
......@@ -9,14 +9,14 @@
/// \addtogroup CoreGroup
/// \{
#include "Core/InputParameter/Crtp/Section.hpp"
#include "Core/InputDataInstances/Crtp/Section.hpp"
namespace MoReFEM
{
namespace InputParameter
namespace InputDataNS
{
......@@ -35,7 +35,7 @@ namespace MoReFEM
} // namespace Impl
} // namespace InputParameter
} // namespace InputDataNS
} // namespace MoReFEM
......
......@@ -9,26 +9,25 @@
/// \addtogroup CoreGroup
/// \{
#ifndef MOREFEM_x_CORE_x_INPUT_PARAMETER_x_CRTP_x_SECTION_HPP_
# define MOREFEM_x_CORE_x_INPUT_PARAMETER_x_CRTP_x_SECTION_HPP_
#ifndef MOREFEM_x_CORE_x_INPUT_DATA_INSTANCES_x_CRTP_x_SECTION_HPP_
# define MOREFEM_x_CORE_x_INPUT_DATA_INSTANCES_x_CRTP_x_SECTION_HPP_
# include <string>
# include "Utilities/InputParameterList/Crtp/Section.hpp"
# include "Utilities/InputParameterList/Crtp/InputParameter.hpp"
# include "Utilities/InputData/Crtp/Section.hpp"
# include "Utilities/InputData/Crtp/Data.hpp"