PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
RefinementUtilities.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 __RefinementUtilities_H
13#define __RefinementUtilities_H
14
15#include "GeometryUtilities.hpp"
16#include "IMeshDAO.hpp"
17#include "MeshUtilities.hpp"
18#include <numeric>
19
20namespace Gedim
21{
25{
26 public:
28 {
29 unsigned int MaxEdgeIndex = 0;
30 unsigned int OppositeVertexIndex = 0;
31 };
32
34 {
35 unsigned int MaxEdgeIndex = 0;
36 std::array<unsigned int, 2> OppositeVerticesIndex = {};
37 };
38
40 {
41 Eigen::Vector3d LineOrigin;
42 Eigen::Vector3d LineTangent;
43 };
44
46 {
47 std::vector<double> Cell2DsQuality;
48 std::vector<double> Cell1DsQuality;
49 };
50
52 {
53 unsigned int NewCell0DIndex = 0;
54 std::vector<unsigned int> NewCell1DsIndex = {};
55 };
56
70
72 {
81
111
112 std::vector<unsigned int> Cell1DsIndex = {};
113 std::vector<Gedim::GeometryUtilities::LinePolygonPositionResult::EdgeIntersection> Cell1DsIntersection = {};
114 std::vector<Gedim::RefinementUtilities::RefinePolygon_CheckResult::Cell1DToSplit> Cell1DsToSplit = {};
117 };
118
135
137 {
138 enum struct ResultTypes
139 {
140 Unknown = 0,
141 Successfull = 1,
145 };
146
163
165 {
166 enum struct Types
167 {
168 Unknown = 0,
169 Updated = 1,
170 New = 2
171 };
172
175 std::vector<unsigned int> NewCell2DsIndex = {};
176 unsigned int OriginalCell2DIndex = 0;
177 unsigned int NewCell1DIndex = 0;
178 std::vector<unsigned int> NewCell1DsPosition = {};
179 unsigned int OriginalCell3DFaceIndex = 0;
180 };
181
184 std::vector<unsigned int> NewCell0DsIndex = {};
185 std::vector<Gedim::RefinementUtilities::RefinePolyhedron_Result::RefinedCell1D> NewCell1DsIndex = {};
186 std::vector<Gedim::RefinementUtilities::RefinePolyhedron_Result::RefinedCell2D> NewCell2DsIndex = {};
187 std::vector<unsigned int> NewCell3DsIndex = {};
188 };
189
228
230 {
232 {
233 unsigned int OriginalCell2DIndex = 0;
234 unsigned int NewCell2DIndex = 0;
235 };
236
237 std::vector<Gedim::RefinementUtilities::RefinePolygon_UpdateNeighbour_Result::UpdatedCell2D> UpdatedCell2Ds = {};
238 };
239
241 {
243 {
244 unsigned int OriginalCell3DIndex = 0;
245 unsigned int NewCell3DIndex = 0;
246 };
247
248 std::vector<Gedim::RefinementUtilities::RefinePolyhedron_UpdateNeighbour_Result::UpdatedCell3D> UpdatedCell3Ds = {};
249 };
250
252 {
254 {
255 enum struct StatusTypes
256 {
257 Unknown = -1,
258 Active = 0,
259 Inactive = 1
260 };
261
262 std::vector<std::vector<unsigned int>> UnalignedVerticesIndex = {};
263 std::vector<Eigen::MatrixXd> Vertices = {};
264 std::vector<double> Area = {};
265 std::vector<Eigen::Vector3d> Centroid = {};
266 std::vector<std::vector<bool>> EdgesDirection = {};
267 std::vector<Eigen::MatrixXd> EdgesNormal = {};
268 std::vector<Eigen::VectorXd> EdgesLength = {};
269 std::vector<std::vector<Eigen::Matrix3d>> Triangulations = {};
270 std::vector<Eigen::Matrix3d> Inertia = {};
271 std::vector<Eigen::MatrixXd> UnalignedVertices = {};
272 std::vector<Eigen::VectorXd> UnalignedEdgesLength = {};
273 std::vector<Eigen::VectorXd> CentroidEdgesDistance = {};
274 std::vector<Eigen::VectorXd> CentroidVerticesDistance = {};
275 std::vector<double> InRadius = {};
276 std::vector<double> Quality = {};
277 std::vector<Gedim::RefinementUtilities::Cell2Ds_GeometricData::Cell2D_GeometricData::StatusTypes> Status;
278 };
279
281 {
282 enum struct StatusTypes
283 {
284 Unknown = -1,
285 QualityChecked = 0,
287 };
288
289 unsigned int MaxAligned = 0;
290 std::vector<unsigned int> Aligned = {};
291 std::vector<Gedim::RefinementUtilities::Cell2Ds_GeometricData::Cell1D_GeometricData::StatusTypes> Status = {};
292 };
293
296 };
297
298 private:
299 const Gedim::GeometryUtilities &geometryUtilities;
300 const Gedim::MeshUtilities &meshUtilities;
301
302 public:
303 RefinementUtilities(const Gedim::GeometryUtilities &geometryUtilities, const Gedim::MeshUtilities &meshUtilities);
305
307 const Eigen::Vector3d &newVertexCoordinate,
308 Gedim::IMeshDAO &mesh) const;
310 unsigned int UpdateCell2D_NewVertex(const unsigned int cell2DIndex,
311 const bool cell2DEdgeDirection,
312 const unsigned int cell2DEdgePosition,
313 const std::vector<unsigned int> &newCell1DsIndex,
314 const unsigned int newCell0DIndex,
315 Gedim::IMeshDAO &mesh) const;
316
318 {
320 0.5 * (mesh.Cell0DCoordinates(mesh.Cell1DOrigin(cell1DIndex)) +
321 mesh.Cell0DCoordinates(mesh.Cell1DEnd(cell1DIndex))),
322 mesh);
323 }
324
325 bool AreVerticesAligned(const Eigen::MatrixXd &cell2DVertices, const unsigned int fromVertex, const unsigned int toVertex) const;
326
330 const Eigen::MatrixXd &cell2DVertices,
332
337
338 bool SplitPolygon_IsAreaPositive(const Eigen::VectorXi &newCell2D_Indices,
339 const Eigen::Matrix3d &cell2DRotation,
340 const Eigen::Vector3d &cell2DTranslation,
341 Gedim::IMeshDAO &mesh) const;
342
344 const unsigned int cell2DNumVertices,
345 const unsigned int fromVertex,
346 const unsigned int toVertex,
347 const Eigen::Matrix3d &cell2DRotation,
348 const Eigen::Vector3d &cell2DTranslation,
349 Gedim::IMeshDAO &mesh) const;
351 const unsigned int cell2DNumVertices,
352 const unsigned int fromEdge,
353 const unsigned int toVertex,
354 const Eigen::Matrix3d &cell2DRotation,
355 const Eigen::Vector3d &cell2DTranslation,
356 const unsigned int fromNewCell0DIndex,
357 const std::vector<unsigned int> &fromSplitCell1DsIndex,
358 const bool &fromEdgeDirection,
359 Gedim::IMeshDAO &mesh) const;
361 const unsigned int cell2DNumVertices,
362 const unsigned int fromVertex,
363 const unsigned int toEdge,
364 const Eigen::Matrix3d &cell2DRotation,
365 const Eigen::Vector3d &cell2DTranslation,
366 const unsigned int toNewCell0DIndex,
367 const std::vector<unsigned int> &toSplitCell1DsIndex,
368 const bool &toEdgeDirection,
369 Gedim::IMeshDAO &mesh) const;
371 const unsigned int cell2DNumVertices,
372 const unsigned int fromEdge,
373 const unsigned int toEdge,
374 const Eigen::Matrix3d &cell2DRotation,
375 const Eigen::Vector3d &cell2DTranslation,
376 const unsigned int fromNewCell0DIndex,
377 const unsigned int toNewCell0DIndex,
378 const std::vector<unsigned int> &fromSplitCell1DsIndex,
379 const std::vector<unsigned int> &toSplitCell1DsIndex,
380 const bool &fromEdgeDirection,
381 const bool &toEdgeDirection,
382 Gedim::IMeshDAO &mesh) const;
383
386 const Eigen::VectorXd &triangle_edges_length) const;
387
389 const Eigen::Vector3d &centroid) const;
391 const Eigen::VectorXd &unalignedEdgesLength,
392 const Eigen::Vector3d &centroid,
393 const Eigen::Matrix3d &inertia) const;
394
396 const Eigen::VectorXd &edgesLength) const;
397
405 const unsigned int &edgeIndex,
406 const unsigned int &oppositeVertexIndex,
407 const std::vector<bool> &cell2DEdgesDirection,
408 const double &cell2DArea,
409 const Eigen::Matrix3d &cell2DRotation,
410 const Eigen::Vector3d &cell2DTranslation,
411 const Eigen::VectorXd &cell2DEdgesLength,
412 Gedim::IMeshDAO &mesh) const;
413
416 const unsigned int &cell3DIndex,
417 const Eigen::MatrixXd &cell3DVertices,
418 const Eigen::MatrixXi &cell3DEdges,
419 const Eigen::VectorXd &cell3DEdgesLength,
420 const std::vector<Eigen::MatrixXi> &cell3DFaces,
421 const std::vector<Eigen::MatrixXd> &cell3DFaces3DVertices,
422 const std::vector<Eigen::MatrixXd> &cell3DFacesEdges3DTangent,
423 const std::vector<Eigen::Vector3d> &cell3DFacesTranslation,
424 const std::vector<Eigen::Matrix3d> &cell3DFacesRotationMatrix,
425 const double &cell3DVolume,
426 const Eigen::Vector3d &planeNormal,
427 const Eigen::Vector3d &planeOrigin,
428 const Eigen::Matrix3d &planeRotationMatrix,
429 const Eigen::Vector3d &planeTranslation,
430 Gedim::IMeshDAO &mesh) const;
431
433 const unsigned int &cell3DIndex,
434 const unsigned int &cell2DIndex,
435 const unsigned int &newCell1DIndex,
436 const std::vector<unsigned int> &splitCell1DsOriginalIndex,
437 const std::vector<unsigned int> &splitCell1DsNewCell0DIndex,
438 const std::vector<std::vector<unsigned int>> &splitCell1DsUpdatedIndices,
439 const std::vector<unsigned int> &splitCell2DsIndex,
440 const std::vector<std::vector<std::vector<bool>>> &cell3DsFacesEdgesDirection,
441 std::map<unsigned int, unsigned int> &updatedCell2Ds,
442 Gedim::IMeshDAO &mesh) const;
443
445 const unsigned int &cell3DIndex,
446 const unsigned int &cell1DIndex,
447 const std::vector<unsigned int> &newCell1DsIndex,
448 const unsigned int &newCell0DIndex,
449 const std::vector<std::vector<std::vector<bool>>> &cell3DsFacesEdgesDirection,
450 std::map<unsigned int, unsigned int> &updatedCell2Ds,
451 Gedim::IMeshDAO &mesh) const;
452
461 const unsigned int &cell2DIndex,
462 const unsigned int &cell1DIndex,
463 const unsigned int &newCell0DIndex,
464 const std::vector<unsigned int> &splitCell1DsIndex,
465 const bool &cell2DEdgeDirection,
466 const std::vector<Eigen::Matrix3d> &cell2DsRotation,
467 const std::vector<Eigen::Vector3d> &cell2DsTranslation,
468 Gedim::IMeshDAO &mesh) const;
469
472 const unsigned int &cell2DIndex,
473 const Eigen::MatrixXd &cell2DVertices,
474 const Eigen::Vector3d &lineTangent,
475 const Eigen::Vector3d &lineOrigin,
476 const std::vector<double> &cell2DsQuality,
477 const std::vector<unsigned int> &cell1DsAligned,
478 const double &cell1DsQualityWeight,
479 const double &cell1DsAlignedWeight,
480 const double &cell2DArea,
481 const std::vector<Eigen::VectorXd> &cell2DsEdgesLength,
482 const std::vector<bool> &cell2DEdgesDirection,
483 Gedim::IMeshDAO &mesh) const;
484
487 const unsigned int &cell2DIndex,
490 const Eigen::MatrixXd &cell2DVertices,
492 const Eigen::Matrix3d &cell2DRotation,
493 const Eigen::Vector3d &cell2DTranslation,
494 const std::vector<bool> &cell2DEdgesDirection,
495 const bool &extendToNeighbours,
496 Gedim::IMeshDAO &mesh) const;
497
499 const unsigned int &cell2DIndex,
500 const unsigned int &cell1DIndex,
501 const unsigned int &newCell0DIndex,
502 const std::vector<unsigned int> &splitCell1DsIndex,
503 const std::vector<std::vector<bool>> &cell2DsEdgesDirection,
504 Gedim::IMeshDAO &mesh) const;
505
510 const IMeshDAO &mesh) const;
511
514 const std::vector<unsigned int> &cell2DsIndex,
516
518 const unsigned int &cell1DIndex,
519 const unsigned int &cell2DIndex,
521 const std::vector<Eigen::VectorXd> &cell2DsEdgesLength,
522 const double &cell1DsQualityWeight,
523 const double &cell1DsAlignedWeight,
524 const std::vector<double> &cell2DsQuality,
525 const std::vector<unsigned int> &cell1DsAligned,
526 const Gedim::IMeshDAO &mesh) const;
527
529 const std::vector<unsigned int> &cell2DsToRefineIndex,
531 Gedim::IMeshDAO &mesh) const;
532
533 void RefineMesh2D(const std::vector<unsigned int> &cell2DsToRefineIndex,
534 const double &cell1DsQualityWeight,
535 const double &cell1DsAlignedWeight,
537 Gedim::IMeshDAO &mesh) const;
538};
539
540} // namespace Gedim
541
542#endif // __RefinementUtilities_H
Eigen column vector.
Definition Eigen_Array.hpp:23
The GeometryUtilities class intersects 3D segments.
Definition GeometryUtilities.hpp:37
PolygonTypes
Definition GeometryUtilities.hpp:51
The IMeshDAO (mesh data access object) class to read and write mesh data.
Definition IMeshDAO.hpp:24
MeshUtilities.
Definition MeshUtilities.hpp:23
RefinementUtilities.
Definition RefinementUtilities.hpp:25
Gedim::RefinementUtilities::RefinePolyhedron_Result RefinePolyhedronCell_ByPlane(const unsigned int &cell3DIndex, const Eigen::MatrixXd &cell3DVertices, const Eigen::MatrixXi &cell3DEdges, const Eigen::VectorXd &cell3DEdgesLength, const std::vector< Eigen::MatrixXi > &cell3DFaces, const std::vector< Eigen::MatrixXd > &cell3DFaces3DVertices, const std::vector< Eigen::MatrixXd > &cell3DFacesEdges3DTangent, const std::vector< Eigen::Vector3d > &cell3DFacesTranslation, const std::vector< Eigen::Matrix3d > &cell3DFacesRotationMatrix, const double &cell3DVolume, const Eigen::Vector3d &planeNormal, const Eigen::Vector3d &planeOrigin, const Eigen::Matrix3d &planeRotationMatrix, const Eigen::Vector3d &planeTranslation, Gedim::IMeshDAO &mesh) const
Refine Polyhedral Cell3D By Plane.
Definition RefinementUtilities3D.cpp:50
Gedim::RefinementUtilities::TetrahedronMaxEdgeDirection ComputeTetrahedronMaxEdgeDirection(const Eigen::MatrixXi &polyhedronEdges, const Eigen::VectorXd &edgesLength) const
Definition RefinementUtilities3D.cpp:18
Gedim::RefinementUtilities::PolygonDirection ComputePolygonMaxInertiaDirection(const Eigen::MatrixXd &unalignedVertices, const Eigen::VectorXd &unalignedEdgesLength, const Eigen::Vector3d &centroid, const Eigen::Matrix3d &inertia) const
Definition RefinementUtilities2D.cpp:1022
Gedim::RefinementUtilities::RefinePolyhedron_UpdateNeighbour_Result RefinePolyhedronCell_UpdateFaceNeighbours(const unsigned int &cell3DIndex, const unsigned int &cell2DIndex, const unsigned int &newCell1DIndex, const std::vector< unsigned int > &splitCell1DsOriginalIndex, const std::vector< unsigned int > &splitCell1DsNewCell0DIndex, const std::vector< std::vector< unsigned int > > &splitCell1DsUpdatedIndices, const std::vector< unsigned int > &splitCell2DsIndex, const std::vector< std::vector< std::vector< bool > > > &cell3DsFacesEdgesDirection, std::map< unsigned int, unsigned int > &updatedCell2Ds, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities3D.cpp:424
Gedim::RefinementUtilities::Cell2Ds_GeometricData RefinePolygonCell_InitializeGeometricData(const Gedim::IMeshDAO &mesh) const
Compute the geometric data for all the mesh.
Definition RefinementUtilities2D.cpp:701
SplitCell1D_Result SplitCell1D_MiddlePoint(const unsigned int &cell1DIndex, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities.hpp:317
void RefineMesh2D(const std::vector< unsigned int > &cell2DsToRefineIndex, const double &cell1DsQualityWeight, const double &cell1DsAlignedWeight, Gedim::RefinementUtilities::Cell2Ds_GeometricData &meshGeometricData, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D_refine_triangles.cpp:301
Gedim::RefinementUtilities::SplitCell1D_Result SplitCell1D(const unsigned int &cell1DIndex, const Eigen::Vector3d &newVertexCoordinate, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities.cpp:26
bool SplitPolygon_IsAreaPositive(const Eigen::VectorXi &newCell2D_Indices, const Eigen::Matrix3d &cell2DRotation, const Eigen::Vector3d &cell2DTranslation, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D.cpp:177
Gedim::RefinementUtilities::RefinePolygon_CheckResult RefinePolygonCell_CheckRefinement(const unsigned int &cell2DIndex, const Eigen::MatrixXd &cell2DVertices, const Eigen::Vector3d &lineTangent, const Eigen::Vector3d &lineOrigin, const std::vector< double > &cell2DsQuality, const std::vector< unsigned int > &cell1DsAligned, const double &cell1DsQualityWeight, const double &cell1DsAlignedWeight, const double &cell2DArea, const std::vector< Eigen::VectorXd > &cell2DsEdgesLength, const std::vector< bool > &cell2DEdgesDirection, Gedim::IMeshDAO &mesh) const
Refine Polygon Cell2D By Direction.
Definition RefinementUtilities2D.cpp:1200
Gedim::RefinementUtilities::RefinePolygon_Result RefinePolygonCell_ByDirection(const unsigned int &cell2DIndex, const Gedim::GeometryUtilities::PolygonTypes &cell2DPolygonType, const Gedim::GeometryUtilities::PolygonTypes &cell2DUnalignedPolygonType, const Eigen::MatrixXd &cell2DVertices, const Gedim::RefinementUtilities::RefinePolygon_CheckResult &cell2DCheckToRefine, const Eigen::Matrix3d &cell2DRotation, const Eigen::Vector3d &cell2DTranslation, const std::vector< bool > &cell2DEdgesDirection, const bool &extendToNeighbours, Gedim::IMeshDAO &mesh) const
Refine Polygon Cell2D By Direction.
Definition RefinementUtilities2D.cpp:1332
Gedim::RefinementUtilities::CheckSplitType_Result SplitPolygon_CheckSplitType(const Gedim::GeometryUtilities::PolygonTypes &cell2DPolygonType, const Gedim::GeometryUtilities::PolygonTypes &cell2DUnalignedPolygonType, const Eigen::MatrixXd &cell2DVertices, const Gedim::RefinementUtilities::RefinePolygon_CheckResult &cell2DCheckToRefine) const
Definition RefinementUtilities2D.cpp:18
unsigned int UpdateCell2D_NewVertex(const unsigned int cell2DIndex, const bool cell2DEdgeDirection, const unsigned int cell2DEdgePosition, const std::vector< unsigned int > &newCell1DsIndex, const unsigned int newCell0DIndex, Gedim::IMeshDAO &mesh) const
update cell2DIndex with a new splitted edge cell1DIndex by newCell0DIndex
Definition RefinementUtilities.cpp:50
Gedim::RefinementUtilities::SplitPolygon_Result SplitPolygon_NewVertexFrom(const unsigned int cell2DIndex, const unsigned int cell2DNumVertices, const unsigned int fromEdge, const unsigned int toVertex, const Eigen::Matrix3d &cell2DRotation, const Eigen::Vector3d &cell2DTranslation, const unsigned int fromNewCell0DIndex, const std::vector< unsigned int > &fromSplitCell1DsIndex, const bool &fromEdgeDirection, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D.cpp:310
Gedim::RefinementUtilities::SplitPolygon_Result SplitPolygon_NewVertexTo(const unsigned int cell2DIndex, const unsigned int cell2DNumVertices, const unsigned int fromVertex, const unsigned int toEdge, const Eigen::Matrix3d &cell2DRotation, const Eigen::Vector3d &cell2DTranslation, const unsigned int toNewCell0DIndex, const std::vector< unsigned int > &toSplitCell1DsIndex, const bool &toEdgeDirection, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D.cpp:428
void RefinePolygonCell_UpdateGeometricData(const Gedim::IMeshDAO &mesh, const std::vector< unsigned int > &cell2DsIndex, Gedim::RefinementUtilities::Cell2Ds_GeometricData &geometricData) const
Update the geometric data for only cell2Ds.
Definition RefinementUtilities2D.cpp:754
Gedim::RefinementUtilities::TriangleMaxEdgeDirection ComputeTriangleMaxEdgeDirection(const Eigen::VectorXd &edgesLength) const
Definition RefinementUtilities2D.cpp:670
Gedim::RefinementUtilities::PolygonDirection ComputePolygonMaxDiameterDirection(const Eigen::MatrixXd unalignedVertices, const Eigen::Vector3d &centroid) const
Definition RefinementUtilities2D.cpp:1006
Gedim::RefinementUtilities::RefinePolyhedron_UpdateNeighbour_Result RefinePolyhedronCell_UpdateEdgeNeighbours(const unsigned int &cell3DIndex, const unsigned int &cell1DIndex, const std::vector< unsigned int > &newCell1DsIndex, const unsigned int &newCell0DIndex, const std::vector< std::vector< std::vector< bool > > > &cell3DsFacesEdgesDirection, std::map< unsigned int, unsigned int > &updatedCell2Ds, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities3D.cpp:539
bool SplitPolygon_CheckIsToSplit_Relaxed(const Gedim::RefinementUtilities::RefinePolygon_CheckResult::Cell1DToSplit &cell1DSplitOne, const Gedim::RefinementUtilities::RefinePolygon_CheckResult::Cell1DToSplit &cell1DSplitTwo) const
Definition RefinementUtilities2D.cpp:163
Gedim::RefinementUtilities::RefinePolygon_Result RefineTriangleCell_ByEdge(const unsigned int &cell2DIndex, const unsigned int &edgeIndex, const unsigned int &oppositeVertexIndex, const std::vector< bool > &cell2DEdgesDirection, const double &cell2DArea, const Eigen::Matrix3d &cell2DRotation, const Eigen::Vector3d &cell2DTranslation, const Eigen::VectorXd &cell2DEdgesLength, Gedim::IMeshDAO &mesh) const
Refine Triangle Cell2D By Edge.
Definition RefinementUtilities2D.cpp:1066
bool AreVerticesAligned(const Eigen::MatrixXd &cell2DVertices, const unsigned int fromVertex, const unsigned int toVertex) const
Definition RefinementUtilities.cpp:87
Gedim::RefinementUtilities::RefinePolygon_UpdateNeighbour_Result RefineTriangleCell_UpdateNeighbours(const unsigned int &cell2DIndex, const unsigned int &cell1DIndex, const unsigned int &newCell0DIndex, const std::vector< unsigned int > &splitCell1DsIndex, const bool &cell2DEdgeDirection, const std::vector< Eigen::Matrix3d > &cell2DsRotation, const std::vector< Eigen::Vector3d > &cell2DsTranslation, Gedim::IMeshDAO &mesh) const
Update Cell1D neighbours of refined triangle by edge with refine by edge.
Definition RefinementUtilities2D.cpp:1140
std::vector< unsigned int > refine_mesh_2D_triangles(const Gedim::GeometryUtilities &geometry_utilities, const std::vector< unsigned int > &cell2DsToRefineIndex, Gedim::RefinementUtilities::Cell2Ds_GeometricData &meshGeometricData, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D_refine_triangles.cpp:18
~RefinementUtilities()
Definition RefinementUtilities.cpp:22
Gedim::RefinementUtilities::RefinePolygon_UpdateNeighbour_Result RefinePolygonCell_UpdateNeighbours(const unsigned int &cell2DIndex, const unsigned int &cell1DIndex, const unsigned int &newCell0DIndex, const std::vector< unsigned int > &splitCell1DsIndex, const std::vector< std::vector< bool > > &cell2DsEdgesDirection, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D.cpp:1696
Gedim::RefinementUtilities::RefinePolygon_CheckResult::Cell1DToSplit RefinePolygonCell_IsCell1DToSplit(const unsigned int &cell1DIndex, const unsigned int &cell2DIndex, const Gedim::GeometryUtilities::LinePolygonPositionResult::EdgeIntersection &edgeIntersection, const std::vector< Eigen::VectorXd > &cell2DsEdgesLength, const double &cell1DsQualityWeight, const double &cell1DsAlignedWeight, const std::vector< double > &cell2DsQuality, const std::vector< unsigned int > &cell1DsAligned, const Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D.cpp:866
bool SplitPolygon_CheckIsNotToExtend(const Gedim::RefinementUtilities::RefinePolygon_CheckResult::Cell1DToSplit &cell1DSplitOne, const Gedim::RefinementUtilities::RefinePolygon_CheckResult::Cell1DToSplit &cell1DSplitTwo) const
Definition RefinementUtilities2D.cpp:141
Gedim::MeshUtilities::MeshGeometricData2D ConvertRefinementGeometricData_to_MeshGeometricData(const Gedim::RefinementUtilities::Cell2Ds_GeometricData &ref_mesh_geometric_data, const IMeshDAO &mesh) const
Definition RefinementUtilities2D.cpp:717
Gedim::RefinementUtilities::SplitPolygon_Result SplitPolygon_NewVertices(const unsigned int cell2DIndex, const unsigned int cell2DNumVertices, const unsigned int fromEdge, const unsigned int toEdge, const Eigen::Matrix3d &cell2DRotation, const Eigen::Vector3d &cell2DTranslation, const unsigned int fromNewCell0DIndex, const unsigned int toNewCell0DIndex, const std::vector< unsigned int > &fromSplitCell1DsIndex, const std::vector< unsigned int > &toSplitCell1DsIndex, const bool &fromEdgeDirection, const bool &toEdgeDirection, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D.cpp:543
Gedim::RefinementUtilities::SplitPolygon_Result SplitPolygon_NoNewVertices(const unsigned int cell2DIndex, const unsigned int cell2DNumVertices, const unsigned int fromVertex, const unsigned int toVertex, const Eigen::Matrix3d &cell2DRotation, const Eigen::Vector3d &cell2DTranslation, Gedim::IMeshDAO &mesh) const
Definition RefinementUtilities2D.cpp:205
Definition Eigen_Array.cpp:22
Definition MeshUtilities.hpp:149
std::vector< unsigned int > Aligned
Definition RefinementUtilities.hpp:290
unsigned int MaxAligned
Definition RefinementUtilities.hpp:289
std::vector< Gedim::RefinementUtilities::Cell2Ds_GeometricData::Cell1D_GeometricData::StatusTypes > Status
Definition RefinementUtilities.hpp:291
std::vector< Eigen::VectorXd > UnalignedEdgesLength
Definition RefinementUtilities.hpp:272
std::vector< Eigen::MatrixXd > EdgesNormal
Definition RefinementUtilities.hpp:267
std::vector< Eigen::Vector3d > Centroid
Definition RefinementUtilities.hpp:265
std::vector< std::vector< unsigned int > > UnalignedVerticesIndex
Definition RefinementUtilities.hpp:262
std::vector< std::vector< bool > > EdgesDirection
Definition RefinementUtilities.hpp:266
std::vector< double > InRadius
Definition RefinementUtilities.hpp:275
std::vector< Eigen::VectorXd > EdgesLength
Definition RefinementUtilities.hpp:268
std::vector< Gedim::RefinementUtilities::Cell2Ds_GeometricData::Cell2D_GeometricData::StatusTypes > Status
Definition RefinementUtilities.hpp:277
std::vector< Eigen::Matrix3d > Inertia
Definition RefinementUtilities.hpp:270
std::vector< Eigen::VectorXd > CentroidEdgesDistance
Definition RefinementUtilities.hpp:273
std::vector< double > Quality
Definition RefinementUtilities.hpp:276
std::vector< Eigen::VectorXd > CentroidVerticesDistance
Definition RefinementUtilities.hpp:274
std::vector< double > Area
Definition RefinementUtilities.hpp:264
std::vector< std::vector< Eigen::Matrix3d > > Triangulations
Definition RefinementUtilities.hpp:269
std::vector< Eigen::MatrixXd > Vertices
Definition RefinementUtilities.hpp:263
std::vector< Eigen::MatrixXd > UnalignedVertices
Definition RefinementUtilities.hpp:271
Definition RefinementUtilities.hpp:252
Gedim::RefinementUtilities::Cell2Ds_GeometricData::Cell1D_GeometricData Cell1Ds
Definition RefinementUtilities.hpp:294
Gedim::RefinementUtilities::Cell2Ds_GeometricData::Cell2D_GeometricData Cell2Ds
Definition RefinementUtilities.hpp:295
Definition RefinementUtilities.hpp:120
Gedim::RefinementUtilities::CheckSplitType_Result::SplitTypes Type
Definition RefinementUtilities.hpp:132
std::array< unsigned int, 2 > NoNewVerticesIndex
valid only for NoNewVertices type
Definition RefinementUtilities.hpp:131
SplitTypes
Definition RefinementUtilities.hpp:122
Definition RefinementUtilities.hpp:46
std::vector< double > Cell1DsQuality
Definition RefinementUtilities.hpp:48
std::vector< double > Cell2DsQuality
Definition RefinementUtilities.hpp:47
Definition RefinementUtilities.hpp:40
Eigen::Vector3d LineTangent
Definition RefinementUtilities.hpp:42
Eigen::Vector3d LineOrigin
Definition RefinementUtilities.hpp:41
unsigned int Cell2DEdgeIndex
Definition RefinementUtilities.hpp:107
bool IsLocalQualityEnough
Definition RefinementUtilities.hpp:100
bool IsAlignedRespect
Definition RefinementUtilities.hpp:104
bool IsIntersectionInside
Definition RefinementUtilities.hpp:98
std::vector< bool > IsNeighQualityEnough
Definition RefinementUtilities.hpp:102
bool IsQualityEnough
Definition RefinementUtilities.hpp:101
std::vector< bool > IsNeighAlignedRespect
Definition RefinementUtilities.hpp:105
bool IsLocalAlignedRespect
Definition RefinementUtilities.hpp:103
Gedim::RefinementUtilities::RefinePolygon_CheckResult::Cell1DToSplit::Types Type
Definition RefinementUtilities.hpp:108
bool IsEdgeLengthEnough
Definition RefinementUtilities.hpp:99
Definition RefinementUtilities.hpp:72
std::vector< Gedim::RefinementUtilities::RefinePolygon_CheckResult::Cell1DToSplit > Cell1DsToSplit
Definition RefinementUtilities.hpp:114
std::vector< Gedim::GeometryUtilities::LinePolygonPositionResult::EdgeIntersection > Cell1DsIntersection
Definition RefinementUtilities.hpp:113
Gedim::RefinementUtilities::RefinePolygon_CheckResult::ResultTypes ResultType
Definition RefinementUtilities.hpp:115
ResultTypes
Definition RefinementUtilities.hpp:74
std::vector< unsigned int > Cell1DsIndex
Definition RefinementUtilities.hpp:112
std::vector< unsigned int > NewCell1DsIndex
Definition RefinementUtilities.hpp:213
unsigned int OriginalCell1DIndex
Definition RefinementUtilities.hpp:214
Gedim::RefinementUtilities::RefinePolygon_Result::RefinedCell1D::Types Type
Definition RefinementUtilities.hpp:211
unsigned int NewCell0DIndex
Definition RefinementUtilities.hpp:215
unsigned int OriginalCell2DEdgeIndex
Definition RefinementUtilities.hpp:216
Definition RefinementUtilities.hpp:191
std::vector< unsigned int > NewCell0DsIndex
Definition RefinementUtilities.hpp:219
std::vector< unsigned int > NewCell2DsIndex
Definition RefinementUtilities.hpp:221
Gedim::RefinementUtilities::CheckSplitType_Result::SplitTypes SplitType
Definition RefinementUtilities.hpp:223
std::vector< Gedim::RefinementUtilities::RefinePolygon_Result::RefinedCell1D > NewCell1DsIndex
Definition RefinementUtilities.hpp:220
ResultTypes
Definition RefinementUtilities.hpp:193
Gedim::RefinementUtilities::RefinePolygon_Result::ResultTypes ResultType
Definition RefinementUtilities.hpp:225
unsigned int OriginalCell2DIndex
Definition RefinementUtilities.hpp:233
unsigned int NewCell2DIndex
Definition RefinementUtilities.hpp:234
std::vector< Gedim::RefinementUtilities::RefinePolygon_UpdateNeighbour_Result::UpdatedCell2D > UpdatedCell2Ds
Definition RefinementUtilities.hpp:237
Gedim::RefinementUtilities::RefinePolyhedron_Result::RefinedCell1D::Types Type
Definition RefinementUtilities.hpp:156
std::vector< unsigned int > NewCell1DsIndex
Definition RefinementUtilities.hpp:158
unsigned int OriginalCell3DEdgeIndex
Definition RefinementUtilities.hpp:161
unsigned int NewCell0DIndex
Definition RefinementUtilities.hpp:160
unsigned int OriginalCell1DIndex
Definition RefinementUtilities.hpp:159
unsigned int OriginalCell3DFaceIndex
Definition RefinementUtilities.hpp:179
std::vector< unsigned int > NewCell1DsPosition
Position in NewCell1DsIndex array.
Definition RefinementUtilities.hpp:178
unsigned int OriginalCell2DIndex
Definition RefinementUtilities.hpp:176
unsigned int NewCell1DIndex
Definition RefinementUtilities.hpp:177
Gedim::RefinementUtilities::RefinePolyhedron_Result::RefinedCell2D::Types Type
Definition RefinementUtilities.hpp:173
std::vector< unsigned int > NewCell2DsIndex
Definition RefinementUtilities.hpp:175
Definition RefinementUtilities.hpp:137
std::vector< Gedim::RefinementUtilities::RefinePolyhedron_Result::RefinedCell1D > NewCell1DsIndex
Definition RefinementUtilities.hpp:185
Gedim::RefinementUtilities::RefinePolyhedron_Result::ResultTypes ResultType
Definition RefinementUtilities.hpp:182
ResultTypes
Definition RefinementUtilities.hpp:139
std::vector< Gedim::RefinementUtilities::RefinePolyhedron_Result::RefinedCell2D > NewCell2DsIndex
Definition RefinementUtilities.hpp:186
std::vector< unsigned int > NewCell3DsIndex
Definition RefinementUtilities.hpp:187
std::vector< unsigned int > NewCell0DsIndex
Definition RefinementUtilities.hpp:184
unsigned int OriginalCell3DIndex
Definition RefinementUtilities.hpp:244
std::vector< Gedim::RefinementUtilities::RefinePolyhedron_UpdateNeighbour_Result::UpdatedCell3D > UpdatedCell3Ds
Definition RefinementUtilities.hpp:248
Definition RefinementUtilities.hpp:52
std::vector< unsigned int > NewCell1DsIndex
Definition RefinementUtilities.hpp:54
unsigned int NewCell0DIndex
Definition RefinementUtilities.hpp:53
Definition RefinementUtilities.hpp:58
std::vector< unsigned int > NewCell2DsIndex
Definition RefinementUtilities.hpp:68
Types
Definition RefinementUtilities.hpp:60
Gedim::RefinementUtilities::SplitPolygon_Result::Types Type
Definition RefinementUtilities.hpp:66
unsigned int NewCell1DIndex
Definition RefinementUtilities.hpp:67
Definition RefinementUtilities.hpp:34
unsigned int MaxEdgeIndex
Definition RefinementUtilities.hpp:35
std::array< unsigned int, 2 > OppositeVerticesIndex
Definition RefinementUtilities.hpp:36
Definition RefinementUtilities.hpp:28
unsigned int MaxEdgeIndex
Definition RefinementUtilities.hpp:29
unsigned int OppositeVertexIndex
Definition RefinementUtilities.hpp:30