Chi-Tech
chi_mesh.h
Go to the documentation of this file.
1#ifndef CHI_MESH_H
2#define CHI_MESH_H
3
4#include<vector>
5#include<iostream>
6#include<memory>
7
8
9/** # Namespace for all meshing features
10 *
11 * Meshes in ChiTech follow the concept of Regions. In any given region the
12 * boundaries are a collection of either line-meshes (2D) or
13 * surface-meshes (3D).
14 * */
15namespace chi_mesh
16{
17 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ FORWARD DECLARATIONS
18 struct Vector3;
19 typedef Vector3 Normal;
20 typedef Vector3 Vertex;
21
22 struct Matrix3x3;
23 struct TensorRank2Dim3;
24
25 struct Face;
26 struct Edge;
27 struct PolyFace;
28
29
30 struct SPDS;
31
32 //=================================== Cells
33 class Cell;
34
35 //=================================== Field function interpolation
40
41 //=================================== Meshes
42 class SurfaceMesh;
44 class MeshContinuum;
45 typedef std::shared_ptr<MeshContinuum> MeshContinuumPtr;
46 typedef std::shared_ptr<const MeshContinuum> MeshContinuumConstPtr;
47
48 //=================================== Logical Volumes
49 class LogicalVolume;
51 class RPPLogicalVolume;
52 class RCCLogicalVolume;
55
56 //=================================== Mesh handler
57 class MeshHandler;
58
59 //=================================== Surface Meshers
60 class SurfaceMesher;
63
64 //==================================== Volume meshers
65 class VolumeMesher;
68
69 enum MeshAttributes : int
70 {
71 NONE = 0,
72 DIMENSION_1 = (1 << 0),
73 DIMENSION_2 = (1 << 1),
74 DIMENSION_3 = (1 << 2),
75 ORTHOGONAL = (1 << 3),
76 EXTRUDED = (1 << 4),
77 UNSTRUCTURED = (1 << 5)
78 };
79
81 const MeshAttributes f2)
82 {
83 return static_cast<MeshAttributes>(static_cast<int>(f1) |
84 static_cast<int>(f2));
85 }
86
87 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ROUTINES
88 MeshHandler& GetCurrentHandler();
90
91 //=================================== Domain decompositions
92 double ComputeLBF(std::vector<Vector3>& points,
93 std::vector<double>& x_cuts,
94 std::vector<double>& y_cuts);
95 void DecomposeSurfaceMeshPxPy(const SurfaceMesh& smesh, int Px, int Py);
96
97 size_t CreateUnpartitioned1DOrthoMesh(std::vector<double>& vertices_1d);
98
99 size_t CreateUnpartitioned2DOrthoMesh(std::vector<double>& vertices_1d_x,
100 std::vector<double>& vertices_1d_y);
101
102 size_t CreateUnpartitioned3DOrthoMesh(std::vector<double>& vertices_1d_x,
103 std::vector<double>& vertices_1d_y,
104 std::vector<double>& vertices_1d_z);
105}
106
107#include "chi_meshvector.h"
108#include "chi_meshmatrix3x3.h"
110#include "chi_meshface.h"
111#include "chi_mesh_edgeloops.h"
112
114
115
116
117#endif
VectorN< 3 > Vector3
size_t PushNewHandlerAndGetIndex()
double ComputeLBF(std::vector< Vector3 > &points, std::vector< double > &x_cuts, std::vector< double > &y_cuts)
std::shared_ptr< const MeshContinuum > MeshContinuumConstPtr
Definition: chi_mesh.h:46
void DecomposeSurfaceMeshPxPy(const SurfaceMesh &smesh, int Px, int Py)
MeshAttributes operator|(const MeshAttributes f1, const MeshAttributes f2)
Definition: chi_mesh.h:80
std::shared_ptr< MeshContinuum > MeshContinuumPtr
Definition: chi_mesh.h:44
Vector3 Normal
Definition: chi_mesh.h:18
size_t CreateUnpartitioned3DOrthoMesh(std::vector< double > &vertices_1d_x, std::vector< double > &vertices_1d_y, std::vector< double > &vertices_1d_z)
size_t CreateUnpartitioned1DOrthoMesh(std::vector< double > &vertices_1d)
MeshAttributes
Definition: chi_mesh.h:70
@ UNSTRUCTURED
Definition: chi_mesh.h:77
@ DIMENSION_1
Definition: chi_mesh.h:72
@ EXTRUDED
Definition: chi_mesh.h:76
@ DIMENSION_2
Definition: chi_mesh.h:73
@ ORTHOGONAL
Definition: chi_mesh.h:75
@ NONE
Definition: chi_mesh.h:71
@ DIMENSION_3
Definition: chi_mesh.h:74
MeshHandler & GetCurrentHandler()
Vector3 Vertex
Definition: chi_mesh.h:20
size_t CreateUnpartitioned2DOrthoMesh(std::vector< double > &vertices_1d_x, std::vector< double > &vertices_1d_y)