ESyS-Particle  2.3.4
Corner2D Class Reference

Class representing the corner in a 2D "mesh". More...

#include <Corner2D.h>

Collaboration diagram for Corner2D:

Public Member Functions

 Corner2D (const Vec3 &, int)
 
void addEdge (Edge2D *)
 
double sep (const Vec3 &) const
 
bool isValidContact (const Vec3 &) const
 
Vec3 getDirectionFromPoint (const Vec3 &) const
 
void move (const Vec3 &)
 
Vec3 getPos () const
 
int getID () const
 
int getNEdges () const
 
Vec3 getEdgeNormal (int) const
 
void applyForceToEdge (int, const Vec3 &)
 

Private Attributes

Vec3 m_p
 
vector< Edge2D * > m_edges
 
int m_id
 

Detailed Description

Class representing the corner in a 2D "mesh".

Author
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

◆ Corner2D()

Corner2D::Corner2D ( const Vec3 pos,
int  id 
)

constructor, make sure Z=0;

Parameters
posthe position of the corner
idthe node id

References m_id, m_p, and Vec3::Z().

Here is the call graph for this function:

Member Function Documentation

◆ addEdge()

void Corner2D::addEdge ( Edge2D edge)

add Edge to corner

Parameters
edgea pointer to the edge

References m_edges.

◆ applyForceToEdge()

void Corner2D::applyForceToEdge ( int  idx,
const Vec3 f 
)

apply force to one of the attached edges

Parameters
idxwhich egde (1,2)
Fthe force

References console, Console::Error(), and m_edges.

Referenced by BCorner2DInteraction::calcForces().

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

◆ getDirectionFromPoint()

Vec3 Corner2D::getDirectionFromPoint ( const Vec3 p) const

get the unit direction vector between a point and the corner

Parameters
pthe point

References m_p, and Vec3::unit().

Referenced by ECorner2DInteraction::calcForces().

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

◆ getEdgeNormal()

Vec3 Corner2D::getEdgeNormal ( int  idx) const

get normal of an edge

Parameters
idxwhich egde (1,2) to get

References console, Console::Error(), and m_edges.

Referenced by BCorner2DInteraction::BCorner2DInteraction(), and BCorner2DInteraction::calcForces().

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

◆ getID()

int Corner2D::getID ( ) const
inline

References m_id.

Referenced by BCorner2DInteraction::BCorner2DInteraction().

Here is the caller graph for this function:

◆ getNEdges()

int Corner2D::getNEdges ( ) const
inline

References m_edges.

Referenced by BCorner2DInteraction::BCorner2DInteraction(), and BCorner2DInteraction::calcForces().

Here is the caller graph for this function:

◆ getPos()

Vec3 Corner2D::getPos ( ) const
inline

References m_p.

Referenced by BCorner2DInteraction::BCorner2DInteraction(), and BCorner2DInteraction::calcForces().

Here is the caller graph for this function:

◆ isValidContact()

bool Corner2D::isValidContact ( const Vec3 p) const

check if the contact between a particle at a point and the corner is valid or if there is a contact between the particle and any of the adjacent edges or triangles

Parameters
pthe center of the particle

References m_edges.

Referenced by ECorner2DInteraction::calcForces().

Here is the caller graph for this function:

◆ move()

void Corner2D::move ( const Vec3 d)

move the corner, make sure Z=0;

Parameters
dthe displacement

References m_p, and Vec3::Z().

Referenced by Mesh2D::moveNode().

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

◆ sep()

double Corner2D::sep ( const Vec3 p) const

get distance between corner and point

Parameters
pthe point

References m_p.

Referenced by ECorner2DInteraction::calcForces().

Here is the caller graph for this function:

Member Data Documentation

◆ m_edges

vector<Edge2D*> Corner2D::m_edges
private

◆ m_id

int Corner2D::m_id
private

Referenced by Corner2D(), and getID().

◆ m_p

Vec3 Corner2D::m_p
private

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