template <int Dim> class DMesh : public Mesh

Data type mesh

Inheritance:


Public Methods

DMesh <Dim> (int nx, int ny, int type, int generate_edges = 0)
Creates mesh for the unit square, divided into nx * ny quadrilaterals if type = QUADRILATERAL or into 2*nx*ny triangles if type = TRIANGLE
DMesh <Dim> (int n)
Creates 1D mesh , divided into n equal intervals
DMesh <Dim> ( istream &input, int generate_edges = 0)
Creates mesh by reading data stream in netgen format
DMesh <Dim> ( istream &input, Vector **data, int nprocessors, int currentprocessor, int generate_edges = 0 )
Start creating a mesh by reading data stream in netgen format
DMesh <Dim> ( istream ** input, int nprocessors, int * dim)
Creating a mesh from array of nprocessors input streams
virtual double* GetVertex(int i) const
Return pointer to vertex i's coordinates
virtual void GetElementVertices( int i, Array<int> &dofs ) const
Returns the indices of the dofs of element i.
virtual void GetBdrElementVertices( int i, Array<int> &dofs ) const
Returns the indices of the dofs of boundary element i.
virtual void GetElementEdges(int i, Array<int> &, Array<int> &) const
Return the indices and the orientations of all edges of element i.
virtual void GetBdrElementEdges(int i, Array<int> &, Array<int> &) const
Return the indices and the orientations of all edges of bdr element i.
virtual void GetElementFaces(int i, Array<int> &, Array<int> &) const
Return the indices and the orientations of all faces of element i.
virtual void GetBdrElementFace(int i, int *, int *) const
Return the index and the orientation of the face of bdr element i. (3D)
virtual int GetBdrElementEdgeIndex(int i) const
Return the edge index of boundary element i.
virtual int GetElementType(int i) const
Returns the type of element i.
virtual int GetBdrElementType(int i) const
Returns the type of boundary element i.
virtual ElementTransformation* GetElementTransformation(int i)
Returns the transformation defining the i-th element
virtual ElementTransformation* GetBdrElementTransformation(int i)
Returns the transformation defining the i-th boundary element
virtual int GetAttribute(int i) const
Return the attribute of element i.
virtual int GetBdrAttribute(int i) const
Return the attribute of boundary element i.
virtual double GetLength(int i, int j) const
Return the length of the segment from node i to node j.
virtual void GetVertexToVertexTable( STable &) const
Return vertex to vertex table
virtual int GetElementToEdgeTable( Table &, Array<int> & )
Return element to edge table and the indeces for the boundary edges
virtual void LocalRefinement(const Array<int> &marked_el, int type = 3)
Refine the marked elements.
virtual void SetState(int s)
Change the mesh state to NORMAL, TWO_LEVEL_COARSE, TWO_LEVEL_FINE
virtual int GetNumFineElems(int i)
For a given coarse element i returns the number of subelements it is divided into
virtual int GetRefinementType(int i)
For a given coarse element i returns its refinement type
virtual int GetFineElem(int i, int j)
For a given coarse element i and index j of one of its subelements return the global index of the fine element in the fine mesh
virtual ElementTransformation* GetFineElemTrans(int i, int j)
For a given coarse element i and index j of one of its subelements return the transformation that transforms the fine element into the coordinate system of the coarse element
virtual void Print(ostream &out, const Vector &solution, int format = 1) const
Print the mesh and the vertex solution in file given by f_name in mcsg format
virtual void Print(ostream &out = cout) const
Print the mesh in file given by f_name in netgen format
virtual ~DMesh()
Destroys mesh.

Protected Methods

void RedRefinement(int i, const STable &, int *, int *, int *)
Red refinement
void GreenRefinement(int i, const STable &, int *, int *, int *)
Green refinement
void Bisection(int i, const STable &, int *, int *, int *)
Bisection
void Bisection(int i, const STable &, int *)
Bisection
void UniformRefinement(int i, const STable &, int *, int *, int *)
Uniform Refinement

Inherited from Mesh:

Public Methods

virtual void Load( istream &input, int generate_edges = 0 )
inline int GetNV() const
inline int GetNE() const
inline int GetNBE() const
inline int GetNEdges() const
virtual void GetPointMatrix(int i, RectangularMatrix &pointmat ) const
virtual void GetBdrPointMatrix(int i, RectangularMatrix &pointmat ) const
void UseTwoLevelState(int use)

Documentation

Data type mesh. The vertex type is given by the template mechanism.
void RedRefinement(int i, const STable &, int *, int *, int *)
Red refinement. Element with index i is refined. The default red refinement for now is Uniform.

void GreenRefinement(int i, const STable &, int *, int *, int *)
Green refinement. Element with index i is refined. The default refinement for now is Bisection.

void Bisection(int i, const STable &, int *, int *, int *)
Bisection. Element with index i is bisected.

void Bisection(int i, const STable &, int *)
Bisection. Element with index i is bisected.

void UniformRefinement(int i, const STable &, int *, int *, int *)
Uniform Refinement. Element with index i is refined uniformly.

DMesh <Dim> (int nx, int ny, int type, int generate_edges = 0)
Creates mesh for the unit square, divided into nx * ny quadrilaterals if type = QUADRILATERAL or into 2*nx*ny triangles if type = TRIANGLE. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

DMesh <Dim> (int n)
Creates 1D mesh , divided into n equal intervals.

DMesh <Dim> ( istream &input, int generate_edges = 0)
Creates mesh by reading data stream in netgen format. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

DMesh <Dim> ( istream &input, Vector **data, int nprocessors, int currentprocessor, int generate_edges = 0 )
Start creating a mesh by reading data stream in netgen format. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated. Used with consecutive load calls.

DMesh <Dim> ( istream ** input, int nprocessors, int * dim)
Creating a mesh from array of nprocessors input streams. The meshes are read in the array order. The nodes in the consecutive meshes are properly shifted. dim is output array of dimension nprocessors and gives the number of vertices in the different subdomains. The obtained global mesh is nonconforming between the subdomains in the sence that the same nodes on the boundary have different indices (from the different subdomains.

virtual double* GetVertex(int i) const
Return pointer to vertex i's coordinates

virtual void GetElementVertices( int i, Array<int> &dofs ) const
Returns the indices of the dofs of element i.

virtual void GetBdrElementVertices( int i, Array<int> &dofs ) const
Returns the indices of the dofs of boundary element i.

virtual void GetElementEdges(int i, Array<int> &, Array<int> &) const
Return the indices and the orientations of all edges of element i.

virtual void GetBdrElementEdges(int i, Array<int> &, Array<int> &) const
Return the indices and the orientations of all edges of bdr element i.

virtual void GetElementFaces(int i, Array<int> &, Array<int> &) const
Return the indices and the orientations of all faces of element i.

virtual void GetBdrElementFace(int i, int *, int *) const
Return the index and the orientation of the face of bdr element i. (3D)

virtual int GetBdrElementEdgeIndex(int i) const
Return the edge index of boundary element i.

virtual int GetElementType(int i) const
Returns the type of element i.

virtual int GetBdrElementType(int i) const
Returns the type of boundary element i.

virtual ElementTransformation* GetElementTransformation(int i)
Returns the transformation defining the i-th element

virtual ElementTransformation* GetBdrElementTransformation(int i)
Returns the transformation defining the i-th boundary element

virtual int GetAttribute(int i) const
Return the attribute of element i.

virtual int GetBdrAttribute(int i) const
Return the attribute of boundary element i.

virtual double GetLength(int i, int j) const
Return the length of the segment from node i to node j.

virtual void GetVertexToVertexTable( STable &) const
Return vertex to vertex table. The connections stored in the table are from smaller to bigger vertex index, i.e. if i<j and (i, j) is in the table, then (j, i) is not stored.

virtual int GetElementToEdgeTable( Table &, Array<int> & )
Return element to edge table and the indeces for the boundary edges. The entries in the table are ordered according to the order of the nodes in the elements. For example, if T is the element to edge table T(i, 0) gives the index of edge in element i that connects vertex 0 to vertex 1, etc. Returns the number of the edges.

virtual void LocalRefinement(const Array<int> &marked_el, int type = 3)
Refine the marked elements.

virtual void SetState(int s)
Change the mesh state to NORMAL, TWO_LEVEL_COARSE, TWO_LEVEL_FINE

virtual int GetNumFineElems(int i)
For a given coarse element i returns the number of subelements it is divided into

virtual int GetRefinementType(int i)
For a given coarse element i returns its refinement type

virtual int GetFineElem(int i, int j)
For a given coarse element i and index j of one of its subelements return the global index of the fine element in the fine mesh

virtual ElementTransformation* GetFineElemTrans(int i, int j)
For a given coarse element i and index j of one of its subelements return the transformation that transforms the fine element into the coordinate system of the coarse element. Clear, isn't it? :-)

virtual void Print(ostream &out, const Vector &solution, int format = 1) const
Print the mesh and the vertex solution in file given by f_name in mcsg format. Netgen file format is the default one. format = 2 is mcsg file format.

virtual void Print(ostream &out = cout) const
Print the mesh in file given by f_name in netgen format. If f_name == NULL (default) the mesh is printed on the terminal.

virtual ~DMesh()
Destroys mesh.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de