Galeri::FiniteElements::TriangleRectangleGrid Class Reference

Creates a grid composed by triangles, the domain is a rectangle. More...

#include <Galeri_TriangleRectangleGrid.h>

Inheritance diagram for Galeri::FiniteElements::TriangleRectangleGrid:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TriangleRectangleGrid (const Epetra_Comm &Comm, const int nx, const int ny, const int mx, const int my, const double lx=1.0, const double ly=1.0)
 Constructor.
virtual ~TriangleRectangleGrid ()
virtual int NumDimensions () const
 Returns the number of dimensions of the grid.
virtual int NumVerticesPerElement () const
 Returns the number of vertices contained in each element.
virtual int NumFacesPerElement () const
 Returns the number of faces contained in each element.
virtual int NumVerticesPerFace () const
 Returns the number of vertices contained in each face.
virtual string ElementType () const
 Returns GALERI_TRIANGLE.
virtual const Epetra_CommComm () const
 Returns a reference to the communicator object.
virtual int NumMyElements () const
 Returns the number of finite elements on the calling process.
virtual int NumGlobalElements () const
 Returns the global number of finite elements.
virtual int NumMyVertices () const
 Returns the number of vertices on the calling process.
virtual int NumGlobalVertices () const
 Returns the global number of vertices.
virtual int NumMyBoundaryFaces () const
 Returns the number of boundary faces on the calling process.
virtual int NumGlobalBoundaryFaces () const
 Returns the global number of boundary faces.
virtual void VertexCoord (const int LocalID, double *coord) const
 Returns the coordinates of local vertex LocalVertex in vector coord.
virtual void VertexCoord (const int Length, const int *IDs, double *x, double *y, double *z) const
 Returns the coordinates of specified local vertices.
virtual void ElementVertices (const int LocalID, int *elements) const
 Returns the local vertex IDs of the specified local finite element.
virtual double ElementMinLength (const int LocalElement) const
 Returns the volume of the specified local finite element.
virtual double ElementMaxLength (const int LocalElement) const
 Returns the volume of the specified local finite element.
virtual const RefCountPtr
< Epetra_Map
RCPVertexMap () const
virtual const RefCountPtr
< Epetra_Map
RCPElementMap () const
virtual const Epetra_MapVertexMap () const
 Returns a reference to the map representing the vertex distribution.
virtual const Epetra_MapElementMap () const
virtual const Epetra_MapRowMap () const
 Returns a reference to the map representing the distribution of rows.
virtual const Epetra_ImportImporter () const
virtual int ElementTag (const int ID) const
virtual int VertexTag (const int ID) const
virtual double ElementVolume () const
virtual void FaceVertices (const int LocalFace, int &tag, int *IDs) const
 Returns the local vertex IDs of vertices contained in the specified boundary face.
int FacePatch (const int LocalFace) const
 Returns the patch ID of the specified face.
int NumMyElementsX () const
int NumMyElementsY () const
int NumMyVerticesX () const
int NumMyVerticesY () const
int NumGlobalElementsX () const
int NumGlobalElementsY () const
int NumGlobalVerticesX () const
int NumGlobalVerticesY () const
double LengthX () const
double LengthY () const
double DeltaX () const
double DeltaY () const
virtual double ElementVolume (const int LocalElement) const
 Returns the volume of the specified local finite element.
virtual double FaceArea (const int LocalFace) const
 Returns the area of the specified local face.
virtual double MyVolume () const
 Returns the volume of all local elements.
virtual double GlobalVolume () const
 Returns the global volume of the grid.
int NumDomainsX () const
int NumDomainsY () const
void ExportToVertexMap (const Epetra_DistObject &RowObject, Epetra_DistObject &VertexObject) const
 Exports distributed object from RowMap() to VertexMap().
void ExportToRowMap (const Epetra_DistObject &VertexObject, Epetra_DistObject &RowObject) const
 Exports distributed object from VertexMap() to RowMap().
int NumNeighborsPerElement () const
 Returns the number of neighboring elements.
void ElementNeighbors (int, int *) const
 Returns the local IDs of neighboring elements.

Private Member Functions

void GetVertexXY (const int &GlobalID, int &ix, int &iy) const
void GetElementXY (const int &GlobalID, int &ix, int &iy) const
void GetLocalElementXY (const int &LocalID, int &ix, int &iy) const
void GetProcessorXY (int &ix, int &iy) const
void IL_ElementVertices (const int LocalID, int *elements, const bool ReturnGlobal=false) const
void CreateElementMap ()
void CreateBoundaryFaces ()
void CreateVertexMap ()
void CreateRowMap ()

Private Attributes

const Epetra_CommComm_
int NumMyVertices_
int NumMyVerticesX_
int NumMyVerticesY_
int NumGlobalVertices_
int NumMyElements_
int NumMyElementsX_
int NumMyElementsY_
int NumGlobalElements_
int NumMyBoundaryFaces_
int NumGlobalBoundaryFaces_
int nx_
int ny_
double lx_
double ly_
int mx_
int my_
double deltax_
double deltay_
RefCountPtr< Epetra_MapVertexMap_
RefCountPtr< Epetra_MapElementMap_
RefCountPtr< Epetra_MapRowMap_
RefCountPtr< Epetra_ImportImporter_
Epetra_IntSerialDenseMatrix BF_

Detailed Description

Creates a grid composed by triangles, the domain is a rectangle.

This class defined, on-the-fly, the triangulation of a 2D rectangular domain. The elements are all triangles. For parallel run, the rectangle is subdivided along the X- and Y-axis, as specified by the user.

Author:
Marzio Sala, SNL 9214.
Date:
Last updated on 03-Apr-05.

Definition at line 63 of file Galeri_TriangleRectangleGrid.h.


Constructor & Destructor Documentation

Galeri::FiniteElements::TriangleRectangleGrid::TriangleRectangleGrid ( const Epetra_Comm Comm,
const int  nx,
const int  ny,
const int  mx,
const int  my,
const double  lx = 1.0,
const double  ly = 1.0 
) [inline]

Constructor.

Parameters:
Comm - (In) Communicator object.
nx - (In) number of elements along the X-axis.
ny - (In) number of elements along the Y-axis.
mx - (In) Number of subdomains along the X-axis.
my - (In) Number of subdomains along the Y-axis.
lx - (In) Length of the rectangle along the X-axis.
ly - (In) Length of the rectangle along the Y-axis.
Note:
The total number of processors must equal mx * my.

Definition at line 86 of file Galeri_TriangleRectangleGrid.h.

virtual Galeri::FiniteElements::TriangleRectangleGrid::~TriangleRectangleGrid (  )  [inline, virtual]

Definition at line 140 of file Galeri_TriangleRectangleGrid.h.


Member Function Documentation

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumDimensions (  )  const [inline, virtual]

Returns the number of dimensions of the grid.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 142 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumVerticesPerElement (  )  const [inline, virtual]

Returns the number of vertices contained in each element.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 147 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumFacesPerElement (  )  const [inline, virtual]

Returns the number of faces contained in each element.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 152 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumVerticesPerFace (  )  const [inline, virtual]

Returns the number of vertices contained in each face.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 157 of file Galeri_TriangleRectangleGrid.h.

virtual string Galeri::FiniteElements::TriangleRectangleGrid::ElementType (  )  const [inline, virtual]

Returns GALERI_TRIANGLE.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 163 of file Galeri_TriangleRectangleGrid.h.

virtual const Epetra_Comm& Galeri::FiniteElements::TriangleRectangleGrid::Comm (  )  const [inline, virtual]

Returns a reference to the communicator object.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 168 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumMyElements (  )  const [inline, virtual]

Returns the number of finite elements on the calling process.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 173 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumGlobalElements (  )  const [inline, virtual]

Returns the global number of finite elements.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 178 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumMyVertices (  )  const [inline, virtual]

Returns the number of vertices on the calling process.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 183 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumGlobalVertices (  )  const [inline, virtual]

Returns the global number of vertices.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 188 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumMyBoundaryFaces (  )  const [inline, virtual]

Returns the number of boundary faces on the calling process.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 193 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::NumGlobalBoundaryFaces (  )  const [inline, virtual]

Returns the global number of boundary faces.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 198 of file Galeri_TriangleRectangleGrid.h.

virtual void Galeri::FiniteElements::TriangleRectangleGrid::VertexCoord ( const int  LocalVertex,
double *  coord 
) const [inline, virtual]

Returns the coordinates of local vertex LocalVertex in vector coord.

Parameters:
LocalVertex - (In) Local ID of the vertex for whic coordinates are required. Must be contained in the interval [0, NumMyVertices())
coord - (Out) double array of size 3. In output, contains the x-, y- and z-coordinate of the specified vertex.
Note:
Parameter coord must be allocated of size 3 for both 2D and 3D problems.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 203 of file Galeri_TriangleRectangleGrid.h.

virtual void Galeri::FiniteElements::TriangleRectangleGrid::VertexCoord ( const int  Length,
const int *  IDs,
double *  x,
double *  y,
double *  z 
) const [inline, virtual]

Returns the coordinates of specified local vertices.

Parameters:
Length - (In) Length of array IDs.
IDs - (In) Contains the list of vertices of which coordinates are required.
x - (Out) double array of size Length. In output, contains the x-coordinates of the specified vertices.
y - (Out) double array of size Length. In output, contains the y-coordinates of the specified vertices.
z - (Out) double array of size Length. In output, contains the z-coordinates of the specified vertices.
Note:
The z array must be allocated for both 2D and 3D problems.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 215 of file Galeri_TriangleRectangleGrid.h.

virtual void Galeri::FiniteElements::TriangleRectangleGrid::ElementVertices ( const int  LocalElement,
int *  elements 
) const [inline, virtual]

Returns the local vertex IDs of the specified local finite element.

Parameters:
LocalElement - (In) ID of the required local element.
elements - (Out) array of length NumElementVertices(), in output will contain the local ID of the vertices of the specified element.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 231 of file Galeri_TriangleRectangleGrid.h.

virtual double Galeri::FiniteElements::TriangleRectangleGrid::ElementMinLength ( const int  LocalElement  )  const [inline, virtual]

Returns the volume of the specified local finite element.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 236 of file Galeri_TriangleRectangleGrid.h.

virtual double Galeri::FiniteElements::TriangleRectangleGrid::ElementMaxLength ( const int  LocalElement  )  const [inline, virtual]

Returns the volume of the specified local finite element.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 244 of file Galeri_TriangleRectangleGrid.h.

virtual const RefCountPtr<Epetra_Map> Galeri::FiniteElements::TriangleRectangleGrid::RCPVertexMap (  )  const [inline, virtual]

Definition at line 249 of file Galeri_TriangleRectangleGrid.h.

virtual const RefCountPtr<Epetra_Map> Galeri::FiniteElements::TriangleRectangleGrid::RCPElementMap (  )  const [inline, virtual]

Definition at line 254 of file Galeri_TriangleRectangleGrid.h.

virtual const Epetra_Map& Galeri::FiniteElements::TriangleRectangleGrid::VertexMap (  )  const [inline, virtual]

Returns a reference to the map representing the vertex distribution.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 259 of file Galeri_TriangleRectangleGrid.h.

virtual const Epetra_Map& Galeri::FiniteElements::TriangleRectangleGrid::ElementMap (  )  const [inline, virtual]

Definition at line 264 of file Galeri_TriangleRectangleGrid.h.

virtual const Epetra_Map& Galeri::FiniteElements::TriangleRectangleGrid::RowMap (  )  const [inline, virtual]

Returns a reference to the map representing the distribution of rows.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 269 of file Galeri_TriangleRectangleGrid.h.

virtual const Epetra_Import& Galeri::FiniteElements::TriangleRectangleGrid::Importer (  )  const [inline, virtual]

Definition at line 274 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::ElementTag ( const int  ID  )  const [inline, virtual]

Definition at line 279 of file Galeri_TriangleRectangleGrid.h.

virtual int Galeri::FiniteElements::TriangleRectangleGrid::VertexTag ( const int  ID  )  const [inline, virtual]

Definition at line 284 of file Galeri_TriangleRectangleGrid.h.

virtual double Galeri::FiniteElements::TriangleRectangleGrid::ElementVolume (  )  const [inline, virtual]

Definition at line 289 of file Galeri_TriangleRectangleGrid.h.

virtual void Galeri::FiniteElements::TriangleRectangleGrid::FaceVertices ( const int  LocalFace,
int &  tag,
int *  IDs 
) const [inline, virtual]

Returns the local vertex IDs of vertices contained in the specified boundary face.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 294 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::FacePatch ( const int  LocalFace  )  const [inline, virtual]

Returns the patch ID of the specified face.

Returns an integer ID that identifies the given boundary face as belonging to a given part of the domain. It can be used by the user to specify the value and the type of the boundary condition.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 301 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumMyElementsX (  )  const [inline]

Definition at line 306 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumMyElementsY (  )  const [inline]

Definition at line 311 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumMyVerticesX (  )  const [inline]

Definition at line 316 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumMyVerticesY (  )  const [inline]

Definition at line 321 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumGlobalElementsX (  )  const [inline]

Definition at line 326 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumGlobalElementsY (  )  const [inline]

Definition at line 331 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumGlobalVerticesX (  )  const [inline]

Definition at line 336 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumGlobalVerticesY (  )  const [inline]

Definition at line 341 of file Galeri_TriangleRectangleGrid.h.

double Galeri::FiniteElements::TriangleRectangleGrid::LengthX (  )  const [inline]

Definition at line 346 of file Galeri_TriangleRectangleGrid.h.

double Galeri::FiniteElements::TriangleRectangleGrid::LengthY (  )  const [inline]

Definition at line 351 of file Galeri_TriangleRectangleGrid.h.

double Galeri::FiniteElements::TriangleRectangleGrid::DeltaX (  )  const [inline]

Definition at line 356 of file Galeri_TriangleRectangleGrid.h.

double Galeri::FiniteElements::TriangleRectangleGrid::DeltaY (  )  const [inline]

Definition at line 361 of file Galeri_TriangleRectangleGrid.h.

virtual double Galeri::FiniteElements::TriangleRectangleGrid::ElementVolume ( const int  LocalElement  )  const [inline, virtual]

Returns the volume of the specified local finite element.

Returns the area (in 2D) or the volume (in 3D) of the specified local element

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 366 of file Galeri_TriangleRectangleGrid.h.

virtual double Galeri::FiniteElements::TriangleRectangleGrid::FaceArea ( const int  LocalFace  )  const [inline, virtual]

Returns the area of the specified local face.

Returns the length (in 2D) or the area (in 3D) of the specified boundary face

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 371 of file Galeri_TriangleRectangleGrid.h.

virtual double Galeri::FiniteElements::TriangleRectangleGrid::MyVolume (  )  const [inline, virtual]

Returns the volume of all local elements.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 381 of file Galeri_TriangleRectangleGrid.h.

virtual double Galeri::FiniteElements::TriangleRectangleGrid::GlobalVolume (  )  const [inline, virtual]

Returns the global volume of the grid.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 386 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumDomainsX (  )  const [inline]

Definition at line 391 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumDomainsY (  )  const [inline]

Definition at line 396 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::ExportToVertexMap ( const Epetra_DistObject RowObject,
Epetra_DistObject VertexObject 
) const [inline, virtual]

Exports distributed object from RowMap() to VertexMap().

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 401 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::ExportToRowMap ( const Epetra_DistObject RowObject,
Epetra_DistObject VertexObject 
) const [inline, virtual]

Exports distributed object from VertexMap() to RowMap().

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 407 of file Galeri_TriangleRectangleGrid.h.

int Galeri::FiniteElements::TriangleRectangleGrid::NumNeighborsPerElement (  )  const [inline, virtual]

Returns the number of neighboring elements.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 413 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::ElementNeighbors ( int  LocalElement,
int *  elements 
) const [inline, virtual]

Returns the local IDs of neighboring elements.

Implements Galeri::FiniteElements::AbstractGrid.

Definition at line 418 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::GetVertexXY ( const int &  GlobalID,
int &  ix,
int &  iy 
) const [inline, private]

Definition at line 426 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::GetElementXY ( const int &  GlobalID,
int &  ix,
int &  iy 
) const [inline, private]

Definition at line 433 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::GetLocalElementXY ( const int &  LocalID,
int &  ix,
int &  iy 
) const [inline, private]

Definition at line 439 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::GetProcessorXY ( int &  ix,
int &  iy 
) const [inline, private]

Definition at line 445 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::IL_ElementVertices ( const int  LocalID,
int *  elements,
const bool  ReturnGlobal = false 
) const [inline, private]

Definition at line 451 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::CreateElementMap (  )  [inline, private]

Definition at line 471 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::CreateBoundaryFaces (  )  [inline, private]

Definition at line 477 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::CreateVertexMap (  )  [inline, private]

Definition at line 566 of file Galeri_TriangleRectangleGrid.h.

void Galeri::FiniteElements::TriangleRectangleGrid::CreateRowMap (  )  [inline, private]

Definition at line 592 of file Galeri_TriangleRectangleGrid.h.


Member Data Documentation

Definition at line 628 of file Galeri_TriangleRectangleGrid.h.

Definition at line 630 of file Galeri_TriangleRectangleGrid.h.

Definition at line 631 of file Galeri_TriangleRectangleGrid.h.

Definition at line 632 of file Galeri_TriangleRectangleGrid.h.

Definition at line 633 of file Galeri_TriangleRectangleGrid.h.

Definition at line 634 of file Galeri_TriangleRectangleGrid.h.

Definition at line 635 of file Galeri_TriangleRectangleGrid.h.

Definition at line 636 of file Galeri_TriangleRectangleGrid.h.

Definition at line 637 of file Galeri_TriangleRectangleGrid.h.

Definition at line 638 of file Galeri_TriangleRectangleGrid.h.

Definition at line 639 of file Galeri_TriangleRectangleGrid.h.

Definition at line 641 of file Galeri_TriangleRectangleGrid.h.

Definition at line 642 of file Galeri_TriangleRectangleGrid.h.

Definition at line 643 of file Galeri_TriangleRectangleGrid.h.

Definition at line 644 of file Galeri_TriangleRectangleGrid.h.

Definition at line 645 of file Galeri_TriangleRectangleGrid.h.

Definition at line 646 of file Galeri_TriangleRectangleGrid.h.

Definition at line 647 of file Galeri_TriangleRectangleGrid.h.

Definition at line 648 of file Galeri_TriangleRectangleGrid.h.

Definition at line 650 of file Galeri_TriangleRectangleGrid.h.

Definition at line 651 of file Galeri_TriangleRectangleGrid.h.

Definition at line 652 of file Galeri_TriangleRectangleGrid.h.

Definition at line 653 of file Galeri_TriangleRectangleGrid.h.

Definition at line 655 of file Galeri_TriangleRectangleGrid.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines
Generated on Wed Apr 13 10:08:42 2011 for Galeri Package Browser (Single Doxygen Collection) by  doxygen 1.6.3