netgen/libsrc/meshing/clusters.hpp

43 lines
1.1 KiB
C++
Raw Normal View History

2009-01-13 04:40:13 +05:00
#ifndef CLUSTERS
#define CLUSTERS
/**************************************************************************/
/* File: clusers.hh */
/* Author: Joachim Schoeberl */
/* Date: 28. Apr. 01 */
/**************************************************************************/
/*
Anisotropic clusters
nodes, edges, faces, elements
*/
class AnisotropicClusters
{
const Mesh & mesh;
int nv, ned, nfa, ne;
// connected nodes, nodes = vertices, edges, faces, elements
2009-01-25 17:35:25 +05:00
Array<int> cluster_reps;
2009-01-13 04:40:13 +05:00
public:
AnisotropicClusters (const Mesh & amesh);
~AnisotropicClusters();
2018-01-04 17:00:01 +05:00
void Update(TaskManager tm = &DummyTaskManager, Tracer trace = &DummyTracer);
2009-01-13 04:40:13 +05:00
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); }
};
#endif