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

#887 Geometry/Mesh: put into internal namespace/directory almost all that...

#887 Geometry/Mesh: put into internal namespace/directory almost all that should be hidden for casual users (reading of formats could be handled by free functions but it will be for a later time).
parent 2c4fc7ae
......@@ -195,11 +195,16 @@
BE0AD2751CC182AD0086EDF7 /* GeometricMeshRegion.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD26B1CC182AD0086EDF7 /* GeometricMeshRegion.hxx */; };
BE0AD2761CC182AD0086EDF7 /* GeometricMeshRegion__Ensight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0AD26C1CC182AD0086EDF7 /* GeometricMeshRegion__Ensight.cpp */; };
BE0AD2771CC182AD0086EDF7 /* GeometricMeshRegion__Medit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0AD26D1CC182AD0086EDF7 /* GeometricMeshRegion__Medit.cpp */; };
BE0AD2781CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0AD26E1CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.cpp */; };
BE0AD2791CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD26F1CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.hpp */; };
BE0AD27A1CC182AD0086EDF7 /* GeometricMeshRegionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0AD2701CC182AD0086EDF7 /* GeometricMeshRegionManager.cpp */; };
BE0AD27B1CC182AD0086EDF7 /* GeometricMeshRegionManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD2711CC182AD0086EDF7 /* GeometricMeshRegionManager.hpp */; };
BE0AD27C1CC182AD0086EDF7 /* GeometricMeshRegionManager.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD2721CC182AD0086EDF7 /* GeometricMeshRegionManager.hxx */; };
BE0AD2781CC182AD0086EDF7 /* ComputeColoring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0AD26E1CC182AD0086EDF7 /* ComputeColoring.cpp */; };
BE0AD2791CC182AD0086EDF7 /* ComputeColoring.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD26F1CC182AD0086EDF7 /* ComputeColoring.hpp */; };
BE0AD2811CC188CB0086EDF7 /* GeometricMeshRegionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0AD27E1CC188CB0086EDF7 /* GeometricMeshRegionManager.cpp */; };
BE0AD2821CC188CB0086EDF7 /* GeometricMeshRegionManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD27F1CC188CB0086EDF7 /* GeometricMeshRegionManager.hpp */; };
BE0AD2831CC188CB0086EDF7 /* GeometricMeshRegionManager.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD2801CC188CB0086EDF7 /* GeometricMeshRegionManager.hxx */; };
BE0AD2841CC189BD0086EDF7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEC37E0617DDC0210021BFB7 /* Accelerate.framework */; };
BE0AD2851CC189D00086EDF7 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEC37E0617DDC0210021BFB7 /* Accelerate.framework */; };
BE0AD2961CC18A950086EDF7 /* Coloring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0AD2931CC18A950086EDF7 /* Coloring.cpp */; };
BE0AD2971CC18A950086EDF7 /* Coloring.hpp in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD2941CC18A950086EDF7 /* Coloring.hpp */; };
BE0AD2981CC18A950086EDF7 /* Coloring.hxx in Headers */ = {isa = PBXBuildFile; fileRef = BE0AD2951CC18A950086EDF7 /* Coloring.hxx */; };
BE0B0BE11C6A196C0038A9B9 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE0B0BD51C6A19130038A9B9 /* main.cpp */; };
BE0B0BE21C6A19800038A9B9 /* libCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE05B52916D238FE000E248D /* libCore.a */; };
BE0B0BE31C6A19800038A9B9 /* libElasticity-lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE65A1A81BBD2AFE00E99115 /* libElasticity-lib.a */; };
......@@ -628,7 +633,6 @@
BE62B14F1B00900D006CEF5F /* libFiniteElement.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE9C4D121807F5DC005B94BC /* libFiniteElement.a */; };
BE62B1501B00900D006CEF5F /* libGeometry.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE05B4DD16D23573000E248D /* libGeometry.a */; };
BE62B1511B00900D006CEF5F /* libUtilities.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEA8A379177AD4FE009436C9 /* libUtilities.a */; };
BE62B1521B00900D006CEF5F /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEC37E0617DDC0210021BFB7 /* Accelerate.framework */; };
BE6322D11B1852B500F787CC /* libOperators.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BECA4B941B1756DE00DC7265 /* libOperators.a */; };
BE6322D21B18548F00F787CC /* libOperators.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BECA4B941B1756DE00DC7265 /* libOperators.a */; };
BE6322D31B185E7600F787CC /* libOperators.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BECA4B941B1756DE00DC7265 /* libOperators.a */; };
......@@ -4313,11 +4317,14 @@
BE0AD26B1CC182AD0086EDF7 /* GeometricMeshRegion.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GeometricMeshRegion.hxx; sourceTree = "<group>"; };
BE0AD26C1CC182AD0086EDF7 /* GeometricMeshRegion__Ensight.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeometricMeshRegion__Ensight.cpp; sourceTree = "<group>"; };
BE0AD26D1CC182AD0086EDF7 /* GeometricMeshRegion__Medit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeometricMeshRegion__Medit.cpp; sourceTree = "<group>"; };
BE0AD26E1CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeometricMeshRegion_Connectivity.cpp; sourceTree = "<group>"; };
BE0AD26F1CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GeometricMeshRegion_Connectivity.hpp; sourceTree = "<group>"; };
BE0AD2701CC182AD0086EDF7 /* GeometricMeshRegionManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeometricMeshRegionManager.cpp; sourceTree = "<group>"; };
BE0AD2711CC182AD0086EDF7 /* GeometricMeshRegionManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GeometricMeshRegionManager.hpp; sourceTree = "<group>"; };
BE0AD2721CC182AD0086EDF7 /* GeometricMeshRegionManager.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GeometricMeshRegionManager.hxx; sourceTree = "<group>"; };
BE0AD26E1CC182AD0086EDF7 /* ComputeColoring.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComputeColoring.cpp; sourceTree = "<group>"; };
BE0AD26F1CC182AD0086EDF7 /* ComputeColoring.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ComputeColoring.hpp; sourceTree = "<group>"; };
BE0AD27E1CC188CB0086EDF7 /* GeometricMeshRegionManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeometricMeshRegionManager.cpp; sourceTree = "<group>"; };
BE0AD27F1CC188CB0086EDF7 /* GeometricMeshRegionManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GeometricMeshRegionManager.hpp; sourceTree = "<group>"; };
BE0AD2801CC188CB0086EDF7 /* GeometricMeshRegionManager.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GeometricMeshRegionManager.hxx; sourceTree = "<group>"; };
BE0AD2931CC18A950086EDF7 /* Coloring.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Coloring.cpp; sourceTree = "<group>"; };
BE0AD2941CC18A950086EDF7 /* Coloring.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Coloring.hpp; sourceTree = "<group>"; };
BE0AD2951CC18A950086EDF7 /* Coloring.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Coloring.hxx; sourceTree = "<group>"; };
BE0B0BD51C6A19130038A9B9 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
BE0B0BDA1C6A192A0038A9B9 /* Poromechanics */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Poromechanics; sourceTree = BUILT_PRODUCTS_DIR; };
BE0B0C041C6A19C40038A9B9 /* InputParameterList.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = InputParameterList.hpp; sourceTree = "<group>"; };
......@@ -5945,6 +5952,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BE0AD2851CC189D00086EDF7 /* Accelerate.framework in Frameworks */,
BEE79A4C1C995BF500F05519 /* libSeldon.a in Frameworks */,
BE61998E1B0F64DF00906290 /* libParameters.a in Frameworks */,
BEFEEB7F1AFBA21500C6341E /* libOps.a in Frameworks */,
......@@ -6094,6 +6102,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BE0AD2841CC189BD0086EDF7 /* Accelerate.framework in Frameworks */,
BEE79A571C995C2000F05519 /* libSeldon.a in Frameworks */,
BE6322D21B18548F00F787CC /* libOperators.a in Frameworks */,
BE6199871B0F64C400906290 /* libParameters.a in Frameworks */,
......@@ -6103,7 +6112,6 @@
BE62B14F1B00900D006CEF5F /* libFiniteElement.a in Frameworks */,
BE62B1501B00900D006CEF5F /* libGeometry.a in Frameworks */,
BE62B1511B00900D006CEF5F /* libUtilities.a in Frameworks */,
BE62B1521B00900D006CEF5F /* Accelerate.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -6717,15 +6725,26 @@
BE0AD26B1CC182AD0086EDF7 /* GeometricMeshRegion.hxx */,
BE0AD26C1CC182AD0086EDF7 /* GeometricMeshRegion__Ensight.cpp */,
BE0AD26D1CC182AD0086EDF7 /* GeometricMeshRegion__Medit.cpp */,
BE0AD26E1CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.cpp */,
BE0AD26F1CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.hpp */,
BE0AD2701CC182AD0086EDF7 /* GeometricMeshRegionManager.cpp */,
BE0AD2711CC182AD0086EDF7 /* GeometricMeshRegionManager.hpp */,
BE0AD2721CC182AD0086EDF7 /* GeometricMeshRegionManager.hxx */,
BE0AD26E1CC182AD0086EDF7 /* ComputeColoring.cpp */,
BE0AD26F1CC182AD0086EDF7 /* ComputeColoring.hpp */,
BE0AD27D1CC188CB0086EDF7 /* Internal */,
);
path = Mesh;
sourceTree = "<group>";
};
BE0AD27D1CC188CB0086EDF7 /* Internal */ = {
isa = PBXGroup;
children = (
BE0AD27E1CC188CB0086EDF7 /* GeometricMeshRegionManager.cpp */,
BE0AD27F1CC188CB0086EDF7 /* GeometricMeshRegionManager.hpp */,
BE0AD2801CC188CB0086EDF7 /* GeometricMeshRegionManager.hxx */,
BE0AD2931CC18A950086EDF7 /* Coloring.cpp */,
BE0AD2941CC18A950086EDF7 /* Coloring.hpp */,
BE0AD2951CC18A950086EDF7 /* Coloring.hxx */,
);
path = Internal;
sourceTree = "<group>";
};
BE1345B019CC1DAC003ED11A /* Exceptions */ = {
isa = PBXGroup;
children = (
......@@ -10311,7 +10330,8 @@
BE90DFC01A24915500CCAFDE /* Interface.hpp in Headers */,
BE90E03C1A24915500CCAFDE /* Hexahedron20.hpp in Headers */,
BE90E05E1A24915500CCAFDE /* GeometricEltFactory.hpp in Headers */,
BE0AD2791CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.hpp in Headers */,
BE0AD2791CC182AD0086EDF7 /* ComputeColoring.hpp in Headers */,
BE0AD2821CC188CB0086EDF7 /* GeometricMeshRegionManager.hpp in Headers */,
BE90E0091A24915500CCAFDE /* Quadrangle8.hpp in Headers */,
BE90E0221A24915500CCAFDE /* Helper.hpp in Headers */,
BE90DFCD1A24915500CCAFDE /* Face.hpp in Headers */,
......@@ -10345,7 +10365,7 @@
BE8B69301CC115B600312399 /* DomainManager.hpp in Headers */,
BE90DFC31A24915500CCAFDE /* Vertex.hpp in Headers */,
BE8B692E1CC115B600312399 /* Domain.hxx in Headers */,
BE0AD27B1CC182AD0086EDF7 /* GeometricMeshRegionManager.hpp in Headers */,
BE0AD2981CC18A950086EDF7 /* Coloring.hxx in Headers */,
BEA2639F1A28CEE5001802B6 /* GeometricElt_free_functions.hxx in Headers */,
BE90E0431A24915500CCAFDE /* Format_fwd.hpp in Headers */,
BE90E00F1A24915500CCAFDE /* Hexahedron20.hpp in Headers */,
......@@ -10376,6 +10396,7 @@
BE90DFC91A24915500CCAFDE /* OrientedEdge.hxx in Headers */,
BE8B69311CC115B600312399 /* DomainManager.hxx in Headers */,
BE90E04C1A24915500CCAFDE /* GeometricEltFactory.hpp in Headers */,
BE0AD2971CC18A950086EDF7 /* Coloring.hpp in Headers */,
BE90DFE41A24915500CCAFDE /* Triangle3.hpp in Headers */,
BE90DFD31A24915500CCAFDE /* Orientation.hxx in Headers */,
BE90DFFD1A24915500CCAFDE /* Segment3.hpp in Headers */,
......@@ -10388,7 +10409,6 @@
BE90DFBA1A24915500CCAFDE /* LocalCoords.hpp in Headers */,
BE538A061C89B97800D80749 /* CoordIndexes.hxx in Headers */,
BE90DFE61A24915500CCAFDE /* Triangle6.hpp in Headers */,
BE0AD27C1CC182AD0086EDF7 /* GeometricMeshRegionManager.hxx in Headers */,
BE90DFB41A24915500CCAFDE /* Coords.hpp in Headers */,
BE90E0621A24915500CCAFDE /* MeshFormatHelper.hxx in Headers */,
BE90DFC61A24915500CCAFDE /* Edge.hpp in Headers */,
......@@ -10430,6 +10450,7 @@
BE45D8511AB1C7F000881FF0 /* VolumicAndSurfacicSource.hpp in Headers */,
BE90E0501A24915500CCAFDE /* GeometricEltList.hxx in Headers */,
BE8B69331CC115B600312399 /* DomainHelper.hpp in Headers */,
BE0AD2831CC188CB0086EDF7 /* GeometricMeshRegionManager.hxx in Headers */,
BE90DFCB1A24915500CCAFDE /* OrientedFace.hxx in Headers */,
BE90DFFF1A24915500CCAFDE /* Triangle3.hpp in Headers */,
BE4ED3171A2CA7FF00DE374E /* ComputeBarycenter.hpp in Headers */,
......@@ -12499,7 +12520,7 @@
BE90E0411A24915500CCAFDE /* GeometricElt.cpp in Sources */,
BE90E04B1A24915500CCAFDE /* GeometricEltFactory.cpp in Sources */,
BE90DFFA1A24915500CCAFDE /* Segment2.cpp in Sources */,
BE0AD2781CC182AD0086EDF7 /* GeometricMeshRegion_Connectivity.cpp in Sources */,
BE0AD2781CC182AD0086EDF7 /* ComputeColoring.cpp in Sources */,
BE0AD2731CC182AD0086EDF7 /* GeometricMeshRegion.cpp in Sources */,
BE90E0391A24915500CCAFDE /* Hexahedron8.cpp in Sources */,
BE90E0371A24915500CCAFDE /* Quadrangle9.cpp in Sources */,
......@@ -12509,6 +12530,7 @@
BE90E0021A24915500CCAFDE /* Tetrahedron4.cpp in Sources */,
BE90E0201A24915500CCAFDE /* Hexahedron.cpp in Sources */,
BE90DFFC1A24915500CCAFDE /* Segment3.cpp in Sources */,
BE0AD2961CC18A950086EDF7 /* Coloring.cpp in Sources */,
BE90E03B1A24915500CCAFDE /* Hexahedron20.cpp in Sources */,
BE90DFB91A24915500CCAFDE /* LocalCoords.cpp in Sources */,
BE90DFCF1A24915500CCAFDE /* Volume.cpp in Sources */,
......@@ -12532,6 +12554,7 @@
BE90E0481A24915500CCAFDE /* Medit.cpp in Sources */,
BE90E01A1A24915500CCAFDE /* Triangle.cpp in Sources */,
BE90DFBC1A24915500CCAFDE /* EnumInterface.cpp in Sources */,
BE0AD2811CC188CB0086EDF7 /* GeometricMeshRegionManager.cpp in Sources */,
BE90E0271A24915500CCAFDE /* Segment2.cpp in Sources */,
BE90DFFE1A24915500CCAFDE /* Triangle3.cpp in Sources */,
BE90DFB01A24915500CCAFDE /* RefGeomElt.cpp in Sources */,
......@@ -12551,7 +12574,6 @@
BE8B69321CC115B600312399 /* DomainHelper.cpp in Sources */,
BE8B692C1CC115B600312399 /* Domain.cpp in Sources */,
BE90DFDF1A24915500CCAFDE /* Segment2.cpp in Sources */,
BE0AD27A1CC182AD0086EDF7 /* GeometricMeshRegionManager.cpp in Sources */,
BE90E0081A24915500CCAFDE /* Quadrangle8.cpp in Sources */,
BE90DFEB1A24915500CCAFDE /* Quadrangle4.cpp in Sources */,
BE90E00E1A24915500CCAFDE /* Hexahedron20.cpp in Sources */,
......@@ -15385,6 +15407,7 @@
"$(inherited)",
);
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
......@@ -15403,6 +15426,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = c99;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
......@@ -16337,13 +16361,7 @@
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = (
"-lmpi",
"-lparmetis",
"-llua",
"-lpetsc",
"-lyuni-static-core",
);
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
......@@ -16362,13 +16380,7 @@
GCC_C_LANGUAGE_STANDARD = c99;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = (
"-lmpi",
"-lparmetis",
"-llua",
"-lpetsc",
"-lyuni-static-core",
);
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
......@@ -42,7 +42,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
......
......@@ -13,7 +13,7 @@
# include "Utilities/Singleton/Singleton.hpp"
# include "Geometry/Mesh/GeometricMeshRegionManager.hpp"
# include "Geometry/Mesh/Internal/GeometricMeshRegionManager.hpp"
# include "FiniteElement/FiniteElementSpace/GodOfDof.hpp"
......
......@@ -22,7 +22,7 @@ namespace HappyHeart
{
const auto unique_id = section.GetUniqueId();
auto& mesh = GeometricMeshRegionManager::GetInstance().GetNonCstMesh(unique_id);
auto& mesh = Internal::MeshNS::GeometricMeshRegionManager::GetInstance().GetNonCstMesh(unique_id);
auto raw_ptr = new GodOfDof(mpi, mesh);
......
......@@ -20,7 +20,7 @@
# include "Core/TimeManager/TimeManager.hpp"
# include "Core/Solver/Solver.hpp"
# include "Geometry/Mesh/GeometricMeshRegionManager.hpp"
# include "Geometry/Mesh/Internal/GeometricMeshRegionManager.hpp"
# include "Geometry/GeometricElt_free_functions.hpp"
# include "FiniteElement/FiniteElementSpace/GodOfDof.hpp"
......
......@@ -8,7 +8,7 @@
// Copyright (c) 2014 Inria. All rights reserved.
//
#include "Geometry/Mesh/GeometricMeshRegionManager.hpp"
#include "Geometry/Mesh/Internal/GeometricMeshRegionManager.hpp"
#include "Geometry/Domain/Domain.hpp"
#include "Geometry/GeometricElt.hpp"
#include "Geometry/Private/GeometricEltFactory.hpp"
......@@ -138,7 +138,7 @@ namespace HappyHeart
__FILE__, __LINE__);
const auto& geometric_mesh_region =
GeometricMeshRegionManager::GetInstance().GetMesh(GetGeometricMeshRegionIdentifier());
Internal::MeshNS::GeometricMeshRegionManager::GetInstance().GetMesh(GetGeometricMeshRegionIdentifier());
const auto& label_list = geometric_mesh_region.GetLabelList();
......
......@@ -15,6 +15,12 @@
/// \brief Namespace that enclose stuff related to Domain.
/// \namespace HappyHeart::Internal::MeshNS
/// \brief Namespace that enclose internals related to meshes.
/// \namespace HappyHeart::Internal::ColoringNS
/// \brief Namespace that enclose internals related to coloring of a mesh (in which two connected vertices must not
/// share the same color; this is useful for shared memory parallelism).
///@} // addtogroup
......@@ -21,7 +21,7 @@ namespace HappyHeart
{
namespace GeometryNS
namespace MeshNS
{
......@@ -113,7 +113,7 @@ namespace HappyHeart
} // namespace InterpolationNS
} // namespace GeometryNS
} // namespace MeshNS
} // namespace HappyHeart
......@@ -46,7 +46,7 @@ namespace HappyHeart
// ============================
namespace GeometryNS
namespace MeshNS
{
......@@ -130,7 +130,7 @@ namespace HappyHeart
} // namespace GeometryNS
} // namespace MeshNS
} // namespace HappyHeart
......
......@@ -16,7 +16,7 @@ namespace HappyHeart
{
namespace GeometryNS
namespace MeshNS
{
......@@ -53,7 +53,7 @@ namespace HappyHeart
} // namespace InterpolationNS
} // namespace GeometryNS
} // namespace MeshNS
} // namespace HappyHeart
......
......@@ -13,38 +13,15 @@
#include "Utilities/Containers/UnorderedMap.hpp"
#include "Geometry/Mesh/GeometricMeshRegion.hpp"
#include "Geometry/Mesh/GeometricMeshRegion_Connectivity.hpp"
#include "Geometry/Mesh/ComputeColoring.hpp"
#include "Geometry/Mesh/Internal/Coloring.hpp"
namespace HappyHeart
{
namespace // anonymous
{
/*
* \brief Same as the namesake function in HappyHeart namespace, with different call arguments.
*
* This form is used in ComputeConnectivity(): the subset of GeometricElements has already been computed
* there and it would be a waste to perform againe xactly the same operation.
*
* \param[in] geometric_elt_range A pair of iterators that indicates which geometric elements must be considered.
* To go through all of them, use:
* \code
* for (auto it = geometric_elt_range.first; it != geometric_elt_range.second; ++it)
* { ... }
* \endcode
*/
std::unordered_map<Vertex::shared_ptr, GeometricElt::vector_shared_ptr>
ComputeGeometricElementForEachVertex(const GeometricMeshRegion::subset_range& geometric_elt_range,
const unsigned int Nvertex);
} // namespace anonymous
......@@ -57,8 +34,8 @@ namespace HappyHeart
std::unordered_map<GeometricElt::shared_ptr, unsigned int> ret;
ret.max_load_factor(Utilities::DefaultMaxLoadFactor());
const auto& connectivity = ComputeConnectivity(geometric_mesh_region, dimension);
//PrintConnectivity(connectivity);
const auto& connectivity = Internal::ColoringNS::ComputeConnectivity(geometric_mesh_region, dimension);
//Internal::ColoringNS::PrintConnectivity(connectivity);
const std::size_t Ngeometric_elt_considered = connectivity.size();
......@@ -166,140 +143,6 @@ namespace HappyHeart
return ret;
}
std::unordered_map<Vertex::shared_ptr, GeometricElt::vector_shared_ptr>
ComputeGeometricElementForEachVertex(const GeometricMeshRegion& geometric_mesh_region,
const unsigned int dimension)
{
auto geometric_elt_range = geometric_mesh_region.GetSubsetGeometricEltList(dimension);
assert(geometric_elt_range.second > geometric_elt_range.first);
return ComputeGeometricElementForEachVertex(geometric_elt_range, geometric_mesh_region.Nvertex());
}
std::unordered_map<GeometricElt::shared_ptr, GeometricElt::vector_shared_ptr>
ComputeConnectivity(const GeometricMeshRegion& geometric_mesh_region,
const unsigned int dimension)
{
std::unordered_map<GeometricElt::shared_ptr, GeometricElt::vector_shared_ptr> ret;
ret.max_load_factor(Utilities::DefaultMaxLoadFactor());
auto geometric_elt_range = geometric_mesh_region.GetSubsetGeometricEltList(dimension);
assert(geometric_elt_range.second > geometric_elt_range.first);
const auto& end = geometric_elt_range.second;
const auto Ngeometric_elt = static_cast<std::size_t>(end - geometric_elt_range.first);
ret.reserve(Ngeometric_elt);
// For each vertex, determine the list of related geometric elements.
std::unordered_map<Vertex::shared_ptr, GeometricElt::vector_shared_ptr>&& geometric_elt_list_per_vertex
= ComputeGeometricElementForEachVertex(geometric_elt_range, geometric_mesh_region.Nvertex());
// From this, deduce the expected returned value.
{
for (auto it = geometric_elt_range.first; it != end; ++it)
{
auto geometric_elt_ptr = *it;
assert(!(!geometric_elt_ptr));
const auto& vertex_list = geometric_elt_ptr->GetVertexList();
GeometricElt::vector_shared_ptr buf;
for (auto vertex_ptr : vertex_list)
{
assert(!(!vertex_ptr));
auto it_in_vertex = geometric_elt_list_per_vertex.find(vertex_ptr);
assert(it_in_vertex != geometric_elt_list_per_vertex.cend());
std::copy_if(it_in_vertex->second.cbegin(),
it_in_vertex->second.cend(),
std::back_inserter(buf),
[&geometric_elt_ptr](GeometricElt::shared_ptr current_geo_elt_ptr)
{
assert(!(!current_geo_elt_ptr));
return current_geo_elt_ptr != geometric_elt_ptr;
});
}
Utilities::EliminateDuplicate(buf);
ret.insert({ geometric_elt_ptr, std::move(buf) });
}
}
assert(ret.size() == Ngeometric_elt);
return ret;
}
void PrintConnectivity(const std::unordered_map<GeometricElt::shared_ptr,
GeometricElt::vector_shared_ptr>& connectivity)
{
for (const auto& pair : connectivity)
{
std::cout << pair.first->GetIndex() << '\t';
const auto& connected_geom_elt_list = pair.second;
std::vector<unsigned int> buf(connected_geom_elt_list.size());
std::transform(connected_geom_elt_list.cbegin(), connected_geom_elt_list.cend(),
buf.begin(),
[](const GeometricElt::shared_ptr& geometric_elt_ptr)
{
assert(!(!geometric_elt_ptr));
return geometric_elt_ptr->GetIndex();
});
Utilities::PrintContainer(buf);
}
}
namespace // anonymous
{
std::unordered_map<Vertex::shared_ptr, GeometricElt::vector_shared_ptr>
ComputeGeometricElementForEachVertex(const GeometricMeshRegion::subset_range& geometric_elt_range,
const unsigned int Nvertex)
{
std::unordered_map<Vertex::shared_ptr, GeometricElt::vector_shared_ptr> ret;
ret.max_load_factor(Utilities::DefaultMaxLoadFactor());
ret.reserve(Nvertex);
const auto& end = geometric_elt_range.second;
assert(geometric_elt_range.first < end);
for (auto it = geometric_elt_range.first; it != end; ++it)
{
const auto& geometric_elt_ptr = *it;
assert(geometric_elt_ptr != nullptr);
const auto& vertex_list = geometric_elt_ptr->GetVertexList();
for (const auto& vertex_ptr : vertex_list)
{
assert(!(!vertex_ptr));
auto it_in_vertex = ret.find(vertex_ptr);
if (it_in_vertex == ret.cend())
ret.insert({vertex_ptr, { geometric_elt_ptr } });
else
it_in_vertex->second.push_back(geometric_elt_ptr);
}
}
return ret;
}
} // namespace anonymous
} // namespace HappyHeart
......@@ -8,8 +8,8 @@
// Copyright 2012 INRIA. All rights reserved.
//
#ifndef HAPPY_HEART_x_GEOMETRY_x_GEOMETRIC_MESH_REGION_x_CONNECTIVITY_HPP_
# define HAPPY_HEART_x_GEOMETRY_x_GEOMETRIC_MESH_REGION_x_CONNECTIVITY_HPP_
#ifndef HAPPY_HEART_x_GEOMETRY_x_MESH_x_COMPUTE_COLORING_HPP_
# define HAPPY_HEART_x_GEOMETRY_x_MESH_x_COMPUTE_COLORING_HPP_
# include <unordered_map>
......@@ -53,43 +53,16 @@ namespace HappyHeart
*
* \internal <b><tt>[internal]</tt></b> Unordered map use the address and not the GeometricElt object in its hash table.
*/
std::unordered_map<GeometricElt::shared_ptr, unsigned int> ComputeColoring(const GeometricMeshRegion& geometric_mesh_region,
unsigned int dimension,
std::vector<unsigned int>& Ngeometric_elt_with_color);
std::unordered_map<GeometricElt::shared_ptr, unsigned int>
ComputeColoring(const GeometricMeshRegion& geometric_mesh_region,
unsigned int dimension,
std::vector<unsigned int>& Ngeometric_elt_with_color);
/*!
* \brief Compute the connectivity of the geometric elements within the \a geometric_mesh_region.
*
* \param[in] geometric_mesh_region The geometric mesh region for which the connectivity is computed.
* \param[in] dimension Consider only the geometric elements of this dimension.
*
* \return Key is each geometric element, value the list of contiguous geometric elements. Self connexion
* is rejected here.
*/
std::unordered_map<GeometricElt::shared_ptr, GeometricElt::vector_shared_ptr>
ComputeConnectivity(const GeometricMeshRegion& geometric_mesh_region,
unsigned int dimension);
//! A function to print the results of the connectivity, very useful in debug mode.
void PrintConnectivity(const std::unordered_map<GeometricElt::shared_ptr,
GeometricElt::vector_shared_ptr>& connectivity);
/*!
* \brief Compute for each vertex the list of GeometricElements of a given dimension to which it belongs to.
*
* \param[in] geometric_mesh_region Geometric mesh region in which the computation is performed.
* \param[in] dimension Only geometric elements of this dimension are considered.
*/
std::unordered_map<Vertex::shared_ptr, GeometricElt::vector_shared_ptr>
ComputeGeometricElementForEachVertex(const GeometricMeshRegion& geometric_mesh_region,
const unsigned int dimension);
} // namespace HappyHeart
#endif // HAPPY_HEART_x_GEOMETRY_x_GEOMETRIC_MESH_REGION_x_CONNECTIVITY_HPP_
#endif // HAPPY_HEART_x_GEOMETRY_x_MESH_x_COMPUTE_COLORING_HPP_
......@@ -8,8 +8,8 @@
// Copyright 2012 INRIA. All rights reserved.
//
#ifndef HAPPY_HEART_x_GEOMETRY_x_GEOMETRIC_MESH_REGION_HPP_
# define HAPPY_HEART_x_GEOMETRY_x_GEOMETRIC_MESH_REGION_HPP_
#ifndef HAPPY_HEART_x_GEOMETRY_x_MESH_x_GEOMETRIC_MESH_REGION_HPP_
# define HAPPY_HEART_x_GEOMETRY_x_MESH_x_GEOMETRIC_MESH_REGION_HPP_
......@@ -44,14 +44,20 @@ namespace HappyHeart
// ============================