KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
delaunator_utilities.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Vicente Mataix Ferrandiz
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
20 
21 namespace Kratos
22 {
25 
29 
33 
37 
41 // forward declaring ModelPart and Point to be avoid including heavy header here
42 class ModelPart;
43 class Point;
44 
51 namespace DelaunatorUtilities
52 {
57  void KRATOS_API(KRATOS_CORE) CreateTriangleMeshFromNodes(ModelPart& rModelPart);
58 
64  std::vector<std::size_t> KRATOS_API(KRATOS_CORE) ComputeTrianglesConnectivity(const std::vector<double>& rCoordinates);
65 
71  std::vector<std::size_t> KRATOS_API(KRATOS_CORE) ComputeTrianglesConnectivity(const std::vector<Point>& rPoints);
72 
80  std::pair<std::vector<std::size_t>, std::vector<double>> KRATOS_API(KRATOS_CORE) ComputeTrianglesConnectivity(
81  const std::vector<double>& rCoordinates,
82  const std::vector<std::array<double,2>>& rSegments,
83  const double AreaConstraint = 0);
84 
85 }; // namespace DelaunatorUtilities
86 } // namespace Kratos
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
Kratos::ModelPart ModelPart
Definition: kratos_wrapper.h:31
This namespace includes several utilities using the library triangle.
Definition: delaunator_utilities.h:43
std::vector< std::size_t > ComputeTrianglesConnectivity(const std::vector< double > &rCoordinates)
This method returns the triangles connectivity from a list of coordinates (using triangle library)
Definition: delaunator_utilities.cpp:144
void CreateTriangleMeshFromNodes(ModelPart &rModelPart)
This method creates a triangle mesh from a model part of nodes.
Definition: delaunator_utilities.cpp:93
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21