Continuum Membrane 719025a62b1e384a6ff80e2f2a223ef4012153dc
Loading...
Searching...
No Matches
Vertex.hpp
Go to the documentation of this file.
1
11#pragma once
12
13#include <vector>
14
16#include "mesh/Face.hpp"
17//#include <Edge.hpp>
19
23enum class VertexType
24{
26 Real,
27
30
33
36
38 Ghost
39};
40
44class Vertex
45{
46
47public:
48 int index;
49 // Coordinates
53 // Geometry
54 std::vector<int> adjacentVertices;
55 std::vector<int> adjacentFaces;
57 // Layer and Boundary Condition
58 int layerIndex = 0;
61 bool isBoundary = false;
63 // Forces
66
67 //Halfedge* halfedge; ///< one half edge
68
76 bool isGhost = false;
77
83
91 Vertex(const int index, const double x, const double y, const double z);
92
98 Vertex(const int index, const Matrix &coord);
99
107
114 void approximate_unit_normal_vector(std::vector<Face> &faces);
115};
116
This file defines the face class, which is the triangular element defined by vertices.
The Force class defines corresponding force terms type. Note that all the forces are gsl matrices wit...
VertexType
The type of vertex.
Definition Vertex.hpp:24
@ PeriodicReflectiveBoundary
This class includes 7 components in calculating force exerted on vertrices: force due to membrane ben...
Definition Force.hpp:32
Matrix used in continuum membrane model.
Definition Linear_algebra.hpp:65
Defines a vertex in Mesh.
Definition Vertex.hpp:45
Force forcePrev
force exerted on the vertex from the previous iteration
Definition Vertex.hpp:65
Vertex(const int index, const Matrix &coord)
Constructs a new Vertex object with Matrix of size (3,1)
void approximate_unit_normal_vector(std::vector< Face > &faces)
Approximate the normal vector of the current vertex by averaging the normal vector of all surrounding...
int index
index number of the vertex
Definition Vertex.hpp:48
Vertex(const int index, const double x, const double y, const double z)
Constructs a new Vertex object with x,y,z coordinates.
std::vector< int > adjacentFaces
inde of adjacent faces
Definition Vertex.hpp:55
bool isGhost
“Ghost vertices” are defined as points on the boundary of the triangular mesh that only serve to prov...
Definition Vertex.hpp:76
Matrix coord
coordinate of the vertex
Definition Vertex.hpp:50
void update_coord_with_prev_coord()
Update the current vertex coordinate with the previous coordinate by copying the values of the previo...
bool isBoundary
Definition Vertex.hpp:61
std::vector< int > adjacentVertices
index of adjacent vertices
Definition Vertex.hpp:54
Matrix normVector
normal vector to the corresponding point on limit surface
Definition Vertex.hpp:56
int reflectiveVertexIndex
reflective vertex used in periodic boundary condition
Definition Vertex.hpp:60
Vertex()
Construct a new Vertex object with members declared not initialized.
VertexType type
used in boundary condition
Definition Vertex.hpp:59
Matrix coordRef
reference coordinate
Definition Vertex.hpp:52
Matrix coordPrev
coordinate of previous step
Definition Vertex.hpp:51
int layerIndex
used in multi-layer (a.k.a. leaflet) model; 0 for middle layer; +1 for upper layer
Definition Vertex.hpp:58
Force force
force exerted on the vertex
Definition Vertex.hpp:64