ESyS-Particle  4.0.1
Public Types | Public Member Functions | List of all members
Mesh2D Class Reference

#include <Mesh2D.h>

Public Types

typedef vector< Edge2D >::iterator edge_iterator
typedef vector< Corner2D >
::iterator 
corner_iterator

Public Member Functions

 Mesh2D ()
void LoadMesh (const vector< MeshNodeData2D > &, const vector< MeshEdgeData2D > &)
void moveNode (int, const Vec3 &)
void translateBy (const Vec3 &translation)
edge_iterator edges_begin ()
edge_iterator edges_end ()
corner_iterator corners_begin ()
corner_iterator corners_end ()
Edge2DgetEdgeById (int)
Corner2DgetCornerById (int)
void zeroForces ()
virtual void writeCheckPoint (ostream &, const string &) const
virtual void loadCheckPoint (istream &)
template<typename P >
void forAllEdgesGet (P &, typename P::value_type(Edge2D::*rdf)() const)
template<typename P >
vector< pair< int, P > > forAllEdgesGetIndexed (P(Edge2D::*rdf)() const)

Detailed Description

A class for a 2D "mesh", i.e. a collection of lines connected by corners in a 2D plane which can interact with particles in 2D. The Main purpose is for coupling with 2D FEM (Finley) simulations via escript.

Constructor & Destructor Documentation

Mesh2D::Mesh2D ( )

constructor for empty 2D mesh

Member Function Documentation

template<typename P >
void Mesh2D::forAllEdgesGet ( P &  cont,
typename P::value_type(Edge2D::*)() const  rdf 
)

Call a constant member function of Edge2D taking no argument and returning a value for all edges 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 > > Mesh2D::forAllEdgesGetIndexed ( P(Edge2D::*)() const  rdf)
Parameters
rdfthe particle member function

Referenced by VectorEdge2DFieldSlave::SendDataFull().

Here is the caller graph for this function:

Corner2D * Mesh2D::getCornerById ( int  id)

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

Parameters
idthe id
Edge2D * Mesh2D::getEdgeById ( int  id)

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

Parameters
idthe id
void Mesh2D::loadCheckPoint ( istream &  ist)
virtual

load checkpoint data from stream. Re-uses code from meshreader to read in checkpointed meshes

Parameters
istthe input stream
Warning
doesn't deal with tags yet
void Mesh2D::LoadMesh ( const vector< MeshNodeData2D > &  node_vec,
const vector< MeshEdgeData2D > &  edge_vec 
)

setup 2D mesh from node and edge data

Parameters
node_vecthe node data
edge_vecthe edge data

References BasicCon::Debug().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

move one node by a given amount

Parameters
idthe id of the node
dthe displacement

References Corner2D::move().

Here is the call graph for this function:

void Mesh2D::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
Warning
doesn't deal with tags yet
void Mesh2D::zeroForces ( )

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


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