PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
UnionMeshSegment.hpp
Go to the documentation of this file.
1// _LICENSE_HEADER_
2//
3// Copyright (C) 2019 - 2025.
4// Terms register on the GPL-3.0 license.
5//
6// This file can be redistributed and/or modified under the license terms.
7//
8// See top level LICENSE file for more details.
9//
10// This file can be used citing references in CITATION.cff file.
11
12#ifndef __UNIONMESHSEGMENT_H
13#define __UNIONMESHSEGMENT_H
14
15#include "GeometryUtilities.hpp"
16
17namespace Gedim
18{
20{
21 public:
23 {
25 {
26 enum struct Types
27 {
28 Unknown = 0,
29 First = 1,
30 Second = 2,
31 Both = 3
32 };
33
35 std::vector<unsigned int> MeshIndices = {};
36 };
37
39 {
40 enum struct Types
41 {
42 Unknown = 0,
43 First = 1,
44 Second = 2,
45 Both = 3
46 };
47
49 std::vector<double> Points = {};
50 std::vector<unsigned int> MeshIndices = {};
51 };
52
53 std::map<double, Gedim::UnionMeshSegment::UnionMesh::UnionMeshPoint> Points = {};
54 std::vector<Gedim::UnionMeshSegment::UnionMesh::UnionMeshSegment> Segments = {};
55 };
56
59
61
62 private:
63 const Gedim::GeometryUtilities &_geometryUtilities;
64
65 UnionMesh::UnionMeshPoint &InsertNewIntersection(const double &curvilinearCoordinate, UnionMesh &result, bool &found);
66
67 void CreateUnionPoints(const std::vector<double> &curvilinearCoordinatesMeshOne,
68 const std::vector<double> &curvilinearCoordinatesMeshTwo,
70 void CreateUnionSegments(const std::vector<double> &curvilinearCoordinatesMeshOne,
71 const std::vector<double> &curvilinearCoordinatesMeshTwo,
73
74 public:
75 UnionMeshSegment(const Gedim::GeometryUtilities &geometryUtilities);
77
78 void CreateUnionMesh(const std::vector<double> &curvilinearCoordinatesMeshOne,
79 const std::vector<double> &curvilinearCoordinatesMeshTwo,
81};
82} // namespace Gedim
83
84#endif
Eigen column vector.
Definition Eigen_Array.hpp:23
The GeometryUtilities class intersects 3D segments.
Definition GeometryUtilities.hpp:37
Definition UnionMeshSegment.hpp:20
void CreateUnionMesh(const std::vector< double > &curvilinearCoordinatesMeshOne, const std::vector< double > &curvilinearCoordinatesMeshTwo, Gedim::UnionMeshSegment::UnionMesh &result)
Definition UnionMeshSegment.cpp:181
static void ToString(const Gedim::UnionMeshSegment::UnionMesh &unionMesh)
Definition UnionMeshSegment.cpp:40
~UnionMeshSegment()
Definition UnionMeshSegment.cpp:25
static void ToCurvilinearCoordinates(const Gedim::UnionMeshSegment::UnionMesh &unionMesh, std::vector< double > &curvilinearCoordinates)
convert UnionMesh to Curvilinear Coordinates vector
Definition UnionMeshSegment.cpp:29
Definition Eigen_Array.cpp:22
Definition UnionMeshSegment.hpp:25
Gedim::UnionMeshSegment::UnionMesh::UnionMeshPoint::Types Type
Definition UnionMeshSegment.hpp:34
std::vector< unsigned int > MeshIndices
vector of size 2 containing in each i the indices in mesh_i
Definition UnionMeshSegment.hpp:35
Types
Definition UnionMeshSegment.hpp:27
Gedim::UnionMeshSegment::UnionMesh::UnionMeshSegment::Types Type
Definition UnionMeshSegment.hpp:48
std::vector< unsigned int > MeshIndices
vector of size 2 containing in each i the indices in mesh_i
Definition UnionMeshSegment.hpp:50
std::vector< double > Points
Definition UnionMeshSegment.hpp:49
Definition UnionMeshSegment.hpp:23
std::vector< Gedim::UnionMeshSegment::UnionMesh::UnionMeshSegment > Segments
Definition UnionMeshSegment.hpp:54
std::map< double, Gedim::UnionMeshSegment::UnionMesh::UnionMeshPoint > Points
Definition UnionMeshSegment.hpp:53