Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

dolfin::Mesh Class Reference

#include <Mesh.h>

Inheritance diagram for dolfin::Mesh:

Inheritance graph
[legend]
Collaboration diagram for dolfin::Mesh:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Type { triangles, tetrahedrons }

Public Member Functions

 Mesh ()
 Create an empty mesh.

 Mesh (const char *filename)
 Create mesh from given file.

 Mesh (const Mesh &mesh)
 Copy constructor.

 ~Mesh ()
 Destructor.

void clear ()
 --- Basic functions Clear mesh

int noNodes () const
 Return number of nodes in the mesh.

int noCells () const
 Return number of cells in the mesh.

int noEdges () const
 Return number of edges in the mesh.

int noFaces () const
 Return number of faces in the mesh.

Type type () const
 Return type of mesh.

Nodenode (unsigned int id)
 Return given node (can also use a node iterator).

Cellcell (unsigned int id)
 Return given cell (can also use a cell iterator).

Edgeedge (unsigned int id)
 Return given edge (can also use an edge iterator).

Faceface (unsigned int id)
 Return given face (can also use a face iterator).

Boundary boundary ()
 Return boundary.

void mark (Cell &cell)
 --- Mesh refinement --- Mark cell for refinement

void refine ()
 Refine mesh.

void refineUniformly ()
 Refine uniformly (all cells marked).

Meshparent ()
 Return parent mesh.

Meshchild ()
 Return child mesh.

bool operator== (const Mesh &mesh) const
 Comparison of two meshs.

bool operator!= (const Mesh &mesh) const
 Comparison of two meshs.

void show ()
 --- Output --- Display mesh data


Friends

class GenericCell
 Friends.

class Edge
class XMLMesh
class MeshInit
class MeshRefinement
class TriMeshRefinement
class TetMeshRefinement
class MeshHierarchy
class Boundary
class BoundaryInit
class NodeIterator::MeshNodeIterator
class NodeIterator::BoundaryNodeIterator
class CellIterator::MeshCellIterator
class EdgeIterator::MeshEdgeIterator
class EdgeIterator::BoundaryEdgeIterator
class FaceIterator::MeshFaceIterator
class FaceIterator::BoundaryFaceIterator
LogStreamoperator<< (LogStream &stream, const Mesh &mesh)
 Display condensed mesh data.


Detailed Description

A Mesh consists of Nodes, Cells, Edges, and Faces. The data of a Mesh is accessed through iterators:

The Nodes of a Mesh is accessed through the class NodeIterator. The Cells of a Mesh is accessed through the class CellIterator. The Edges of a Mesh is accessed through the class EdgeIterator. The Faces of a Mesh is accessed through the class FaceIterator.

A Cell can represent either a Triangle or a Tetrahedron depending on the type of the Mesh.

The local ordering is based on the following principles:

IMPORTANT NOTICE: The local ordering does not yet follow these principles!

(i) For a triangular mesh, the nodes are numbered counter-clockwise. In particular, the 3 coordinates of the reference triangle are given by

n1: (0, 0, 0) n2: (1, 0, 0) n3: (0, 1, 0)

The 3 edges of the reference triangle are given by

e1: (n1, n2) e2: (n2, n3) e3: (n3, n1)

(ii) For a tetrahedral mesh, the nodes are numbered based on a positive orientation of the nodes. In particular, the 4 coordinates of the reference tetrahedron are given by

n1: (0, 0, 0) n2: (1, 0, 0) n3: (0, 1, 0) n4: (0, 0, 1)

The 6 edges of the reference tetrahedron are given by

e1: (n1, n2) e2: (n2, n3) e3: (n3, n1) e4: (n1, n4) e5: (n2, n4) e6: (n3, n4)

The 4 faces of the reference triangle are given by

f1: (n1, n2, n3) f2: (n1, n4, n2) f3: (n2, n4, n3) f4: (n1, n3, n4)


Member Enumeration Documentation

enum dolfin::Mesh::Type
 

Enumeration values:
triangles 
tetrahedrons 


Constructor & Destructor Documentation

Mesh::Mesh  ) 
 

Create an empty mesh.

Mesh::Mesh const char *  filename  ) 
 

Create mesh from given file.

Mesh::Mesh const Mesh mesh  ) 
 

Copy constructor.

Mesh::~Mesh  ) 
 

Destructor.


Member Function Documentation

Boundary Mesh::boundary  ) 
 

Return boundary.

Cell & Mesh::cell unsigned int  id  ) 
 

Return given cell (can also use a cell iterator).

Mesh & Mesh::child  ) 
 

Return child mesh.

void Mesh::clear  ) 
 

--- Basic functions Clear mesh

Edge & Mesh::edge unsigned int  id  ) 
 

Return given edge (can also use an edge iterator).

Face & Mesh::face unsigned int  id  ) 
 

Return given face (can also use a face iterator).

void dolfin::Mesh::mark Cell cell  ) 
 

--- Mesh refinement --- Mark cell for refinement

int Mesh::noCells  )  const
 

Return number of cells in the mesh.

Node & Mesh::node unsigned int  id  ) 
 

Return given node (can also use a node iterator).

int Mesh::noEdges  )  const
 

Return number of edges in the mesh.

int Mesh::noFaces  )  const
 

Return number of faces in the mesh.

int Mesh::noNodes  )  const
 

Return number of nodes in the mesh.

bool Mesh::operator!= const Mesh mesh  )  const
 

Comparison of two meshs.

bool Mesh::operator== const Mesh mesh  )  const
 

Comparison of two meshs.

Mesh & Mesh::parent  ) 
 

Return parent mesh.

void Mesh::refine  ) 
 

Refine mesh.

void Mesh::refineUniformly  ) 
 

Refine uniformly (all cells marked).

void Mesh::show  ) 
 

--- Output --- Display mesh data

Mesh::Type Mesh::type  )  const
 

Return type of mesh.


Friends And Related Function Documentation

friend class Boundary [friend]
 

friend class BoundaryInit [friend]
 

friend class CellIterator::MeshCellIterator [friend]
 

friend class Edge [friend]
 

friend class EdgeIterator::BoundaryEdgeIterator [friend]
 

friend class EdgeIterator::MeshEdgeIterator [friend]
 

friend class FaceIterator::BoundaryFaceIterator [friend]
 

friend class FaceIterator::MeshFaceIterator [friend]
 

friend class GenericCell [friend]
 

Friends.

friend class MeshHierarchy [friend]
 

friend class MeshInit [friend]
 

friend class MeshRefinement [friend]
 

friend class NodeIterator::BoundaryNodeIterator [friend]
 

friend class NodeIterator::MeshNodeIterator [friend]
 

LogStream& operator<< LogStream stream,
const Mesh mesh
[friend]
 

Display condensed mesh data.

friend class TetMeshRefinement [friend]
 

friend class TriMeshRefinement [friend]
 

friend class XMLMesh [friend]
 


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


Documentation automatically generated with Doxygen on 10 Sep 2004.