ESyS-Particle  4.0.1
Public Types | Public Member Functions
TriMesh Class Reference

class for a triangle mesh More...

#include <TriMesh.h>

List of all members.

Public Types

typedef vector< Triangle >
::iterator 
triangle_iterator
typedef vector< Edge >::iterator edge_iterator
typedef vector< Corner >::iterator corner_iterator

Public Member Functions

 TriMesh ()
void LoadMesh (const vector< MeshNodeData > &, const vector< MeshTriData > &)
void moveNode (int, const Vec3 &)
void translateBy (const Vec3 &translation)
triangle_iterator triangles_begin ()
triangle_iterator triangles_end ()
edge_iterator edges_begin ()
edge_iterator edges_end ()
corner_iterator corners_begin ()
corner_iterator corners_end ()
TrianglegetTriangleById (int)
bool hasMovedBy (double)
void resetCurrentDisplacement ()
void zeroForces ()
virtual void writeCheckPoint (ostream &, const string &) const
virtual void loadCheckPoint (istream &)
template<typename P >
void forAllTrianglesGet (P &, typename P::value_type(Triangle::*rdf)() const)
template<typename P >
vector< pair< int, P > > forAllTrianglesGetIndexed (P(Triangle::*rdf)() const)

Detailed Description

class for a triangle mesh

Author:
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

Constructor


Member Function Documentation

template<typename P >
void TriMesh::forAllTrianglesGet ( P &  cont,
typename P::value_type(Triangle::*)() const  rdf 
)

Call a constant member function of Triangle taking no argument and returning a value for all Triangles and collect the return values in a container. The container has to be an STL sequence container (vector,list...) or something with the same interface. The template parameter P is a type of container of the return type of the particle member function, not the return type itself.

Parameters:
contthe container
rdfthe particle member function
template<typename P >
vector< pair< int, P > > TriMesh::forAllTrianglesGetIndexed ( P(Triangle::*)() const  rdf)
Parameters:
rdfthe particle member function

Referenced by VectorTriangleFieldSlave::SendDataFull(), and ScalarTriangleFieldSlave::SendDataFull().

Here is the caller graph for this function:

Get a pointer to a triangle with a given ID. If the ID doesn't exist, return NULL

Parameters:
idthe id
bool TriMesh::hasMovedBy ( double  dist)

check if any point in the mesh has moved by at least the given distance

Parameters:
distthe distance
void TriMesh::LoadMesh ( const vector< MeshNodeData > &  node_vec,
const vector< MeshTriData > &  tri_vec 
)

setup the triangle mesh from node,edge and triangle data

Parameters:
node_vecthe node data
tri_vecthe triangle data

References BasicCon::Error(), and BasicCon::XDebug().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Move a node in the mesh. If the node with the given Id isn't in the mesh, nothing happens

Parameters:
idthe id of the node
dthe displacement

reset displacement since last neighbor search

void TriMesh::writeCheckPoint ( ostream &  ost,
const string &  delim 
) const [virtual]

Write checkpoint data to stream. The mesh data is written in the original mesh file format -> can reuse meshreader to read in checkpointed meshes

Parameters:
ostthe output stream
delimthe delimiter

zero all forces on the mesh. Currently forces are only on triangles

References BasicCon::XDebug().

Here is the call graph for this function:


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