Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MsqVertex Class Reference

MsqVertex is the Mesquite object that stores information about the vertices in the mesh. More...

#include <MsqVertex.hpp>

Inheritance diagram for MsqVertex:
Collaboration diagram for MsqVertex:

Public Types

enum  FlagMaskID {
  MSQ_NO_VTX_FLAG = 0, MSQ_ALGO_FLAG0 = 1<<0, MSQ_SOFT_FIXED = 1<<1, MSQ_HARD_FIXED = 1<<2,
  MSQ_COORDS_CHANGED = 1<<3, MSQ_FLAG_3 = 1<<4, MSQ_FLAG_4 = 1<<5, MSQ_ALGO_FLAG1 = 1<<6,
  MSQ_ALGO_FLAG2 = 1<<7, MSQ_NO_VTX_FLAG = 0, MSQ_ALGO_FLAG0 = 1<<0, MSQ_SOFT_FIXED = 1<<1,
  MSQ_HARD_FIXED = 1<<2, MSQ_COORDS_CHANGED = 1<<3, MSQ_FLAG_3 = 1<<4, MSQ_FLAG_4 = 1<<5,
  MSQ_ALGO_FLAG1 = 1<<6, MSQ_ALGO_FLAG2 = 1<<7
}
 Those are the available flags... More...
 
enum  FlagMaskID {
  MSQ_NO_VTX_FLAG = 0, MSQ_ALGO_FLAG0 = 1<<0, MSQ_SOFT_FIXED = 1<<1, MSQ_HARD_FIXED = 1<<2,
  MSQ_COORDS_CHANGED = 1<<3, MSQ_FLAG_3 = 1<<4, MSQ_FLAG_4 = 1<<5, MSQ_ALGO_FLAG1 = 1<<6,
  MSQ_ALGO_FLAG2 = 1<<7, MSQ_NO_VTX_FLAG = 0, MSQ_ALGO_FLAG0 = 1<<0, MSQ_SOFT_FIXED = 1<<1,
  MSQ_HARD_FIXED = 1<<2, MSQ_COORDS_CHANGED = 1<<3, MSQ_FLAG_3 = 1<<4, MSQ_FLAG_4 = 1<<5,
  MSQ_ALGO_FLAG1 = 1<<6, MSQ_ALGO_FLAG2 = 1<<7
}
 
typedef unsigned char FlagMask
 
typedef unsigned char FlagMask
 

Public Member Functions

 MsqVertex (double x, double y, double z)
 Construct vertex using three doubles. More...
 
 MsqVertex (const Vector3D &vec)
 Construct vertex using Vector3D. More...
 
 MsqVertex ()
 Construct default vertex with coordinates (0.0,0.0,0.0) More...
 
 MsqVertex (const MsqVertex &rhs)
 Construct default vertex with coordinates (0.0,0.0,0.0) More...
 
MsqVertexoperator= (const Vector3D &rhs)
 Initializes with coordinates. Sets tag data/pointer to 0. More...
 
bool is_free_vertex () const
 Returns true if vertex is ``free''. More...
 
void set_soft_fixed_flag ()
 
void remove_soft_fixed_flag ()
 
void set_hard_fixed_flag ()
 
void set_vertex_flag (FlagMaskID flag)
 
void remove_vertex_flag (FlagMaskID flag)
 
bool is_flag_set (FlagMaskID flag) const
 
 MsqVertex (double x, double y, double z)
 Construct vertex using three doubles. More...
 
 MsqVertex (const Vector3D &vec)
 Construct vertex using Vector3D. More...
 
 MsqVertex ()
 Construct default vertex with coordinates (0.0,0.0,0.0) More...
 
 MsqVertex (const MsqVertex &rhs)
 Construct default vertex with coordinates (0.0,0.0,0.0) More...
 
MsqVertexoperator= (const Vector3D &rhs)
 Initializes with coordinates. Sets tag data/pointer to 0. More...
 
bool is_free_vertex () const
 Returns true if vertex is ``free''. More...
 
void set_soft_fixed_flag ()
 
void remove_soft_fixed_flag ()
 
void set_hard_fixed_flag ()
 
void set_vertex_flag (FlagMaskID flag)
 
void remove_vertex_flag (FlagMaskID flag)
 
bool is_flag_set (FlagMaskID flag) const
 
- Public Member Functions inherited from Vector3D
 Vector3D ()
 
 Vector3D (const double &x, const double &y, const double &z)
 
 Vector3D (const double xyz[3])
 
 Vector3D (const Vector3D &to_copy)
 
double x () const
 
double y () const
 
double z () const
 
void get_coordinates (double &x, double &y, double &z) const
 
void get_coordinates (double xyz[3]) const
 
const double & operator[] (size_t index) const
 
void x (const double x)
 
void y (const double y)
 
void z (const double z)
 
void set (const double x, const double y, const double z)
 
void set (const double xyz[3])
 
void set (const Vector3D &to_copy)
 
double & operator[] (size_t index)
 
Vector3Doperator= (const Vector3D &to_copy)
 
Vector3Doperator= (const double &to_copy)
 
Vector3D operator- () const
 
Vector3Doperator*= (const double scalar)
 
Vector3Doperator/= (const double scalar)
 divides each Vector3D entry by the given scalar. More...
 
Vector3Doperator*= (const Vector3D &rhs)
 
Vector3Doperator+= (const Vector3D &rhs)
 
Vector3Doperator-= (const Vector3D &rhs)
 
int within_tolerance_box (const Vector3D &compare_to, double tolerance) const
 
double length_squared () const
 
double length () const
 
void set_length (const double new_length)
 
void normalize ()
 
const double * to_array () const
 
 Vector3D ()
 
 Vector3D (const double &x, const double &y, const double &z)
 
 Vector3D (const double xyz[3])
 
 Vector3D (const Vector3D &to_copy)
 
double x () const
 
double y () const
 
double z () const
 
void get_coordinates (double &x, double &y, double &z) const
 
void get_coordinates (double xyz[3]) const
 
const double & operator[] (size_t index) const
 
void x (const double x)
 
void y (const double y)
 
void z (const double z)
 
void set (const double x, const double y, const double z)
 
void set (const double xyz[3])
 
void set (const Vector3D &to_copy)
 
double & operator[] (size_t index)
 
Vector3Doperator= (const Vector3D &to_copy)
 
Vector3Doperator= (const double &to_copy)
 
Vector3D operator- () const
 
Vector3Doperator*= (const double scalar)
 
Vector3Doperator/= (const double scalar)
 
Vector3Doperator*= (const Vector3D &rhs)
 
Vector3Doperator+= (const Vector3D &rhs)
 
Vector3Doperator-= (const Vector3D &rhs)
 
int within_tolerance_box (const Vector3D &compare_to, double tolerance) const
 
double length_squared () const
 
double length () const
 
void set_length (const double new_length)
 
void normalize ()
 
const double * to_array () const
 

Private Attributes

FlagMask vertexBitFlags
 

Friends

class Mesquite::MeshSet
 

Additional Inherited Members

- Static Public Member Functions inherited from Vector3D
static double distance_between (const Vector3D &p1, const Vector3D &p2)
 
static double interior_angle (const Vector3D &a, const Vector3D &b, MsqError &err)
 
static Vector3D interpolate (const double param, const Vector3D &p1, const Vector3D &p2)
 
static double distance_between (const Vector3D &p1, const Vector3D &p2)
 
static double interior_angle (const Vector3D &a, const Vector3D &b, MsqError &err)
 
static Vector3D interpolate (const double param, const Vector3D &p1, const Vector3D &p2)
 
- Protected Attributes inherited from Vector3D
double mCoords [3]
 

Detailed Description

MsqVertex is the Mesquite object that stores information about the vertices in the mesh.

This class has no virtual destructor for performance reasons. !!! Make sure NOT to delete a MsqVertex object from a pointer to Vector3D !!!

Definition at line 53 of file includeLinks/MsqVertex.hpp.

Member Typedef Documentation

typedef unsigned char FlagMask

Definition at line 84 of file includeLinks/MsqVertex.hpp.

typedef unsigned char FlagMask

Definition at line 84 of file src/Mesh/MsqVertex.hpp.

Member Enumeration Documentation

enum FlagMaskID

Those are the available flags...

currently only return is_free. Developers: The values used in that enum are used by a bitset, so they have to be 2-based (2,4,8,16,32, ...)

Enumerator
MSQ_NO_VTX_FLAG 
MSQ_ALGO_FLAG0 

vertex is "free"

MSQ_SOFT_FIXED 

vertex is fixed. This flag can be set on and off.

MSQ_HARD_FIXED 

vertex is always fixed. This can only be set on and never off.

MSQ_COORDS_CHANGED 
MSQ_FLAG_3 
MSQ_FLAG_4 
MSQ_ALGO_FLAG1 

free bit, to be used by algorithm if needed.

MSQ_ALGO_FLAG2 

free bit, to be used by algorithm if needed.

MSQ_NO_VTX_FLAG 
MSQ_ALGO_FLAG0 

vertex is "free"

MSQ_SOFT_FIXED 

vertex is fixed. This flag can be set on and off.

MSQ_HARD_FIXED 

vertex is always fixed. This can only be set on and never off.

MSQ_COORDS_CHANGED 
MSQ_FLAG_3 
MSQ_FLAG_4 
MSQ_ALGO_FLAG1 

free bit, to be used by algorithm if needed.

MSQ_ALGO_FLAG2 

free bit, to be used by algorithm if needed.

Definition at line 91 of file includeLinks/MsqVertex.hpp.

92  {
93  MSQ_NO_VTX_FLAG = 0,
94  MSQ_ALGO_FLAG0 = 1<<0,
95  MSQ_SOFT_FIXED = 1<<1,
96  MSQ_HARD_FIXED = 1<<2,
97  MSQ_COORDS_CHANGED = 1<<3,
98  MSQ_FLAG_3 = 1<<4,
99  MSQ_FLAG_4 = 1<<5,
100  MSQ_ALGO_FLAG1 = 1<<6,
101  MSQ_ALGO_FLAG2 = 1<<7
102  };
vertex is fixed. This flag can be set on and off.
free bit, to be used by algorithm if needed.
vertex is always fixed. This can only be set on and never off.
free bit, to be used by algorithm if needed.
enum FlagMaskID
Enumerator
MSQ_NO_VTX_FLAG 
MSQ_ALGO_FLAG0 

vertex is "free"

MSQ_SOFT_FIXED 

vertex is fixed. This flag can be set on and off.

MSQ_HARD_FIXED 

vertex is always fixed. This can only be set on and never off.

MSQ_COORDS_CHANGED 
MSQ_FLAG_3 
MSQ_FLAG_4 
MSQ_ALGO_FLAG1 

free bit, to be used by algorithm if needed.

MSQ_ALGO_FLAG2 

free bit, to be used by algorithm if needed.

MSQ_NO_VTX_FLAG 
MSQ_ALGO_FLAG0 

vertex is "free"

MSQ_SOFT_FIXED 

vertex is fixed. This flag can be set on and off.

MSQ_HARD_FIXED 

vertex is always fixed. This can only be set on and never off.

MSQ_COORDS_CHANGED 
MSQ_FLAG_3 
MSQ_FLAG_4 
MSQ_ALGO_FLAG1 

free bit, to be used by algorithm if needed.

MSQ_ALGO_FLAG2 

free bit, to be used by algorithm if needed.

Definition at line 91 of file src/Mesh/MsqVertex.hpp.

92  {
93  MSQ_NO_VTX_FLAG = 0,
94  MSQ_ALGO_FLAG0 = 1<<0,
95  MSQ_SOFT_FIXED = 1<<1,
96  MSQ_HARD_FIXED = 1<<2,
97  MSQ_COORDS_CHANGED = 1<<3,
98  MSQ_FLAG_3 = 1<<4,
99  MSQ_FLAG_4 = 1<<5,
100  MSQ_ALGO_FLAG1 = 1<<6,
101  MSQ_ALGO_FLAG2 = 1<<7
102  };
vertex is fixed. This flag can be set on and off.
free bit, to be used by algorithm if needed.
vertex is always fixed. This can only be set on and never off.
free bit, to be used by algorithm if needed.

Constructor & Destructor Documentation

MsqVertex ( double  x,
double  y,
double  z 
)
inline

Construct vertex using three doubles.

Definition at line 57 of file includeLinks/MsqVertex.hpp.

MsqVertex ( const Vector3D vec)
inline

Construct vertex using Vector3D.

Definition at line 62 of file includeLinks/MsqVertex.hpp.

MsqVertex ( )
inline

Construct default vertex with coordinates (0.0,0.0,0.0)

Definition at line 67 of file includeLinks/MsqVertex.hpp.

MsqVertex ( const MsqVertex rhs)
inline

Construct default vertex with coordinates (0.0,0.0,0.0)

Definition at line 72 of file includeLinks/MsqVertex.hpp.

MsqVertex ( double  x,
double  y,
double  z 
)
inline

Construct vertex using three doubles.

Definition at line 57 of file src/Mesh/MsqVertex.hpp.

MsqVertex ( const Vector3D vec)
inline

Construct vertex using Vector3D.

Definition at line 62 of file src/Mesh/MsqVertex.hpp.

MsqVertex ( )
inline

Construct default vertex with coordinates (0.0,0.0,0.0)

Definition at line 67 of file src/Mesh/MsqVertex.hpp.

MsqVertex ( const MsqVertex rhs)
inline

Construct default vertex with coordinates (0.0,0.0,0.0)

Definition at line 72 of file src/Mesh/MsqVertex.hpp.

Member Function Documentation

bool is_flag_set ( FlagMaskID  flag) const
inline

Definition at line 122 of file includeLinks/MsqVertex.hpp.

References MsqVertex::vertexBitFlags.

Referenced by MsqFreeVertexIndexIterator::next().

123  { return (vertexBitFlags & flag) != 0; }

Here is the caller graph for this function:

bool is_flag_set ( FlagMaskID  flag) const
inline

Definition at line 122 of file src/Mesh/MsqVertex.hpp.

References MsqVertex::vertexBitFlags.

123  { return (vertexBitFlags & flag) != 0; }
bool is_free_vertex ( ) const
inline

Returns true if vertex is ``free''.

Definition at line 104 of file includeLinks/MsqVertex.hpp.

References MsqVertex::MSQ_HARD_FIXED, MsqVertex::MSQ_SOFT_FIXED, and MsqVertex::vertexBitFlags.

Referenced by LPtoPTemplate::compute_analytical_hessian().

105  { return (vertexBitFlags & (MSQ_SOFT_FIXED|MSQ_HARD_FIXED)) == 0; }
vertex is fixed. This flag can be set on and off.
vertex is always fixed. This can only be set on and never off.

Here is the caller graph for this function:

bool is_free_vertex ( ) const
inline

Returns true if vertex is ``free''.

Definition at line 104 of file src/Mesh/MsqVertex.hpp.

References MsqVertex::MSQ_HARD_FIXED, MsqVertex::MSQ_SOFT_FIXED, and MsqVertex::vertexBitFlags.

105  { return (vertexBitFlags & (MSQ_SOFT_FIXED|MSQ_HARD_FIXED)) == 0; }
vertex is fixed. This flag can be set on and off.
vertex is always fixed. This can only be set on and never off.
MsqVertex& operator= ( const Vector3D rhs)
inline

Initializes with coordinates. Sets tag data/pointer to 0.

Definition at line 77 of file includeLinks/MsqVertex.hpp.

References Vector3D::operator=(), and MsqVertex::vertexBitFlags.

79  vertexBitFlags = 0;
80  return *this; }
Vector3D & operator=(const Vector3D &to_copy)
NT rhs

Here is the call graph for this function:

MsqVertex& operator= ( const Vector3D rhs)
inline

Initializes with coordinates. Sets tag data/pointer to 0.

Definition at line 77 of file src/Mesh/MsqVertex.hpp.

References Vector3D::operator=(), and MsqVertex::vertexBitFlags.

79  vertexBitFlags = 0;
80  return *this; }
Vector3D & operator=(const Vector3D &to_copy)
NT rhs

Here is the call graph for this function:

void remove_soft_fixed_flag ( )
inline

Definition at line 110 of file includeLinks/MsqVertex.hpp.

References MsqVertex::MSQ_SOFT_FIXED, and MsqVertex::vertexBitFlags.

111  { vertexBitFlags &= (~MSQ_SOFT_FIXED); }
vertex is fixed. This flag can be set on and off.
void remove_soft_fixed_flag ( )
inline

Definition at line 110 of file src/Mesh/MsqVertex.hpp.

References MsqVertex::MSQ_SOFT_FIXED, and MsqVertex::vertexBitFlags.

111  { vertexBitFlags &= (~MSQ_SOFT_FIXED); }
vertex is fixed. This flag can be set on and off.
void remove_vertex_flag ( FlagMaskID  flag)
inline

Definition at line 119 of file includeLinks/MsqVertex.hpp.

References MsqVertex::vertexBitFlags.

120  { vertexBitFlags &= (~flag); }
void remove_vertex_flag ( FlagMaskID  flag)
inline

Definition at line 119 of file src/Mesh/MsqVertex.hpp.

References MsqVertex::vertexBitFlags.

120  { vertexBitFlags &= (~flag); }
void set_hard_fixed_flag ( )
inline

Definition at line 113 of file src/Mesh/MsqVertex.hpp.

References MsqVertex::MSQ_HARD_FIXED, and MsqVertex::vertexBitFlags.

vertex is always fixed. This can only be set on and never off.
void set_hard_fixed_flag ( )
inline

Definition at line 113 of file includeLinks/MsqVertex.hpp.

References MsqVertex::MSQ_HARD_FIXED, and MsqVertex::vertexBitFlags.

vertex is always fixed. This can only be set on and never off.
void set_soft_fixed_flag ( )
inline

Definition at line 107 of file src/Mesh/MsqVertex.hpp.

References MsqVertex::MSQ_SOFT_FIXED, and MsqVertex::vertexBitFlags.

vertex is fixed. This flag can be set on and off.
void set_soft_fixed_flag ( )
inline

Definition at line 107 of file includeLinks/MsqVertex.hpp.

References MsqVertex::MSQ_SOFT_FIXED, and MsqVertex::vertexBitFlags.

vertex is fixed. This flag can be set on and off.
void set_vertex_flag ( FlagMaskID  flag)
inline

Definition at line 116 of file includeLinks/MsqVertex.hpp.

References MsqVertex::vertexBitFlags.

117  { vertexBitFlags|=flag; }
void set_vertex_flag ( FlagMaskID  flag)
inline

Definition at line 116 of file src/Mesh/MsqVertex.hpp.

References MsqVertex::vertexBitFlags.

117  { vertexBitFlags|=flag; }

Friends And Related Function Documentation

Definition at line 128 of file includeLinks/MsqVertex.hpp.

Member Data Documentation


The documentation for this class was generated from the following files: