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

#836 Libmesh: move lm5 source in a Legacy folder, to keep it at hand should...

#836 Libmesh: move lm5 source in a Legacy folder, to keep it at hand should libmesh6 not work properly. Also rename libmesh wrapper to remove references to the version number.
parent 7b26bef7
......@@ -991,8 +991,8 @@
BE90E1931A24929A00CCAFDE /* UniqueId.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE589C291A160ABD00D23130 /* UniqueId.hxx */; };
BE90E1941A24929A00CCAFDE /* TimeKeep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE2D51D219A736CC00F6D10B /* TimeKeep.cpp */; };
BE90E1951A24929A00CCAFDE /* TimeKeep.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE2D51D319A736CC00F6D10B /* TimeKeep.hpp */; };
BE90E1981A24929A00CCAFDE /* Lm5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE9FE80918CE0A6900177F79 /* Lm5.cpp */; };
BE90E1991A24929A00CCAFDE /* Lm5.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE9FE80A18CE0A6900177F79 /* Lm5.hpp */; };
BE90E1981A24929A00CCAFDE /* Libmesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE9FE80918CE0A6900177F79 /* Libmesh.cpp */; };
BE90E1991A24929A00CCAFDE /* Libmesh.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE9FE80A18CE0A6900177F79 /* Libmesh.hpp */; };
BE90E19E1A24929A00CCAFDE /* Op.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE7DE82619CC537000D24C7D /* Op.cpp */; };
BE90E19F1A24929A00CCAFDE /* Op.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE7DE82719CC537000D24C7D /* Op.hpp */; };
BE90E1A01A24929A00CCAFDE /* Comm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE7DE82A19CC541D00D24C7D /* Comm.cpp */; };
......@@ -4274,8 +4274,8 @@
BE9EA0211B8F159D00B60AC2 /* libHyperelasticity.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHyperelasticity.a; sourceTree = BUILT_PRODUCTS_DIR; };
BE9EBD0B1AADDBAD001B8FC8 /* demo_input_hyperelasticity_3d.lua */ = {isa = PBXFileReference; lastKnownFileType = text; name = demo_input_hyperelasticity_3d.lua; path = Data/Lua/demo_input_hyperelasticity_3d.lua; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; };
BE9EBD0D1AADE038001B8FC8 /* demo_input_heat_1d.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = demo_input_heat_1d.lua; path = Data/Lua/demo_input_heat_1d.lua; sourceTree = SOURCE_ROOT; };
BE9FE80918CE0A6900177F79 /* Lm5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Lm5.cpp; sourceTree = "<group>"; };
BE9FE80A18CE0A6900177F79 /* Lm5.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Lm5.hpp; sourceTree = "<group>"; };
BE9FE80918CE0A6900177F79 /* Libmesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Libmesh.cpp; path = ../Libmesh/Libmesh.cpp; sourceTree = "<group>"; };
BE9FE80A18CE0A6900177F79 /* Libmesh.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Libmesh.hpp; path = ../Libmesh/Libmesh.hpp; sourceTree = "<group>"; };
BE9FE81218CE0A6900177F79 /* Mpi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mpi.cpp; sourceTree = "<group>"; };
BE9FE81318CE0A6900177F79 /* Mpi.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Mpi.hpp; sourceTree = "<group>"; };
BE9FE81418CE0A6900177F79 /* Mpi.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Mpi.hxx; sourceTree = "<group>"; };
......@@ -7105,7 +7105,7 @@
BE9FE7F918CE0A3400177F79 /* Wrappers */ = {
isa = PBXGroup;
children = (
BE9FE80718CE0A6900177F79 /* Lm5 */,
BE9FE80718CE0A6900177F79 /* Libmesh */,
BE9FE80D18CE0A6900177F79 /* Mpi */,
BE9FE81C18CE0A6900177F79 /* Parmetis */,
BE9FE82218CE0A6900177F79 /* Petsc */,
......@@ -7114,12 +7114,13 @@
path = Wrappers;
sourceTree = "<group>";
};
BE9FE80718CE0A6900177F79 /* Lm5 */ = {
BE9FE80718CE0A6900177F79 /* Libmesh */ = {
isa = PBXGroup;
children = (
BE9FE80918CE0A6900177F79 /* Lm5.cpp */,
BE9FE80A18CE0A6900177F79 /* Lm5.hpp */,
BE9FE80918CE0A6900177F79 /* Libmesh.cpp */,
BE9FE80A18CE0A6900177F79 /* Libmesh.hpp */,
);
name = Libmesh;
path = Lm5;
sourceTree = "<group>";
};
......@@ -9231,7 +9232,7 @@
BE4ED31D1A2CBAC400DE374E /* MatrixOperations.hpp in Headers */,
BE90E1B11A24929A00CCAFDE /* Vector.hxx in Headers */,
BEEABA651A49CB5A00A875C6 /* CommandLineOptions.hxx in Headers */,
BE90E1991A24929A00CCAFDE /* Lm5.hpp in Headers */,
BE90E1991A24929A00CCAFDE /* Libmesh.hpp in Headers */,
BEA964931C47DA7F00ADDD5C /* StVenantKirchhoff.hxx in Headers */,
BE90E1651A24926E00CCAFDE /* EnumClass.hpp in Headers */,
BEDEB9271C3C073100B1C71B /* Mumps.hxx in Headers */,
......@@ -11070,7 +11071,7 @@
BE6E4EE11B2ABE8B0049BB2D /* AccessGhostContent.cpp in Sources */,
BEDEB9251C3C073100B1C71B /* Mumps.cpp in Sources */,
BE90E1B21A24929A00CCAFDE /* AccessVectorContent.cpp in Sources */,
BE90E1981A24929A00CCAFDE /* Lm5.cpp in Sources */,
BE90E1981A24929A00CCAFDE /* Libmesh.cpp in Sources */,
BE5B6F8F1C3C16E9004A0284 /* ShellMatrix.cpp in Sources */,
BE41A8D11A24AA7F004E4312 /* Petsc.cpp in Sources */,
BE90E1AF1A24929A00CCAFDE /* Vector.cpp in Sources */,
......
......@@ -18,7 +18,7 @@
# include <iomanip>
# include <memory>
# include "ThirdParty/Wrappers/Lm5/Lm5.hpp"
# include "ThirdParty/Wrappers/Libmesh/Libmesh.hpp"
# include "Utilities/Numeric/Numeric.hpp"
# include "Utilities/Exceptions/Exception.hpp"
......
......@@ -45,7 +45,7 @@ namespace HappyHeart
* - '1' supports only floats
* - '2' throws in doubles
* - '3' removes the 2Go cap for a given file
* The version has been read by dedicated libmesh5 function (or notif the file doesn't exist...)
* The version has been read by dedicated libmesh function (or not if the file doesn't exist...).
* It is used because the version may explain some reading failure
* \param[in] action Either "read" or "write" expected.
* \param[in] invoking_file File that invoked the function or class; usually __FILE__.
......
......@@ -18,7 +18,7 @@
# include <iosfwd>
# include <memory>
# include "ThirdParty/Wrappers/Lm5/Lm5.hpp"
# include "ThirdParty/Wrappers/Libmesh/Libmesh.hpp"
# include "Utilities/Exceptions/Exception.hpp"
......
......@@ -62,7 +62,7 @@ namespace HappyHeart
/*
* \brief Class to read the Medit file
*
* The purpose is to ensure there are no resource leaks: if an exception is thrown the libmesh5 object
* The purpose is to ensure there are no resource leaks: if an exception is thrown the libmesh object
* will automatically be destroyed as the destructor will properly close the file
*
* Some attributes are references to the namesakes in 'GeometricMeshRegion' class: the point of current class is to fill
......@@ -321,7 +321,7 @@ namespace HappyHeart
* \brief Helper to read coords
*
* The point is to write the more concisely possible the possible choices (dim = 2 or 3)
* and whether float or double should be called in libmesh5 interface
* and whether float or double should be called in libmesh interface.
*
* \tparam T Float if version 1 used to create the mesh file being read, double otherwise
* \tparam DimensionT 2 or 3
......@@ -407,8 +407,7 @@ namespace HappyHeart
dimension_read_ = dimension;
}
void MeditRead::ReadGeometricElts(const GeometricMeshRegion& mesh, LabelHelper& label_helper)
{
// Iterate through all registered geometric elements
......@@ -564,7 +563,7 @@ namespace HappyHeart
processor_wise_reindexing.insert(std::make_pair(coords_list[i]->GetIndex(), static_cast<int>(i) + 1));
#ifndef NDEBUG
#ifndef NDEBUG
if (mpi.Nprocessor<int>() == 1)
{
for (const auto& item : processor_wise_reindexing)
......
......@@ -9,7 +9,7 @@
#ifndef HAPPY_HEART_x_GEOMETRY_x_PRIVATE_x_IMPL_x_MESH_FORMAT_HELPER_HPP_
# define HAPPY_HEART_x_GEOMETRY_x_PRIVATE_x_IMPL_x_MESH_FORMAT_HELPER_HPP_
# include "ThirdParty/Wrappers/Lm5/Lm5.hpp"
# include "ThirdParty/Wrappers/Libmesh/Libmesh.hpp"
# include "Utilities/Containers/EnumClass.hpp"
......
......@@ -94,7 +94,7 @@ namespace HappyHeart
const std::vector<int>& coords,
int label_index)
{
Wrappers::Lm5::MeditSetLin<NcoordT>(mesh_index, geometric_elt_code, coords, label_index);
Wrappers::Libmesh::MeditSetLin<NcoordT>(mesh_index, geometric_elt_code, coords, label_index);
}
......@@ -126,7 +126,7 @@ namespace HappyHeart
std::vector<unsigned int>& coords,
int& label_index)
{
Wrappers::Lm5::MeditGetLin<NcoordT>(mesh_index, geometric_elt_code, coords, label_index);
Wrappers::Libmesh::MeditGetLin<NcoordT>(mesh_index, geometric_elt_code, coords, label_index);
}
......
......@@ -4,7 +4,7 @@ import copy
Import('env')
third_party_src_keep_warnings = Split('''
Wrappers/Lm5/Lm5.cpp
Wrappers/Libmesh/Libmesh.cpp
Wrappers/Mpi/Exceptions/Mpi.cpp
Wrappers/Mpi/MacroEncapsulation/Comm.cpp
Wrappers/Mpi/MacroEncapsulation/Op.cpp
......@@ -33,7 +33,7 @@ Wrappers/Seldon/SeldonFunctions.cpp
''')
-- Previously Source/Lm5/libmesh5.c
-- Previously Source/Libmesh/libmesh5.c
third_party_src_filter_out_warnings = Split('''
Source/Lm6/libmesh6.c
......
......@@ -4,9 +4,9 @@ def splitIntoSubTuples(n, theTuple):
def setSpecializationHelper(StreamOut, index):
"""Generates the specializations of Lm5::MeditSetLin for input index and write them in the stream"""
"""Generates the specializations of Libmesh::MeditSetLin for input index and write them in the stream"""
StreamOut.write("template<>\n")
StreamOut.write("void Lm5::MeditSetLin<{0}u>(int mesh_index, GmfKwdCod geometric_elt_code, \n".format(str(index)))
StreamOut.write("void Libmesh::MeditSetLin<{0}u>(int mesh_index, GmfKwdCod geometric_elt_code, \n".format(str(index)))
StreamOut.write("const std::vector<int>& coords, \n")
StreamOut.write("int label_index)\n")
StreamOut.write("{\n")
......@@ -33,9 +33,9 @@ def setSpecializationHelper(StreamOut, index):
def getSpecializationHelper(StreamOut, index):
"""Generates the specializations of Lm5::MeditGetLin for input index and write them in the stream"""
"""Generates the specializations of Libmesh::MeditGetLin for input index and write them in the stream"""
StreamOut.write("template<>\n")
StreamOut.write("void Lm5::MeditGetLin<{0}u>(int mesh_index, GmfKwdCod geometric_elt_code, \n".format(str(index)))
StreamOut.write("void Libmesh::MeditGetLin<{0}u>(int mesh_index, GmfKwdCod geometric_elt_code, \n".format(str(index)))
StreamOut.write("std::vector<unsigned int>& coords, \n")
StreamOut.write("int& label_index)\n")
StreamOut.write("{\n")
......@@ -70,15 +70,15 @@ def getSpecializationHelper(StreamOut, index):
def generateSpecializations(FILE_out, listNumberOfCoords):
"""
Generates all template specializations of Lm5::MeditSetLin and Lm5::MeditGetLin from the list given in input.
Generates all template specializations of Libmesh::MeditSetLin and Libmesh::MeditGetLin from the list given in input.
Typically a new specialization for 10 if you get a message such as:
Undefined symbols for architecture x86_64:
"void Felisce::Private::Lm5::MeditSetLin<10u>(int, GmfKwdCod, std::__1::std::vector<unsigned int, std::__1::allocator<unsigned int> > const&, int)", referenced from:
"void Felisce::Private::Libmesh::MeditSetLin<10u>(int, GmfKwdCod, std::__1::std::vector<unsigned int, std::__1::allocator<unsigned int> > const&, int)", referenced from:
void Felisce::(anonymous namespace)::writeMeditFormatImpl<Felisce::Tetraedre10, 10u>(Felisce::MeditToType<(Felisce::MeditSupport)1>, int, GmfKwdCod, std::__1::std::vector<unsigned int, std::__1::allocator<unsigned int> > const&, int) in tetraedre10.os
\param[in] FILE_out Name of the temporary file to which the generated code will be written. Copy/paste this content into lm5wrapper.cpp inside namespaces Felisce/Private
\param[in] FILE_out Name of the temporary file to which the generated code will be written. Copy/paste this content into proper cpp file.
\param[in] listNumberOfCoords List for which new specializations must be generated.
"""
......@@ -100,5 +100,5 @@ if __name__ == '__main__':
# FILE_out_set = open("GmfSetLinSwitchContent.tmp", "w")
listNumberOfCoords = (2, 3, 4, 6, 8, 9, 10, 27)
generateSpecializations("lm5_cpp.content.txt", listNumberOfCoords)
generateSpecializations("libmesh_cpp.content.txt", listNumberOfCoords)
......@@ -6,7 +6,7 @@
//
//
#include "ThirdParty/Wrappers/Lm5/Lm5.hpp"
#include "ThirdParty/Wrappers/Libmesh/Libmesh.hpp"
#include "Utilities/Containers/Vector.hpp"
......@@ -33,7 +33,7 @@ namespace HappyHeart
// The specializations below are generated by Python script generateFunctions.py
template<>
void Lm5::MeditSetLin<2u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditSetLin<2u>(int mesh_index, GmfKwdCod geometric_elt_code,
const std::vector<int>& coords,
int label_index)
{
......@@ -43,7 +43,7 @@ namespace HappyHeart
template<>
void Lm5::MeditGetLin<2u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditGetLin<2u>(int mesh_index, GmfKwdCod geometric_elt_code,
std::vector<unsigned int>& coords,
int& label_index)
{
......@@ -57,7 +57,7 @@ namespace HappyHeart
template<>
void Lm5::MeditSetLin<3u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditSetLin<3u>(int mesh_index, GmfKwdCod geometric_elt_code,
const std::vector<int>& coords,
int label_index)
{
......@@ -67,7 +67,7 @@ namespace HappyHeart
template<>
void Lm5::MeditGetLin<3u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditGetLin<3u>(int mesh_index, GmfKwdCod geometric_elt_code,
std::vector<unsigned int>& coords,
int& label_index)
{
......@@ -81,7 +81,7 @@ namespace HappyHeart
template<>
void Lm5::MeditSetLin<4u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditSetLin<4u>(int mesh_index, GmfKwdCod geometric_elt_code,
const std::vector<int>& coords,
int label_index)
{
......@@ -91,7 +91,7 @@ namespace HappyHeart
template<>
void Lm5::MeditGetLin<4u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditGetLin<4u>(int mesh_index, GmfKwdCod geometric_elt_code,
std::vector<unsigned int>& coords,
int& label_index)
{
......@@ -105,7 +105,7 @@ namespace HappyHeart
template<>
void Lm5::MeditSetLin<6u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditSetLin<6u>(int mesh_index, GmfKwdCod geometric_elt_code,
const std::vector<int>& coords,
int label_index)
{
......@@ -116,7 +116,7 @@ namespace HappyHeart
template<>
void Lm5::MeditGetLin<6u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditGetLin<6u>(int mesh_index, GmfKwdCod geometric_elt_code,
std::vector<unsigned int>& coords,
int& label_index)
{
......@@ -131,7 +131,7 @@ namespace HappyHeart
template<>
void Lm5::MeditSetLin<8u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditSetLin<8u>(int mesh_index, GmfKwdCod geometric_elt_code,
const std::vector<int>& coords,
int label_index)
{
......@@ -142,7 +142,7 @@ namespace HappyHeart
template<>
void Lm5::MeditGetLin<8u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditGetLin<8u>(int mesh_index, GmfKwdCod geometric_elt_code,
std::vector<unsigned int>& coords,
int& label_index)
{
......@@ -157,7 +157,7 @@ namespace HappyHeart
template<>
void Lm5::MeditSetLin<9u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditSetLin<9u>(int mesh_index, GmfKwdCod geometric_elt_code,
const std::vector<int>& coords,
int label_index)
{
......@@ -168,7 +168,7 @@ namespace HappyHeart
template<>
void Lm5::MeditGetLin<9u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditGetLin<9u>(int mesh_index, GmfKwdCod geometric_elt_code,
std::vector<unsigned int>& coords,
int& label_index)
{
......@@ -183,7 +183,7 @@ namespace HappyHeart
template<>
void Lm5::MeditSetLin<10u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditSetLin<10u>(int mesh_index, GmfKwdCod geometric_elt_code,
const std::vector<int>& coords,
int label_index)
{
......@@ -195,7 +195,7 @@ namespace HappyHeart
template<>
void Lm5::MeditGetLin<10u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditGetLin<10u>(int mesh_index, GmfKwdCod geometric_elt_code,
std::vector<unsigned int>& coords,
int& label_index)
{
......@@ -211,7 +211,7 @@ namespace HappyHeart
template<>
void Lm5::MeditSetLin<27u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditSetLin<27u>(int mesh_index, GmfKwdCod geometric_elt_code,
const std::vector<int>& coords,
int label_index)
{
......@@ -227,7 +227,7 @@ namespace HappyHeart
template<>
void Lm5::MeditGetLin<27u>(int mesh_index, GmfKwdCod geometric_elt_code,
void Libmesh::MeditGetLin<27u>(int mesh_index, GmfKwdCod geometric_elt_code,
std::vector<unsigned int>& coords,
int& label_index)
{
......
......@@ -6,8 +6,8 @@
//
//
#ifndef HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_LM5_x_LM5_HPP_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_LM5_x_LM5_HPP_
#ifndef HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_LIBMESH_x_LIBMESH_HPP_
# define HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_LIBMESH_x_LIBMESH_HPP_
# include <vector>
......@@ -16,7 +16,7 @@
// \attention access to libmesh 5 API should be done only through this current file
// The reason is that library libmesh5.h header is not protected by an include guard.
// The reason is that library libmesh6.h header is not protected by an include guard.
extern "C"
{
#include "ThirdParty/Source/Lm6/libmesh6.h"
......@@ -56,7 +56,7 @@ namespace HappyHeart
* the specializations if someday a new geometric elementis introduced with a number of coords not yet handled.
*/
class Lm5 final
class Libmesh final
{
public:
......@@ -98,4 +98,4 @@ namespace HappyHeart
} // namespace HappyHeart
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_LM5_x_LM5_HPP_
#endif // HAPPY_HEART_x_THIRD_PARTY_x_WRAPPERS_x_LIBMESH_x_LIBMESH_HPP_
......@@ -567,7 +567,7 @@ v14.7:
- Use decltype with UninitializedIndex() whenever possible (code more flexible to type change).
- Most std::size_t have been replaced by unsigned int.
- Unknowns must now correctly specified to the LinearProblem and Model through a template parameter (previously it was hardcoded as displacement no matter what).
- Lm5 wrappers moved from geometry to Utilities::Wrappers.
- Libmesh wrappers moved from geometry to Utilities::Wrappers.
- Utilities: move Seldon-related functions into Wrappers.
- Bug correction: in LinearProblem::SetBoundaryConditionList() the value read from the input parameter file was not correct (the size of a vector was read rather than its content).
- Bug correction: in LinearProblem::AssignTimeConstantBoundaryCondition(), the values weren't correctly assigned for the second condition.
......
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