DSC
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
face.h
1 //
2 // Deformabel Simplicial Complex (DSC) method
3 // Copyright (C) 2013 Technical University of Denmark
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // See licence.txt for a copy of the GNU General Public License.
16 
17 #pragma once
18 
19 #include "simplex.h"
20 
21 namespace is_mesh
22 {
23  class Tetrahedron;
24  class Edge;
25  class Node;
26 
27  class Face : public Simplex<EdgeKey, TetrahedronKey>
28  {
29  bool interface = false;
30  public:
31  Face(ISMesh *owner) noexcept;
32 
33  Face(Face&& other) noexcept;
34 
35  Face& operator=(Face&& other) noexcept;
36 
37  const SimplexSet<EdgeKey> & edge_keys() const noexcept;
38  const SimplexSet<TetrahedronKey> & tet_keys() const noexcept;
39  const SimplexSet<NodeKey> node_keys() const noexcept;
40 
41  std::vector<Tetrahedron*> tets() const;
42  std::vector<Edge*> edges() const;
43  std::vector<Node*> nodes() const;
44 
45  vec3 get_center() const;
46 
47  vec3 get_normal() const;
48 
49  bool is_boundary() noexcept;
50 
51  bool is_interface() noexcept;
52 
53  double area() const;
54 
55  double area_destination() const;
56 
57  double min_angle() const;
58 
59  double max_angle() const;
60 
61  double quality() const;
62 
63  EdgeKey longest_edge() const;
64 
65  vec3 barycenter() const;
66 
67  FaceKey key() const noexcept;
68  private:
69  void set_interface(bool b);
70 
71  friend class ISMesh;
72  };
73 }
Definition: face.h:27
Definition: key.h:75
A 3D double vector.
Definition: Vec3d.h:26
Definition: simplex.h:33
Definition: is_mesh.h:40
Definition: key.h:82