DSC
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
tetrahedron.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 Face;
24  class Edge;
25  class Node;
26 
27  class Tetrahedron : public Simplex<FaceKey, Key>
28  {
29  unsigned int l = 0;
30 
31  // modify through ISMesh::set_label
32  void label(unsigned int _label);
33  public:
34  Tetrahedron(ISMesh *owner) noexcept;
35  Tetrahedron(ISMesh *owner, int l) noexcept;
36 
37  Tetrahedron(Tetrahedron&& other) noexcept;
38 
39  Tetrahedron& operator=(Tetrahedron&& other) noexcept;
40 
41  const SimplexSet<FaceKey> & face_keys() const noexcept;
42 
43  SimplexSet<EdgeKey> edge_keys() const;
44  SimplexSet<NodeKey> node_keys() const;
45 
46  std::vector<Face*> faces() const;
47  std::vector<Edge*> edges() const;
48  std::vector<Node*> nodes() const;
49 
50  vec3 get_center() const;
51 
52  int label() const;
53 
54  double volume() const;
55 
56  double volume_destination() const;
57 
58  vec3 barycenter() const;
59  vec3 barycenter_destination() const;
60 
61  double quality() const;
62 
63  TetrahedronKey key() const noexcept;
64 
65  friend class ISMesh;
66  };
67 }
A 3D double vector.
Definition: Vec3d.h:26
Definition: tetrahedron.h:27
Definition: key.h:89
Definition: simplex.h:33
Definition: is_mesh.h:40