Commit 73b589c6 authored by GILLES Sebastien's avatar GILLES Sebastien

#1443 Roll back to previous interface of loading prepartitioned mesh for the time being.

parent 646a577a
......@@ -528,6 +528,8 @@
BE35030A22F2E96700D09A4D /* Directory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE35030722F2E96700D09A4D /* Directory.cpp */; };
BE35030B22F2E96700D09A4D /* Directory.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE35030822F2E96700D09A4D /* Directory.hxx */; };
BE35030C22F2E96700D09A4D /* Directory.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE35030922F2E96700D09A4D /* Directory.hpp */; };
BE35031422F3503A00D09A4D /* PrepartitionedData.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE35031222F3503900D09A4D /* PrepartitionedData.hpp */; };
BE35031522F3503A00D09A4D /* PrepartitionedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE35031322F3503A00D09A4D /* PrepartitionedData.cpp */; };
BE353B9A22E7527100A06A8F /* Extract.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE353B9722E7527100A06A8F /* Extract.hxx */; };
BE353B9B22E7527100A06A8F /* Extract.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE353B9822E7527100A06A8F /* Extract.hpp */; };
BE353B9F22E7539E00A06A8F /* Enum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE353B9C22E7539E00A06A8F /* Enum.cpp */; };
......@@ -3452,6 +3454,8 @@
BE35030F22F30E6E00D09A4D /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BE35031022F30E8300D09A4D /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
BE35031122F30FAA00D09A4D /* test.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = test.cpp; sourceTree = "<group>"; };
BE35031222F3503900D09A4D /* PrepartitionedData.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = PrepartitionedData.hpp; sourceTree = "<group>"; };
BE35031322F3503A00D09A4D /* PrepartitionedData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrepartitionedData.cpp; sourceTree = "<group>"; };
BE353B9722E7527100A06A8F /* Extract.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Extract.hxx; sourceTree = "<group>"; };
BE353B9822E7527100A06A8F /* Extract.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Extract.hpp; sourceTree = "<group>"; };
BE353B9C22E7539E00A06A8F /* Enum.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Enum.cpp; sourceTree = "<group>"; };
......@@ -7455,6 +7459,8 @@
BE4D0C9921A2E4F900E0D4E7 /* DirichletBoundaryCondition */,
BE4D0CF421A2E4F900E0D4E7 /* Result.cpp */,
BE4D0C9721A2E4F900E0D4E7 /* Result.hpp */,
BE35031322F3503A00D09A4D /* PrepartitionedData.cpp */,
BE35031222F3503900D09A4D /* PrepartitionedData.hpp */,
BE4D0CF521A2E4F900E0D4E7 /* InitialConditionGate.cpp */,
BE4D0C5A21A2E4F800E0D4E7 /* InitialConditionGate.hpp */,
BE4D0C9821A2E4F900E0D4E7 /* OutputDeformedMesh.hpp */,
......@@ -10978,6 +10984,7 @@
BE4D0D8021A2E4F900E0D4E7 /* Domain.hpp in Headers */,
BE4D0D4A21A2E4F900E0D4E7 /* RectangularSourceTimeParameter.hpp in Headers */,
BE4D0D7B21A2E4F900E0D4E7 /* LightweightDomainList.hpp in Headers */,
BE35031422F3503A00D09A4D /* PrepartitionedData.hpp in Headers */,
BE4D0D4221A2E4F900E0D4E7 /* SpatialFunction.hxx in Headers */,
BE7E555322EF507A00BEA053 /* Parallelism.hxx in Headers */,
BE4D0D3921A2E4F900E0D4E7 /* Petsc.hpp in Headers */,
......@@ -12652,6 +12659,7 @@
BE4D0D5721A2E4F900E0D4E7 /* C_i_Mu_i.cpp in Sources */,
BE4D0D6121A2E4F900E0D4E7 /* Kappa1.cpp in Sources */,
BE4D0D6721A2E4F900E0D4E7 /* Fluid.cpp in Sources */,
BE35031522F3503A00D09A4D /* PrepartitionedData.cpp in Sources */,
BE4D0D7021A2E4F900E0D4E7 /* ElectricalActivation.cpp in Sources */,
BE4D0D4721A2E4F900E0D4E7 /* RectangularSourceTimeParameter.cpp in Sources */,
BE4D0D5B21A2E4F900E0D4E7 /* Viscosity.cpp in Sources */,
......@@ -34,7 +34,7 @@ namespace MoReFEM
const std::string& PrepartitionedData::Directory::NameInFile()
{
static std::string ret("Directory");
static std::string ret("directory");
return ret;
}
......
......@@ -115,16 +115,14 @@ namespace MoReFEM
void MeshManager::LoadFromPrepartitionedData(const ::MoReFEM::Wrappers::Mpi& mpi,
unsigned int unique_id,
LuaOptionFile& prepartitioned_data)
const std::string& mesh_file,
LuaOptionFile& prepartitioned_data,
unsigned dimension,
::MoReFEM::MeshNS::Format format)
{
double space_unit {};
bool do_build_edges, do_build_faces, do_build_volumes;
unsigned int mesh_dimension {};
std::string mesh_file, mesh_format;
prepartitioned_data.Read("mesh_file", "", mesh_file, __FILE__, __LINE__);
prepartitioned_data.Read("mesh_dimension", "", mesh_dimension, __FILE__, __LINE__);
prepartitioned_data.Read("mesh_format", "", mesh_format, __FILE__, __LINE__);
prepartitioned_data.Read("space_unit", "", space_unit, __FILE__, __LINE__);
prepartitioned_data.Read("do_build_edges", "", do_build_edges, __FILE__, __LINE__);
prepartitioned_data.Read("do_build_faces", "", do_build_faces, __FILE__, __LINE__);
......@@ -136,8 +134,8 @@ namespace MoReFEM
unique_id,
mesh_file,
prepartitioned_data,
mesh_dimension,
Internal::MeshNS::FormatNS::GetType(mesh_format),
dimension,
format,
space_unit,
do_build_edges ? Mesh::BuildEdge::yes : Mesh::BuildEdge::no,
do_build_faces ? Mesh::BuildFace::yes : Mesh::BuildFace::no,
......
......@@ -134,6 +134,7 @@ namespace MoReFEM
* \brief Create a new Mesh from data that were computed in a previous run.
*
* \copydoc doxygen_hide_mpi_param
* \copydoc doxygen_hide_mesh_constructor_5
* \param[in] unique_id Unique identifier of the \a Mesh to be created.
* \param[in] prepartitioned_data Lua file which gives the data needed to reconstruct the data
* from pre-computed partitioned data. Note: it is not const as such objects relies on a Lua stack
......@@ -143,7 +144,10 @@ namespace MoReFEM
*/
void LoadFromPrepartitionedData(const ::MoReFEM::Wrappers::Mpi& mpi,
unsigned int unique_id,
LuaOptionFile& prepartitioned_data);
const std::string& mesh_file,
LuaOptionFile& prepartitioned_data,
unsigned dimension,
::MoReFEM::MeshNS::Format format);
/*!
......
......@@ -50,7 +50,10 @@ namespace MoReFEM::TestNS::LoadPrepartitionedMeshNS
mesh_manager.LoadFromPrepartitionedData(mpi,
10,
mesh_prepartitioned_data);
partition_data_facility.GetReducedMeshFile(),
mesh_prepartitioned_data,
mesh.GetDimension(),
MeshNS::Format::Medit);
}
......
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