Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit dffeba58 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1525 Rename the Model of the PetscVectorIO test to underling it isn't a true...

#1525 Rename the Model of the PetscVectorIO test to underling it isn't a true Model... The include dependency to Model.hpp has logically be removed as well and replaced by the required includes.
parent 86354266
......@@ -4770,11 +4770,11 @@
BEF795D322DDBDB20054B192 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BEF795D422DDBE540054B192 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
BEF795D522DDBE550054B192 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BEF795D622DDBFCD0054B192 /* Model.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Model.cpp; sourceTree = "<group>"; };
BEF795D622DDBFCD0054B192 /* ToyModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ToyModel.cpp; sourceTree = "<group>"; };
BEF795D722DDBFCD0054B192 /* InputData.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = InputData.hpp; sourceTree = "<group>"; };
BEF795D822DDBFCD0054B192 /* Model.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Model.hpp; sourceTree = "<group>"; };
BEF795D822DDBFCD0054B192 /* ToyModel.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = ToyModel.hpp; sourceTree = "<group>"; };
BEF795D922DDBFCD0054B192 /* demo.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = demo.lua; sourceTree = "<group>"; };
BEF795DA22DDBFCD0054B192 /* Model.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Model.hxx; sourceTree = "<group>"; };
BEF795DA22DDBFCD0054B192 /* ToyModel.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = ToyModel.hxx; sourceTree = "<group>"; };
BEF795DD22DDDE430054B192 /* BinaryOrAscii.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = BinaryOrAscii.hpp; sourceTree = "<group>"; };
BEF8E7362487E0F500C3EE7A /* demo_rerun.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = demo_rerun.lua; sourceTree = "<group>"; };
BEF9835B180451CF00E7905D /* Factory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Factory.cpp; sourceTree = "<group>"; };
......@@ -10632,9 +10632,9 @@
BEF795D922DDBFCD0054B192 /* demo.lua */,
BEF795D722DDBFCD0054B192 /* InputData.hpp */,
BEF795D422DDBE540054B192 /* main.cpp */,
BEF795D622DDBFCD0054B192 /* Model.cpp */,
BEF795D822DDBFCD0054B192 /* Model.hpp */,
BEF795DA22DDBFCD0054B192 /* Model.hxx */,
BEF795D622DDBFCD0054B192 /* ToyModel.cpp */,
BEF795D822DDBFCD0054B192 /* ToyModel.hpp */,
BEF795DA22DDBFCD0054B192 /* ToyModel.hxx */,
);
path = VectorIO;
sourceTree = "<group>";
......@@ -19,6 +19,9 @@
# include <vector>
# include <map>
# include "Geometry/Domain/Advanced/LightweightDomainListManager.hpp"
# include "FiniteElement/BoundaryConditions/DirichletBoundaryConditionManager.hpp"
# include "FiniteElement/FiniteElementSpace/FEltSpace.hpp"
# include "FiniteElement/FiniteElementSpace/GodOfDofManager.hpp"
......
add_executable(MoReFEMTestPetscVectorIO
${CMAKE_CURRENT_LIST_DIR}/main.cpp
${CMAKE_CURRENT_LIST_DIR}/InputData.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.cpp
${CMAKE_CURRENT_LIST_DIR}/Model.hpp
${CMAKE_CURRENT_LIST_DIR}/Model.hxx
${CMAKE_CURRENT_LIST_DIR}/ToyModel.cpp
${CMAKE_CURRENT_LIST_DIR}/ToyModel.hpp
${CMAKE_CURRENT_LIST_DIR}/ToyModel.hxx
)
target_link_libraries(MoReFEMTestPetscVectorIO
......
......@@ -17,7 +17,10 @@
#include "ThirdParty/Wrappers/Petsc/Vector/AccessVectorContent.hpp"
#include "ThirdParty/IncludeWithoutWarning/Boost/Test.hpp"
#include "Test/ThirdParty/PETSc/VectorIO/Model.hpp"
#include "Model/Internal/InitializeHelper.hpp"
#include "Model/Internal/CreateMeshDataDirectory.hpp"
#include "Test/ThirdParty/PETSc/VectorIO/ToyModel.hpp"
namespace MoReFEM::TestNS::PetscNS::VectorIONS
......@@ -28,7 +31,7 @@ namespace MoReFEM::TestNS::PetscNS::VectorIONS
{
std::string ComputeProcessorWiseAsciiFile(const Model& model)
std::string ComputeProcessorWiseAsciiFile(const ToyModel& model)
{
std::ostringstream oconv;
oconv << model.GetOutputDirectory() << "/vector_"
......@@ -37,7 +40,7 @@ namespace MoReFEM::TestNS::PetscNS::VectorIONS
}
std::string ComputeProcessorWiseBinaryFile(const Model& model)
std::string ComputeProcessorWiseBinaryFile(const ToyModel& model)
{
std::ostringstream oconv;
oconv << model.GetOutputDirectory() << "/vector_"
......@@ -46,7 +49,7 @@ namespace MoReFEM::TestNS::PetscNS::VectorIONS
}
std::string ComputeProgramWiseAsciiFile(const Model& model)
std::string ComputeProgramWiseAsciiFile(const ToyModel& model)
{
std::ostringstream oconv;
oconv << model.GetOutputDirectory() << "/program_wise_vector.m";
......@@ -59,7 +62,7 @@ namespace MoReFEM::TestNS::PetscNS::VectorIONS
}
std::string ComputeProgramWiseBinaryFile(const Model& model)
std::string ComputeProgramWiseBinaryFile(const ToyModel& model)
{
std::ostringstream oconv;
oconv << model.GetOutputDirectory() << "/program_wise_vector.bin";
......@@ -87,8 +90,8 @@ namespace MoReFEM::TestNS::PetscNS::VectorIONS
} // namespace anonymous
Model::Model(const morefem_data_type& morefem_data)
: Crtp::CrtpMpi<Model>(morefem_data.GetMpi()),
ToyModel::ToyModel(const morefem_data_type& morefem_data)
: Crtp::CrtpMpi<ToyModel>(morefem_data.GetMpi()),
output_directory_(ExtractResultDirectory(morefem_data))
{
decltype(auto) mpi = GetMpi();
......@@ -151,28 +154,28 @@ namespace MoReFEM::TestNS::PetscNS::VectorIONS
}
const std::string& Model::GetProcessorWiseBinaryFile() const noexcept
const std::string& ToyModel::GetProcessorWiseBinaryFile() const noexcept
{
static auto ret = ComputeProcessorWiseBinaryFile(*this);
return ret;
}
const std::string& Model::GetProcessorWiseAsciiFile() const noexcept
const std::string& ToyModel::GetProcessorWiseAsciiFile() const noexcept
{
static auto ret = ComputeProcessorWiseAsciiFile(*this);
return ret;
}
const std::string& Model::GetProgramWiseBinaryFile() const noexcept
const std::string& ToyModel::GetProgramWiseBinaryFile() const noexcept
{
static auto ret = ComputeProgramWiseBinaryFile(*this);
return ret;
}
const std::string& Model::GetProgramWiseAsciiFile() const noexcept
const std::string& ToyModel::GetProgramWiseAsciiFile() const noexcept
{
static auto ret = ComputeProgramWiseAsciiFile(*this);
return ret;
......
......@@ -8,13 +8,14 @@
*/
#ifndef MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_MODEL_HPP_
# define MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_MODEL_HPP_
#ifndef MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_TOY_MODEL_HPP_
# define MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_TOY_MODEL_HPP_
# include <memory>
# include <vector>
# include "Core/InputData/Instances/Result.hpp"
# include "Core/LinearAlgebra/GlobalVector.hpp"
# include "Test/ThirdParty/PETSc/VectorIO/InputData.hpp"
......@@ -28,22 +29,20 @@ namespace MoReFEM
/*!
* \brief Toy model used to perform tests about reconstruction of a \a Mesh from pre-partitioned data.
* \brief Toy model used to perform tests about I/O operations related to \a GlobalVector.
*
* This test must be run in parallel; its principle is to:
* - Initialize the model normally (including separating the mesh among all mpi processors and reducing it).
* - Write the data related to the partition of said mesh.
* - Load from the data written a new mesh.
* - Check both mesh are indistinguishable.
* This toy model role is to:
* - Initialize the data (including partitioning among the different ranks in the case of parallel run)
* - Create and store a \a GlobalVector onto which different I/O operations will be performed.
* - Set filenames for output files and ensure these files don't exist at first - they will be created by the tests themselves.
*/
//! \copydoc doxygen_hide_model_4_test
class Model : public Crtp::CrtpMpi<Model>
class ToyModel : public Crtp::CrtpMpi<ToyModel>
{
private:
//! \copydoc doxygen_hide_alias_self
using self = Model;
using self = ToyModel;
public:
......@@ -61,22 +60,22 @@ namespace MoReFEM
*
* \copydoc doxygen_hide_morefem_data_param
*/
Model(const morefem_data_type& morefem_data);
ToyModel(const morefem_data_type& morefem_data);
//! Destructor.
~Model() = default;
~ToyModel() = default;
//! \copydoc doxygen_hide_copy_constructor
Model(const Model& rhs) = delete;
ToyModel(const ToyModel& rhs) = delete;
//! \copydoc doxygen_hide_move_constructor
Model(Model&& rhs) = delete;
ToyModel(ToyModel&& rhs) = delete;
//! \copydoc doxygen_hide_copy_affectation
Model& operator=(const Model& rhs) = delete;
ToyModel& operator=(const ToyModel& rhs) = delete;
//! \copydoc doxygen_hide_move_affectation
Model& operator=(Model&& rhs) = delete;
ToyModel& operator=(ToyModel&& rhs) = delete;
///@}
......@@ -115,7 +114,7 @@ namespace MoReFEM
} // namespace MoReFEM
#include "Test/ThirdParty/PETSc/VectorIO/Model.hxx"
#include "Test/ThirdParty/PETSc/VectorIO/ToyModel.hxx"
#endif // MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_MODEL_HPP_
#endif // MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_TOY_MODEL_HPP_
......@@ -8,8 +8,8 @@
*/
#ifndef MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_MODEL_HXX_
# define MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_MODEL_HXX_
#ifndef MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_TOY_MODEL_HXX_
# define MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_TOY_MODEL_HXX_
namespace MoReFEM
......@@ -20,14 +20,14 @@ namespace MoReFEM
{
inline const GlobalVector& Model::GetVector() const noexcept
inline const GlobalVector& ToyModel::GetVector() const noexcept
{
assert(!(!vector_));
return *vector_;
}
inline const FilesystemNS::Directory& Model::GetOutputDirectory() const noexcept
inline const FilesystemNS::Directory& ToyModel::GetOutputDirectory() const noexcept
{
return output_directory_;
}
......@@ -39,4 +39,4 @@ namespace MoReFEM
} // namespace MoReFEM
#endif // MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_MODEL_HXX_
#endif // MOREFEM_x_TEST_x_THIRD_PARTY_x_P_E_T_SC_x_VECTOR_I_O_x_TOY_MODEL_HXX_
......@@ -21,7 +21,7 @@
#include "Core/MoReFEMData/MoReFEMData.hpp"
#include "Test/Tools/Fixture/Model.hpp"
#include "Test/ThirdParty/PETSc/VectorIO/Model.hpp"
#include "Test/ThirdParty/PETSc/VectorIO/ToyModel.hpp"
using namespace MoReFEM;
......@@ -44,7 +44,7 @@ namespace // anonymous
using fixture_type =
TestNS::FixtureNS::Model
<
TestNS::PetscNS::VectorIONS::Model,
TestNS::PetscNS::VectorIONS::ToyModel,
LuaFile,
TestNS::FixtureNS::call_run_method_at_first_call::no
>;
......
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