Nektar++
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)
 

Public Attributes

int x
 
int y
 
int z
 
double scalar
 

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 34 of file VtkToFld.cpp.

Constructor & Destructor Documentation

◆ Vertex()

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

Definition at line 36 of file VtkToFld.cpp.

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

Member Function Documentation

◆ operator==()

bool Vertex::operator== ( const Vertex v)
inline

Definition at line 47 of file VtkToFld.cpp.

48  {
49  return (x == v.x && y == v.y && z == v.z);
50  }

References x, y, and z.

Member Data Documentation

◆ scalar

double Vertex::scalar

Definition at line 45 of file VtkToFld.cpp.

◆ x

int Vertex::x

Definition at line 42 of file VtkToFld.cpp.

Referenced by operator==().

◆ y

int Vertex::y

Definition at line 43 of file VtkToFld.cpp.

Referenced by operator==().

◆ z

int Vertex::z

Definition at line 44 of file VtkToFld.cpp.

Referenced by operator==().