Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
Vertex Struct Reference

Represents a vertex in the mesh. More...

Public Member Functions

 Vertex (double pX, double pY, double pZ, double pScalar, double factor)
 
bool operator== (const Vertex &v)
 
 Vertex ()
 
 Vertex (int id, double x, double y)
 
void init (int id, double x, double y)
 

Public Attributes

double X
 
double Y
 
double Z
 
int x
 
int y
 
int z
 
double scalar
 
int m_id
 
double m_x
 
double m_y
 

Detailed Description

Represents a vertex in the mesh.

Each vertex has a 3-component coordinate and a scalar value associated with it. The factor provides a mechanism to specify precision of the coordinate comparison. Although coordinates are provided as floating-point numbers, they are stored as integers. The integer value is computed as floor (x * factor) Therefore a factor of 100 would ensure a precision of 0.01 in the comparison.

Definition at line 22 of file makeEllipsoidNektar.c.

Constructor & Destructor Documentation

Vertex::Vertex ( double  pX,
double  pY,
double  pZ,
double  pScalar,
double  factor 
)
inline

Definition at line 35 of file VtkToFld.cpp.

36  : x((int)floor(pX*factor)),
37  y((int)floor(pY*factor)),
38  z((int)floor(pZ*factor)),
39  scalar(pScalar) {}
int z
Definition: VtkToFld.cpp:43
int y
Definition: VtkToFld.cpp:42
double scalar
Definition: VtkToFld.cpp:44
int x
Definition: VtkToFld.cpp:41
Vertex::Vertex ( )
inline

Definition at line 47 of file VariableValence2DMeshGenerator.cpp.

47 {}
Vertex::Vertex ( int  id,
double  x,
double  y 
)
inline

Definition at line 48 of file VariableValence2DMeshGenerator.cpp.

48  :
49  m_id(id),
50  m_x(x),
51  m_y(y)
52  {}
int y
Definition: VtkToFld.cpp:42
int x
Definition: VtkToFld.cpp:41

Member Function Documentation

void Vertex::init ( int  id,
double  x,
double  y 
)
inline

Definition at line 53 of file VariableValence2DMeshGenerator.cpp.

54  {
55  m_id = id;
56  m_x = x;
57  m_y = y;
58  }
int y
Definition: VtkToFld.cpp:42
int x
Definition: VtkToFld.cpp:41
bool Vertex::operator== ( const Vertex v)
inline

Definition at line 46 of file VtkToFld.cpp.

References x, y, and z.

47  {
48  return (x == v.x && y == v.y && z == v.z);
49  }
int z
Definition: VtkToFld.cpp:43
int y
Definition: VtkToFld.cpp:42
int x
Definition: VtkToFld.cpp:41

Member Data Documentation

int Vertex::m_id

Definition at line 60 of file VariableValence2DMeshGenerator.cpp.

double Vertex::m_x

Definition at line 61 of file VariableValence2DMeshGenerator.cpp.

double Vertex::m_y

Definition at line 62 of file VariableValence2DMeshGenerator.cpp.

double Vertex::scalar

Definition at line 44 of file VtkToFld.cpp.

double Vertex::X
int Vertex::x

Definition at line 41 of file VtkToFld.cpp.

Referenced by operator==().

double Vertex::Y
int Vertex::y

Definition at line 42 of file VtkToFld.cpp.

Referenced by operator==().

double Vertex::Z
int Vertex::z

Definition at line 43 of file VtkToFld.cpp.

Referenced by operator==().