File: clusters.hpp

package info (click to toggle)
netgen 6.2.2601%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,076 kB
  • sloc: cpp: 166,627; tcl: 6,310; python: 2,868; sh: 528; makefile: 90
file content (46 lines) | stat: -rw-r--r-- 1,212 bytes parent folder | download | duplicates (4)
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
46
#ifndef NETGEN_CLUSTERS_HPP
#define NETGEN_CLUSTERS_HPP

/**************************************************************************/
/* File:   clusers.hh                                                     */
/* Author: Joachim Schoeberl                                              */
/* Date:   28. Apr. 01                                                    */
/**************************************************************************/

/*
  Anisotropic clusters

  nodes, edges, faces, elements
*/

#include "meshclass.hpp"

namespace netgen
{

class AnisotropicClusters
{
  const Mesh & mesh;

  int nv, ned, nfa, ne;

  // connected nodes, nodes = vertices, edges, faces, elements
  NgArray<int> cluster_reps;

public:
  AnisotropicClusters (const Mesh & amesh);
  ~AnisotropicClusters();

  void Update();

  int GetVertexRepresentant (int vnr) const
  { return cluster_reps.Get(vnr); }
  int GetEdgeRepresentant (int ednr) const
  { return cluster_reps.Get(nv+ednr); }
  int GetFaceRepresentant (int fnr) const
  { return cluster_reps.Get(nv+ned+fnr); }
  int GetElementRepresentant (int enr) const
  { return cluster_reps.Get(nv+ned+nfa+enr); }
};
} // namespace netgen
#endif // NETGEN_CLUSTERS_HPP