Workspace 6.21.5
Public Member Functions | List of all members
Segment Class Reference

Defines a segment element class. More...

#include <Mesh/DataStructures/segment.h>

Inheritance diagram for Segment:
[legend]

Public Member Functions

 Segment (long IDnum, long compIDnum, Node &n0, Node &n1, unsigned stateSize=0, unsigned integerDataSize=0)
 
 Segment (long IDnum, long compIDnum, Node &n0, Node &n1, Vector3d &c, unsigned stateSize=0, unsigned integerDataSize=0)
 
 ~Segment () override
 
void attachElement () override
 
void attachNodes () override
 
void detachElement () override
 
const Vector3dgetArcCenter () const
 
bool getIsArc () const
 
void setArcCenter (Vector3d &c)
 
void setIsArc (bool b)
 
- Public Member Functions inherited from Element
virtual ~Element ()=default
 
virtual void attachElement ()=0
 
virtual void attachNodes ()=0
 
virtual void detachElement ()=0
 
Vector3d getCentroid () const
 
NodegetNode (int index) const
 
ElementNodesgetNodes ()
 
const ElementNodesgetNodes () const
 
NodenodeAfter (const Node &node) const
 
NodenodeBefore (const Node &node) const
 
unsigned numNodes () const
 
void setNode (int index, Node &n)
 
void setNodeStates (int index, const Vector3d &v)
 
void setNodeStates (int index, double v)
 
void setNodeStates (int index, int v)
 
bool usesNode (const Node &node) const
 
bool UsesNode (const Node &node) const
 
bool usesNode (long id) const
 
bool UsesNode (long id) const
 
const ElementNodesGetNodes () const
 
ElementNodesGetNodes ()
 
NodeGetNode (int index) const
 
void SetNode (int index, Node &n)
 
NodeNodeBefore (const Node &node) const
 
NodeNodeAfter (const Node &node) const
 
void setNodeFlags (unsigned flag, bool b=true)
 
void SetNodeFlags (unsigned flag, bool b=true)
 
void SetNodeStates (int index, double v)
 
void SetNodeStates (int index, const Vector3d &v)
 
Vector3d GetCentroid () const
 
- Public Member Functions inherited from Entity
long getCompID () const
 Get the ID of the component this entity belongs to.
 
void setCompID (long compID)
 
void SetCompID (long compID)
 
long GetCompID () const
 
- Public Member Functions inherited from NumberedObject
 NumberedObject (long ID)
 Create an object with the specified ID and all flags except isValid not set.
 
void clearFlag (unsigned flag)
 Clear flag. Do not use this to manipulate the isValid flag, since list managers are responsible for that.
 
void copyFlags (const NumberedObject &t)
 
long getID () const
 
long getIndex () const
 
bool isFlagSet (unsigned flag) const
 
bool isValid () const
 
void setFlag (unsigned flag, bool b=true)
 Set flag to b. Do not use this to manipulate the isValid flag, since list managers are responsible for that.
 
void setID (long ID)
 
void setIndex (long i)
 
void SetID (long ID)
 
long GetID () const
 
void SetIndex (long i)
 
long GetIndex () const
 
bool IsFlagSet (unsigned flag) const
 
void ClearFlag (unsigned flag)
 
void SetFlag (unsigned flag)
 
void setFlagTo (unsigned flag, bool b=true)
 
void SetFlagTo (unsigned flag, bool b=true)
 
bool IsValid () const
 
- Public Member Functions inherited from State
 State (unsigned stateSize, unsigned integerDataSize)
 
 ~State ()
 
void addToIntegerData (int index, long val)
 
void addToState (int index, const Vector3d &v)
 
void addToState (int index, double val)
 
void copyIntegerData (int index, const State &s)
 
void copyState (int index, const State &s)
 
void copyStateVector (int index, const State &s)
 
long getIntegerData (int index) const
 
double getState (int index) const
 
Vector3d getStateVector (int index) const
 
void setIntegerData (int index, long val)
 
void setState (int index, const Vector3d &v)
 
void setState (int index, double val)
 
void CopyIntegerData (int index, const State &s)
 
void AddToIntegerData (int index, long val)
 
void SetIntegerData (int index, long val)
 
long GetIntegerData (int index) const
 
void CopyStateVector (int index, const State &s)
 
void CopyState (int index, const State &s)
 
void AddToState (int index, const Vector3d &v)
 
void AddToState (int index, double val)
 
double GetState (int index) const
 
Vector3d GetStateVector (int index) const
 
void SetState (int index, double val)
 
void SetState (int index, const Vector3d &v)
 

Additional Inherited Members

- Public Types inherited from Element
typedef std::vector< Node * > ElementNodes
 
- Public Types inherited from NumberedObject
enum  {
  flag0 , flag1 , flag2 , flag3 ,
  flag4 , flag5 , flag6 , flag7 ,
  flag8 , flag9 , flag10 , flag11 ,
  flag12 , flag13 , flag14 , flag15
}
 
- Protected Member Functions inherited from Element
 Element (long IDnum, long compIDnum, unsigned stateSize=0, unsigned integerDataSize=0)
 
- Protected Member Functions inherited from Entity
 Entity (long id, long compID)
 
- Protected Attributes inherited from Element
ElementNodes nodes_
 

Detailed Description

A segment is a line connecting two nodes. The segment can be a straight line or a circular arc. In the latter case, a center must be specified for the arc.

Constructor & Destructor Documentation

◆ Segment() [1/2]

Segment ( long  IDnum,
long  compIDnum,
Node n0,
Node n1,
unsigned  stateSize = 0,
unsigned  integerDataSize = 0 
)

◆ Segment() [2/2]

Segment ( long  IDnum,
long  compIDnum,
Node n0,
Node n1,
Vector3d c,
unsigned  stateSize = 0,
unsigned  integerDataSize = 0 
)

◆ ~Segment()

~Segment ( )
override

Member Function Documentation

◆ attachElement()

void attachElement ( )
overridevirtual

Implements Element.

◆ attachNodes()

void attachNodes ( )
overridevirtual

Implements Element.

◆ detachElement()

void detachElement ( )
overridevirtual

Implements Element.

◆ getArcCenter()

const Vector3d & getArcCenter ( ) const
inline

◆ getIsArc()

bool getIsArc ( ) const
inline

◆ setArcCenter()

void setArcCenter ( Vector3d c)
inline

◆ setIsArc()

void setIsArc ( bool  b)
inline