netgen/libsrc/meshing/clusters.hpp

47 lines
1.2 KiB
C++
Raw Normal View History

#ifndef NETGEN_CLUSTERS_HPP
#define NETGEN_CLUSTERS_HPP
2009-01-13 04:40:13 +05:00
/**************************************************************************/
/* File: clusers.hh */
/* Author: Joachim Schoeberl */
/* Date: 28. Apr. 01 */
/**************************************************************************/
/*
Anisotropic clusters
nodes, edges, faces, elements
*/
#include "meshclass.hpp"
namespace netgen
{
2009-01-13 04:40:13 +05:00
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();
2021-05-12 13:56:34 +05:00
void Update();
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); }
};
} // namespace netgen
#endif // NETGEN_CLUSTERS_HPP