-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMeshRegions.h
More file actions
45 lines (44 loc) · 1.8 KB
/
Copy pathMeshRegions.h
File metadata and controls
45 lines (44 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef MESHREGIONS_H
#define MESHREGIONS_H
#include "MeshRegion.h"
#include <cmath>
#include <map>
#include <set>
#include <string>
#include <vector>
// regions manipulation
// related with physics
class MeshRegions : public MeshRegion {
public:
MeshRegions(std::string name, double tolerance);
int AddRegion(const MeshRegion ®ion);
int AddRegion(const MeshRegion ®ion, std::set<int> &excludePts);
int outXml(std::string filename);
int defineBoundary(void *edgeFun, int N, int bndID, int Ncurve = 2,
int direction = 1, void *mapFun = nullptr);
int defineBoundary(std::map<int, void *> edgeFuns,
double angle = 10. / 180. * M_PI);
int outCOMPO(std::string filename, std::vector<int> comps);
void outOuterRegion(std::string filename,
std::vector<std::vector<double>> box,
std::vector<double> center, double radius, bool exclude);
void outInnerRegion(std::string filename,
std::vector<std::vector<double>> breakpts,
std::vector<double> center, double radius);
int RemapPts(void *mapFun);
int omeshBoundaryMapping(std::map<int, int> &mapping,
std::vector<int> &unSharedPts, std::string filename,
std::vector<double> center, double radius);
int defineCurvedBoundary(int bid, void *edgeFun);
private:
std::map<int, std::vector<int>> m_boundary;
void findAllBoundaryEdges();
std::set<int> m_allBoundaryEdges;
std::vector<int> m_curvedEdges;
std::vector<std::vector<double>> m_curvedPoints;
void outGeo(std::string filename, std::vector<std::vector<double>> box,
std::vector<std::vector<int>> unSharedPts);
int ExcludePts(std::set<int> &excludePts);
std::map<int, int> m_boundarydefinitionStats;
};
#endif