|
ESyS-Particle
2.3.4
|
#include <Mesh2D.h>

Public Types | |
| typedef vector< Edge2D >::iterator | edge_iterator |
| typedef vector< Corner2D >::iterator | corner_iterator |
Public Member Functions | |
| Mesh2D () | |
| virtual | ~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 () |
| Edge2D * | getEdgeById (int) |
| Corner2D * | getCornerById (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) |
Private Attributes | |
| vector< Edge2D > | m_edges |
| vector< Corner2D > | m_corners |
| map< int, int > | m_corner_by_id |
| multimap< int, Edge2D * > | m_edge_by_node_id |
| map< int, int > | m_edge_index_by_id |
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.
| typedef vector<Corner2D>::iterator Mesh2D::corner_iterator |
| typedef vector<Edge2D>::iterator Mesh2D::edge_iterator |
| Mesh2D::Mesh2D | ( | ) |
constructor for empty 2D mesh
|
inlinevirtual |
|
inline |
References m_corners.
|
inline |
References m_corners.
|
inline |
References m_edges.
|
inline |
References m_edges.
| 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.
| cont | the container |
| rdf | the particle member function |
References esys::lsm::bpu::iter(), and m_edges.

| vector< pair< int, P > > Mesh2D::forAllEdgesGetIndexed | ( | P(Edge2D::*)() const | rdf | ) |
| rdf | the particle member function |
References esys::lsm::bpu::iter(), and m_edges.
Referenced by VectorEdge2DFieldSlave::SendDataFull().


| Corner2D * Mesh2D::getCornerById | ( | int | id | ) |
Get a pointer to a corner with a given ID. If the ID doesn't exist, return NULL
| id | the id |
References NULL.
| Edge2D * Mesh2D::getEdgeById | ( | int | id | ) |
Get a pointer to a edge with a given ID. If the ID doesn't exist, return NULL
| id | the id |
References NULL.
|
virtual |
load checkpoint data from stream. Re-uses code from meshreader to read in checkpointed meshes
| ist | the input stream |
References esys::lsm::IterativeReader< TmplIterator >::getIterator().
Referenced by TSubLattice< T >::loadCheckPointData().


| void Mesh2D::LoadMesh | ( | const vector< MeshNodeData2D > & | node_vec, |
| const vector< MeshEdgeData2D > & | edge_vec | ||
| ) |
setup 2D mesh from node and edge data
| node_vec | the node data |
| edge_vec | the edge data |
References console, Console::Debug(), and esys::lsm::bpu::iter().
Referenced by TSubLattice< T >::addMesh2D().


| void Mesh2D::moveNode | ( | int | id, |
| const Vec3 & | d | ||
| ) |
move one node by a given amount
| id | the id of the node |
| d | the displacement |
References esys::lsm::bpu::iter(), Corner2D::move(), and NULL.

| void Mesh2D::translateBy | ( | const Vec3 & | translation | ) |
|
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
| ost | the output stream |
| delim | the delimiter |
References esys::lsm::bpu::iter().

| void Mesh2D::zeroForces | ( | ) |
zero all forces on the mesh. Currently forces are only on edge
References esys::lsm::bpu::iter().

|
private |
|
private |
Referenced by corners_begin(), and corners_end().
|
private |
|
private |
|
private |
Referenced by edges_begin(), edges_end(), forAllEdgesGet(), and forAllEdgesGetIndexed().