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.
qef_utility.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: Ariadna Cortes
11 //
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "includes/node.h"
22 #include "geometries/geometry.h"
24 
25 namespace Kratos
26 {
29 
33 
37 
41 
45 
46 // Forward Declaration class GeometricalObject (using pointers)
47 class GeometricalObject;
48 
56 class KRATOS_API(KRATOS_CORE) QuadraticErrorFunction
57 {
58 public:
59 
62 
63  using NodeType = Node;
64  using NodePtrType = Node::Pointer;
66  using GeometryPtrType = GeometryType::Pointer;
69 
72 
76 
80 
85 
88 
92 
99  static array_1d<double,3> QuadraticErrorFunctionPoint (
100  const GeometryType& rVoxel,
101  const GeometryArrayType& rTriangles
102  );
103 
110  static array_1d<double,3> QuadraticErrorFunctionPoint (
111  const BoundingBox<Point>& rBox,
112  const std::vector<GeometricalObject*>& rTriangles
113  );
114 
120  static array_1d<double,3> CalculateNormal(const GeometryType& rTriangle);
121 
122 private:
125 
129 
133 
137 
138  static Point FirstEnd(int i, const BoundingBox<Point>& rBox);
139  static Point SecondEnd(int i, const BoundingBox<Point>& rBox);
140 
142 }; /* Class VoxelInsideVolumeUtility */
143 
146 
150 
151 } /* namespace Kratos.*/
Representing a bounding box by storing the min and max points.
Definition: bounding_box.h:39
Geometry base class.
Definition: geometry.h:71
PointerVector< GeometryType > GeometriesArrayType
Definition: geometry.h:127
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
This class defines the node.
Definition: node.h:65
Point class.
Definition: point.h:59
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
Utilities to compute the minimum error point in a 3D voxel intersected by a triangle mesh This implem...
Definition: qef_utility.h:57
Node::Pointer NodePtrType
Definition: qef_utility.h:64
GeometryType::Pointer GeometryPtrType
Definition: qef_utility.h:66
QuadraticErrorFunction()
Default constructor.
Definition: qef_utility.h:84
KRATOS_CLASS_POINTER_DEFINITION(QuadraticErrorFunction)
Pointer definition of VoxelInsideVolume.
virtual ~QuadraticErrorFunction()
Destructor.
Definition: qef_utility.h:87
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
integer i
Definition: TensorModule.f:17