Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/netgen/libsrc/meshing/clusters.hpp
3206 views
1
#ifndef CLUSTERS
2
#define CLUSTERS
3
4
/**************************************************************************/
5
/* File: clusers.hh */
6
/* Author: Joachim Schoeberl */
7
/* Date: 28. Apr. 01 */
8
/**************************************************************************/
9
10
/*
11
Anisotropic clusters
12
13
nodes, edges, faces, elements
14
*/
15
16
17
class AnisotropicClusters
18
{
19
const Mesh & mesh;
20
21
int nv, ned, nfa, ne;
22
23
// connected nodes, nodes = vertices, edges, faces, elements
24
ARRAY<int> cluster_reps;
25
26
public:
27
AnisotropicClusters (const Mesh & amesh);
28
~AnisotropicClusters();
29
30
void Update();
31
32
int GetVertexRepresentant (int vnr) const
33
{ return cluster_reps.Get(vnr); }
34
int GetEdgeRepresentant (int ednr) const
35
{ return cluster_reps.Get(nv+ednr); }
36
int GetFaceRepresentant (int fnr) const
37
{ return cluster_reps.Get(nv+ned+fnr); }
38
int GetElementRepresentant (int enr) const
39
{ return cluster_reps.Get(nv+ned+nfa+enr); }
40
};
41
42
#endif
43
44