Chi-Tech
chi_volumemesher.h
Go to the documentation of this file.
1#ifndef CHI_VOLUMEMESHER_H
2#define CHI_VOLUMEMESHER_H
3
4#include "mesh/chi_mesh.h"
5#include "mesh/Cell/cell.h"
6#include<array>
7
8#include <array>
9
10#include <array>
11
12namespace chi_mesh
13{
15 {
16 EXTRUDER = 4,
18 };
20 {
26 CUTS_Z = 6,
27 CUTS_Y = 7,
28 CUTS_X = 8,
35 };
36}
37
38//######################################################### Class def
39/**Parent volume mesher class.*/
41{
42private:
45public:
47 {
49 PARMETIS = 3
50 };
52 {
53 bool force_polygons = true; //TODO: Remove this option
54 bool mesh_global = false; //TODO: Remove this option
55 int partition_x = 1;
56 int partition_y = 1;
57 int partition_z = 1;
58
59 std::vector<double> xcuts;
60 std::vector<double> ycuts;
61 std::vector<double> zcuts;
63 };
65public:
66 explicit
67 //01 Utils
69 virtual ~VolumeMesher() = default;
72 void SetGridAttributes(MeshAttributes new_attribs,
73 std::array<size_t,3> ortho_Nis={0,0,0});
74 VolumeMesherType Type() const;
75
76 //01a
77 static
78 std::pair<int,int> GetCellXYPartitionID(chi_mesh::Cell *cell);
79 static
80 std::tuple<int,int,int>
82 //01b
83 static
86 //01c
87 static
89 bool sense, int mat_id);
90 static
92 bool sense,
93 const std::string& bndry_name);
94 static
95 void SetMatIDToAll(int mat_id);
96
97 static
98 void SetMatIDFromLuaFunction(const std::string& lua_fname);
99 static
100 void SetBndryIDFromLuaFunction(const std::string& lua_fname);
101 //01d
102 static
104 //02
105 virtual void Execute();
106
107
108
109
110};
111
112#endif //CHI_VOLUMEMESHER_H
const VolumeMesherType type_
MeshContinuumPtr & GetContinuum()
static void SetBndryIDFromLogical(const chi_mesh::LogicalVolume &log_vol, bool sense, const std::string &bndry_name)
static void SetMatIDFromLogical(const chi_mesh::LogicalVolume &log_vol, bool sense, int mat_id)
void SetContinuum(MeshContinuumPtr &grid)
static void CreatePolygonCells(const chi_mesh::UnpartitionedMesh &umesh, chi_mesh::MeshContinuumPtr &grid)
static std::tuple< int, int, int > GetCellXYZPartitionID(chi_mesh::Cell *cell)
static void SetMatIDFromLuaFunction(const std::string &lua_fname)
void SetGridAttributes(MeshAttributes new_attribs, std::array< size_t, 3 > ortho_Nis={0, 0, 0})
virtual ~VolumeMesher()=default
VolumeMesher(VolumeMesherType type)
VolumeMesherType Type() const
static void SetBndryIDFromLuaFunction(const std::string &lua_fname)
VOLUME_MESHER_OPTIONS options
chi_mesh::MeshContinuumPtr grid_ptr_
static std::pair< int, int > GetCellXYPartitionID(chi_mesh::Cell *cell)
static void SetMatIDToAll(int mat_id)
@ MATID_FROM_LUA_FUNCTION
@ BNDRYID_FROM_LUA_FUNCTION
std::shared_ptr< MeshContinuum > MeshContinuumPtr
Definition: chi_mesh.h:44
MeshAttributes
Definition: chi_mesh.h:70