ESyS-Particle  2.3.4
Edge2D Class Reference

class for edge in 2D "mesh" More...

#include <Edge2D.h>

Inheritance diagram for Edge2D:
Collaboration diagram for Edge2D:

Public Types

typedef Vec3(Edge2D::* VectorFieldFunction) () const
 
typedef double(Edge2D::* ScalarFieldFunction) () const
 

Public Member Functions

 Edge2D (int, int, const Vec3 &, const Vec3 &, int, int)
 
void moveNode (int, const Vec3 &)
 
int getID ()
 
void applyForce (const Vec3 &f)
 
void zeroForce ()
 
Vec3 getNormal () const
 
Vec3 toGlobal (const Vec3 &)
 
Vec3 toLocal (const Vec3 &)
 
pair< int, Vec3getP0 () const
 
pair< int, Vec3getP1 () const
 
Vec3 getForce () const
 
Vec3 getForceDensity () const
 
double getPressure () const
 
void print ()
 
- Public Member Functions inherited from AEdge
 AEdge (const Vec3 &, const Vec3 &)
 
virtual ~AEdge ()
 
double sep (const Vec3 &) const
 
pair< bool, double > dist (const Vec3 &) const
 
Vec3 getBoundingBoxMin () const
 
Vec3 getBoundingBoxMax () const
 

Static Public Member Functions

static VectorFieldFunction getVectorFieldFunction (const string &)
 
static ScalarFieldFunction getScalarFieldFunction (const string &)
 

Private Attributes

Vec3 m_normal
 
Vec3 m_force
 
int m_id0
 
int m_id1
 
int m_edge_id
 
int m_tag
 

Friends

ostream & operator<< (ostream &, const Edge2D &)
 output for debugging purposes More...
 

Additional Inherited Members

- Protected Attributes inherited from AEdge
Vec3 m_p0
 
Vec3 m_p1
 

Detailed Description

class for edge in 2D "mesh"

Author
Steffen Abe $Revision$ $Date$

Member Typedef Documentation

◆ ScalarFieldFunction

typedef double(Edge2D::* Edge2D::ScalarFieldFunction) () const

◆ VectorFieldFunction

typedef Vec3(Edge2D::* Edge2D::VectorFieldFunction) () const

Constructor & Destructor Documentation

◆ Edge2D()

Edge2D::Edge2D ( int  id0,
int  id1,
const Vec3 v0,
const Vec3 v1,
int  ed_id,
int  tag 
)

construct Edge from corner coordinates. Make sure Z=0 for all corners

Parameters
id0id of the first corner
id1id of the 2nd corner
v0first corner
v1second corner
ed_idedge id
tagedge tag

References cross(), m_edge_id, m_force, m_id0, m_id1, m_normal, AEdge::m_p0, AEdge::m_p1, m_tag, Vec3::unit(), and Vec3::Z().

Here is the call graph for this function:

Member Function Documentation

◆ applyForce()

void Edge2D::applyForce ( const Vec3 f)
inline

References m_force.

Referenced by BEdge2DInteraction::calcForces().

Here is the caller graph for this function:

◆ getForce()

Vec3 Edge2D::getForce ( ) const
inline

References m_force.

Referenced by getVectorFieldFunction().

Here is the caller graph for this function:

◆ getForceDensity()

Vec3 Edge2D::getForceDensity ( ) const
inline

References m_force, AEdge::m_p0, and AEdge::m_p1.

Referenced by TSubLattice< T >::getMesh2DStress(), and getVectorFieldFunction().

Here is the caller graph for this function:

◆ getID()

int Edge2D::getID ( )
inline

References m_edge_id.

Referenced by BEdge2DInteraction::BEdge2DInteraction().

Here is the caller graph for this function:

◆ getNormal()

Vec3 Edge2D::getNormal ( ) const
inline

References m_normal.

Referenced by EEdge2DInteraction::calcForces().

Here is the caller graph for this function:

◆ getP0()

pair<int,Vec3> Edge2D::getP0 ( ) const
inline

References m_id0, and AEdge::m_p0.

◆ getP1()

pair<int,Vec3> Edge2D::getP1 ( ) const
inline

References m_id1, and AEdge::m_p1.

◆ getPressure()

double Edge2D::getPressure ( ) const

Get pressure on the edge from interaction forces

References m_force, m_normal, AEdge::m_p0, and AEdge::m_p1.

Referenced by getScalarFieldFunction().

Here is the caller graph for this function:

◆ getScalarFieldFunction()

Edge2D::ScalarFieldFunction Edge2D::getScalarFieldFunction ( const string &  name)
static

Get the Edge2D member function which returns a scalar field of a given name. Returns NULL if a field with that name doesn't exist.

Parameters
namethe name of the field

References getPressure(), and NULL.

Here is the call graph for this function:

◆ getVectorFieldFunction()

Edge2D::VectorFieldFunction Edge2D::getVectorFieldFunction ( const string &  name)
static

Get the Edge2D member function which returns a vector field of a given name. Returns NULL if a field with that name doesn't exist.

Parameters
namethe name of the field

References getForce(), getForceDensity(), and NULL.

Referenced by TSubLattice< T >::addVectorTriangleField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveNode()

void Edge2D::moveNode ( int  id,
const Vec3 d 
)

Move one of the corners. The identifier for the corner is the global node id. If the node with the id is not in the edge do nothing.

Parameters
idthe global id of the node to be moved
dthe amount of movement

References cross(), m_id0, m_id1, m_normal, AEdge::m_p0, AEdge::m_p1, and Vec3::unit().

Here is the call graph for this function:

◆ print()

void Edge2D::print ( )

output Edge2D to cout

References m_normal, AEdge::m_p0, and AEdge::m_p1.

◆ toGlobal()

Vec3 Edge2D::toGlobal ( const Vec3 p)

convert point in local coords to global coords

Parameters
pthe point in local coords

References m_normal, AEdge::m_p0, AEdge::m_p1, Vec3::X(), and Vec3::Y().

Referenced by BEdge2DInteraction::calcForces(), and BEdge2DInteraction::getAP().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toLocal()

Vec3 Edge2D::toLocal ( const Vec3 p)

convert point in global coords into local (x,y,0) coords

Parameters
pthe point in global coords

References m_normal, AEdge::m_p0, AEdge::m_p1, and Vec3::norm2().

Referenced by BEdge2DInteraction::BEdge2DInteraction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zeroForce()

void Edge2D::zeroForce ( )
inline

References m_force.

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  ost,
const Edge2D T 
)
friend

output for debugging purposes

output Edge2D to ostream

Member Data Documentation

◆ m_edge_id

int Edge2D::m_edge_id
private

Referenced by Edge2D(), and getID().

◆ m_force

Vec3 Edge2D::m_force
private

◆ m_id0

int Edge2D::m_id0
private

Referenced by Edge2D(), getP0(), and moveNode().

◆ m_id1

int Edge2D::m_id1
private

Referenced by Edge2D(), getP1(), and moveNode().

◆ m_normal

Vec3 Edge2D::m_normal
private

◆ m_tag

int Edge2D::m_tag
private

Referenced by Edge2D().


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