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
|
2019-07-09 13:39:16 +05:00
|
|
|
NgArray<int> cluster_reps;
|
2009-01-13 04:40:13 +05:00
|
|
|
|
|
|
|
public:
|
|
|
|
AnisotropicClusters (const Mesh & amesh);
|
|
|
|
~AnisotropicClusters();
|
|
|
|
|
2020-08-17 18:55:15 +05:00
|
|
|
void Update(NgTaskManager tm = &DummyTaskManager, NgTracer 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
|