/usr/include/gmsh/yamakawa.h is in libgmsh-dev 2.8.5+dfsg-1.1+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | // Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
//
// Contributor(s):
// Tristan Carrier
#ifndef _YAMAKAWA_H_
#define _YAMAKAWA_H_
#include "GRegion.h"
#include <set>
class Hex{
private:
double quality;
MVertex *a,*b,*c,*d,*e,*f,*g,*h;
public:
Hex();
Hex(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
~Hex();
double get_quality() const;
void set_quality(double);
MVertex* get_a();
MVertex* get_b();
MVertex* get_c();
MVertex* get_d();
MVertex* get_e();
MVertex* get_f();
MVertex* get_g();
MVertex* get_h();
void set_vertices(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
bool operator<(const Hex&) const;
};
class Facet{
private:
MVertex *a,*b,*c;
unsigned long long hash;
public:
Facet();
Facet(MVertex*,MVertex*,MVertex*);
~Facet();
MVertex* get_a();
MVertex* get_b();
MVertex* get_c();
void set_vertices(MVertex*,MVertex*,MVertex*);
bool same_vertices(Facet);
void compute_hash();
unsigned long long get_hash() const;
bool operator<(const Facet&) const;
};
class Diagonal{
private:
MVertex *a,*b;
unsigned long long hash;
public:
Diagonal();
Diagonal(MVertex*,MVertex*);
~Diagonal();
MVertex* get_a();
MVertex* get_b();
void set_vertices(MVertex*,MVertex*);
bool same_vertices(Diagonal);
void compute_hash();
unsigned long long get_hash() const;
bool operator<(const Diagonal&) const;
};
class Tuple{
private:
MVertex *v1,*v2,*v3;
MElement* element;
GFace* gf;
unsigned long long hash;
public:
Tuple();
Tuple(MVertex*,MVertex*,MVertex*,MElement*,GFace*);
Tuple(MVertex*,MVertex*,MVertex*);
~Tuple();
MVertex* get_v1();
MVertex* get_v2();
MVertex* get_v3();
MElement* get_element() const;
GFace* get_gf() const;
bool same_vertices(Tuple);
unsigned long long get_hash() const;
bool operator<(const Tuple&) const;
};
class Recombinator{
private:
std::vector<Hex> potential;
std::map<MElement*,bool> markings;
std::multiset<Facet> hash_tableA;
std::multiset<Diagonal> hash_tableB;
std::multiset<Diagonal> hash_tableC;
std::multiset<Tuple> tuples;
std::set<MElement*> triangles;
public:
Recombinator();
~Recombinator();
std::map<MVertex*,std::set<MVertex*> > vertex_to_vertices;
std::map<MVertex*,std::set<MElement*> > vertex_to_elements;
void execute();
void execute(GRegion*);
void init_markings(GRegion*);
void pattern1(GRegion*);
void pattern2(GRegion*);
void pattern3(GRegion*);
void merge(GRegion*);
void improved_merge(GRegion*);
void rearrange(GRegion*);
void statistics(GRegion*);
void build_tuples(GRegion*);
void modify_surfaces(GRegion*);
void modify_surfaces(MVertex*,MVertex*,MVertex*,MVertex*);
bool sliver(MElement*,Hex);
double diagonal(MElement*,int&,int&);
double distance(MVertex*,MVertex*);
double distance(MVertex*,MVertex*,MVertex*);
double scalar(MVertex*,MVertex*,MVertex*,MVertex*);
void two_others(int,int,int&,int&);
bool valid(Hex,const std::set<MElement*>&);
bool valid(Hex);
double eta(MVertex*,MVertex*,MVertex*,MVertex*);
bool linked(MVertex*,MVertex*);
void find(MVertex*,MVertex*,const std::vector<MVertex*>&,std::set<MVertex*>&);
void find(MVertex*,MVertex*,MVertex*,const std::vector<MVertex*>&,std::set<MVertex*>&);
void find(MVertex*,MVertex*,std::set<MElement*>&);
void find(MVertex*,Hex,std::set<MElement*>&);
MVertex* find(MVertex*,MVertex*,MVertex*,MVertex*,const std::set<MElement*>&);
void intersection(const std::set<MVertex*>&,const std::set<MVertex*>&,const std::vector<MVertex*>&,std::set<MVertex*>&);
void intersection(const std::set<MVertex*>&,const std::set<MVertex*>&,const std::set<MVertex*>&,const std::vector<MVertex*>&,std::set<MVertex*>&);
void intersection(const std::set<MElement*>&,const std::set<MElement*>&,std::set<MElement*>&);
bool inclusion(MVertex*,Hex);
bool inclusion(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
bool inclusion(MVertex*,MVertex*,MVertex*,const std::set<MElement*>&);
bool inclusion(Facet);
bool inclusion(Diagonal);
bool duplicate(Diagonal);
bool conformityA(Hex);
bool conformityA(MVertex*,MVertex*,MVertex*,MVertex*);
bool conformityB(Hex);
bool conformityC(Hex);
bool faces_statuquo(Hex);
bool faces_statuquo(MVertex*,MVertex*,MVertex*,MVertex*);
void build_vertex_to_vertices(GRegion*);
void build_vertex_to_elements(GRegion*);
void build_hash_tableA(Hex);
void build_hash_tableA(MVertex*,MVertex*,MVertex*,MVertex*);
void build_hash_tableA(Facet);
void build_hash_tableB(Hex);
void build_hash_tableB(MVertex*,MVertex*,MVertex*,MVertex*);
void build_hash_tableB(Diagonal);
void build_hash_tableC(Hex);
void build_hash_tableC(Diagonal);
void print_vertex_to_vertices(GRegion*);
void print_vertex_to_elements(GRegion*);
void print_hash_tableA();
void print_segment(SPoint3,SPoint3,std::ofstream&);
double scaled_jacobian(MVertex*,MVertex*,MVertex*,MVertex*);
double max_scaled_jacobian(MElement*,int&);
double min_scaled_jacobian(Hex);
};
class Prism{
private:
double quality;
MVertex *a,*b,*c,*d,*e,*f;
public:
Prism();
Prism(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
~Prism();
double get_quality() const;
void set_quality(double);
MVertex* get_a();
MVertex* get_b();
MVertex* get_c();
MVertex* get_d();
MVertex* get_e();
MVertex* get_f();
void set_vertices(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
bool operator<(const Prism&) const;
};
class Supplementary{
private:
std::vector<Prism> potential;
std::map<MElement*,bool> markings;
std::map<MVertex*,std::set<MVertex*> > vertex_to_vertices;
std::map<MVertex*,std::set<MElement*> > vertex_to_tetrahedra;
std::multiset<Facet> hash_tableA;
std::multiset<Diagonal> hash_tableB;
std::multiset<Diagonal> hash_tableC;
std::multiset<Tuple> tuples;
std::set<MElement*> triangles;
public:
Supplementary();
~Supplementary();
void execute();
void execute(GRegion*);
void init_markings(GRegion*);
void pattern(GRegion*);
void merge(GRegion*);
void rearrange(GRegion*);
void statistics(GRegion*);
void build_tuples(GRegion*);
void modify_surfaces(GRegion*);
void modify_surfaces(MVertex*,MVertex*,MVertex*,MVertex*);
bool four(MElement*);
bool five(MElement*);
bool six(MElement*);
bool eight(MElement*);
bool sliver(MElement*,Prism);
bool valid(Prism,const std::set<MElement*>&);
bool valid(Prism);
double eta(MVertex*,MVertex*,MVertex*,MVertex*);
bool linked(MVertex*,MVertex*);
void find(MVertex*,MVertex*,const std::vector<MVertex*>&,std::set<MVertex*>&);
void find(MVertex*,Prism,std::set<MElement*>&);
void intersection(const std::set<MVertex*>&,const std::set<MVertex*>&,const std::vector<MVertex*>&,std::set<MVertex*>&);
bool inclusion(MVertex*,Prism);
bool inclusion(MVertex*,MVertex*,MVertex*,MVertex*,MVertex*);
bool inclusion(MVertex*,MVertex*,MVertex*,const std::set<MElement*>&);
bool inclusion(Facet);
bool inclusion(Diagonal);
bool duplicate(Diagonal);
bool conformityA(Prism);
bool conformityA(MVertex*,MVertex*,MVertex*,MVertex*);
bool conformityB(Prism);
bool conformityC(Prism);
bool faces_statuquo(Prism);
bool faces_statuquo(MVertex*,MVertex*,MVertex*,MVertex*);
void build_vertex_to_vertices(GRegion*);
void build_vertex_to_tetrahedra(GRegion*);
void build_hash_tableA(Prism);
void build_hash_tableA(MVertex*,MVertex*,MVertex*,MVertex*);
void build_hash_tableA(Facet);
void build_hash_tableB(Prism);
void build_hash_tableB(MVertex*,MVertex*,MVertex*,MVertex*);
void build_hash_tableB(Diagonal);
void build_hash_tableC(Prism);
void build_hash_tableC(Diagonal);
double scaled_jacobian(MVertex*,MVertex*,MVertex*,MVertex*);
double min_scaled_jacobian(Prism);
};
class PostOp{
private:
int estimate1;
int estimate2;
int iterations;
std::map<MElement*,bool> markings;
std::map<MVertex*,std::set<MElement*> > vertex_to_tetrahedra;
std::map<MVertex*,std::set<MElement*> > vertex_to_pyramids;
std::multiset<Tuple> tuples;
std::set<MElement*> triangles;
public:
PostOp();
~PostOp();
void execute(bool);
void execute(GRegion*,bool);
void init_markings(GRegion*);
void pyramids1(GRegion*);
void pyramids2(GRegion*);
void pyramids1(MVertex*,MVertex*,MVertex*,MVertex*,GRegion*);
void pyramids2(MVertex*,MVertex*,MVertex*,MVertex*,GRegion*);
void rearrange(GRegion*);
void statistics(GRegion*);
void build_tuples(GRegion*);
void modify_surfaces(GRegion*);
void modify_surfaces(MVertex*,MVertex*,MVertex*,MVertex*);
bool four(MElement*);
bool five(MElement*);
bool six(MElement*);
bool eight(MElement*);
bool equal(MVertex*,MVertex*,MVertex*,MVertex*);
bool different(MVertex*,MVertex*,MVertex*,MVertex*);
MVertex* other(MElement*,MVertex*,MVertex*);
MVertex* other(MElement*,MVertex*,MVertex*,MVertex*);
void mean(const std::set<MVertex*>&,MVertex*,const std::vector<MElement*>&);
double workaround(MElement*);
MVertex* find(MVertex*,MVertex*,MVertex*,MVertex*,MElement*);
void find_tetrahedra(MVertex*,MVertex*,std::set<MElement*>&);
void find_pyramids(MVertex*,MVertex*,std::set<MElement*>&);
void intersection(const std::set<MElement*>&,const std::set<MElement*>&,std::set<MElement*>&);
void build_vertex_to_tetrahedra(GRegion*);
void build_vertex_to_tetrahedra(MElement*);
void erase_vertex_to_tetrahedra(MElement*);
void build_vertex_to_pyramids(GRegion*);
void build_vertex_to_pyramids(MElement*);
void erase_vertex_to_pyramids(MElement*);
};
#endif
|