ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/CAD4FE/src/CAD4FE_GlobalEdgeCriteria.h
Revision: 1158
Committed: Thu Jun 13 22:18:49 2024 UTC (11 months, 1 week ago) by francois
Content type: text/plain
File size: 3423 byte(s)
Log Message:
compatibilité Ubuntu 22.04
Suppression des refeences à Windows
Ajout d'une banière

File Contents

# User Rev Content
1 francois 1158 //####//------------------------------------------------------------
2     //####//------------------------------------------------------------
3     //####// MAGiC
4     //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5     //####// Departement de Genie Mecanique - UQTR
6     //####//------------------------------------------------------------
7     //####// MAGIC est un projet de recherche de l equipe ERICCA
8     //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9     //####// http://www.uqtr.ca/ericca
10     //####// http://www.uqtr.ca/
11     //####//------------------------------------------------------------
12     //####//------------------------------------------------------------
13     //####//
14     //####// CAD4FE_GlobalEdgeCriteria.h
15     //####//
16     //####//------------------------------------------------------------
17     //####//------------------------------------------------------------
18     //####// COPYRIGHT 2000-2024
19     //####// jeu 13 jun 2024 11:58:56 EDT
20     //####//------------------------------------------------------------
21     //####//------------------------------------------------------------
22 foucault 27
23     #ifndef CAD4FE_GlobalEdgeCriteriaH
24     #define CAD4FE_GlobalEdgeCriteriaH
25    
26     #include "CAD4FE_MCT_Platform.h"
27    
28     #include <vector>
29     #include <map>
30    
31     class MG_SEGMENT;
32     class MG_MAILLAGE;
33     namespace CAD4FE {
34    
35     class MCAA;
36     class MCEdge;
37     class MCVertex;
38     class LocalEdgeCriteria;
39    
40 francois 1158 class GlobalEdgeCriteria {
41 foucault 27 public:
42     typedef std::map <MG_SEGMENT *, LocalEdgeCriteria*> LEC;
43     typedef std::map <MG_SEGMENT *, LocalEdgeCriteria*>::iterator LEC_Iterator;
44     typedef std::map <MG_SEGMENT *, LocalEdgeCriteria*>::const_iterator LEC_CIterator;
45    
46     GlobalEdgeCriteria (MCEdge *, MCAA *);
47     ~GlobalEdgeCriteria();
48    
49     void Init();
50     void Init(MG_SEGMENT * __seg);
51     LocalEdgeCriteria * CreateLocalEdgeCriteria(MG_SEGMENT* __seg);
52     bool Delete(MG_SEGMENT * __seg);
53    
54 francois 1158 void ReInit(MG_SEGMENT * __touchingSeg);
55     void Update(MG_SEGMENT * __touchingSeg, bool __reconstructNormalOffsets);
56     void Update(MCEdge * __touchingEdge, bool __reconstructNormalOffsets);
57 foucault 27 void Update(bool __reconstructNormalOffsets);
58    
59     MCEdge * GetEdge();
60    
61     std::vector <LocalEdgeCriteria *> GetLocalEdgeCriteria();
62 francois 1158 LocalEdgeCriteria * GetFirstLocalEdgeCriteria(LEC_Iterator & __it);
63 foucault 27 LocalEdgeCriteria * GetNextLocalEdgeCriteria(LEC_Iterator & __it);
64    
65     LocalEdgeCriteria * GetLocalEdgeCriteria(MG_SEGMENT *);
66 francois 1158 void ChangeTopo(GlobalEdgeCriteria * __src);
67 foucault 27
68 francois 1158 void CheckMCTess();
69    
70 foucault 27 /// score of MCT operators
71     double DeletionScore();
72     double CollapseToVertexScore(MCVertex **);
73     double SplitScore(double __splitPoint[3]);
74     static double SplitScore(MCAA * __mcaa, MCVertex * __mcVertex);
75     static double SplitScore(LocalEdgeCriteria * vecEC[2]);
76    
77     /// global criteria
78     /// deletion score regarding minimum edge length (> L_lim)
79     double DeletionScore_EdgeLength() const;
80    
81     /// total length of all local segments
82     double GetLength() const;
83    
84     // average value of local criteria regarding meshing problems
85     /// deletion score regarding minimum width of face
86     double DeletionScore_FaceWidth() const;
87     /// deletion score regarding deviation angle problem
88     double DeletionScore_DeviationAngle() const;
89    
90     private:
91     void _Update();
92    
93     MCEdge * _mcEdge;
94     MCAA * _mcaa;
95     LEC _lec;
96     };
97    
98     }
99    
100     #endif