Galeri Development
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Galeri::FiniteElements::HexCubeGrid Class Reference

Creates a grid composed by hexahedra in a cube. More...

#include <Galeri_HexCubeGrid.h>

Inheritance diagram for Galeri::FiniteElements::HexCubeGrid:
Inheritance graph
[legend]
Collaboration diagram for Galeri::FiniteElements::HexCubeGrid:
Collaboration graph
[legend]

Public Member Functions

 HexCubeGrid (Epetra_Comm &Comm, const int nx, const int ny, const int nz, const int mx, const int my, const int mz, const double lx=1.0, const double ly=1.0, const double lz=1.0)
 Constructor.
 
virtual ~HexCubeGrid ()
 Destructor.
 
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 std::string ElementType () const
 Returns GALERI_HEX.
 
virtual const Epetra_Comm & Comm () 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_Map & VertexMap () const
 Returns a reference to the map representing the vertex distribution.
 
virtual const Epetra_Map & ElementMap () const
 
virtual const Epetra_Map & RowMap () const
 Returns a reference to the map representing the distribution of rows.
 
virtual const Epetra_Import & Importer () 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 NumMyElementsXY () const
 
int NumMyElementsZ () const
 
int NumMyVerticesX () const
 
int NumMyVerticesY () const
 
int NumMyVerticesXY () const
 
int NumMyVerticesZ () const
 
int NumGlobalElementsX () const
 
int NumGlobalElementsY () const
 
int NumGlobalElementsXY () const
 
int NumGlobalElementsZ () const
 
int NumGlobalVerticesX () const
 
int NumGlobalVerticesY () const
 
int NumGlobalVerticesXY () const
 
int NumGlobalVerticesZ () const
 
double LengthX () const
 
double LengthY () const
 
double LengthZ () const
 
double DeltaX () const
 
double DeltaY () const
 
double DeltaZ () 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
 
int NumDomainsZ () 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().
 
virtual int NumNeighborsPerElement () const
 Returns the number of neighboring elements.
 
virtual void ElementNeighbors (const int LocalElement, int *elements) const
 Returns the local IDs of neighboring elements.
 
- Public Member Functions inherited from Galeri::FiniteElements::AbstractGrid
virtual ~AbstractGrid ()
 Destructor.
 
virtual int NumDimensions () const =0
 Returns the number of dimensions of the grid.
 
virtual int NumVerticesPerElement () const =0
 Returns the number of vertices contained in each element.
 
virtual int NumFacesPerElement () const =0
 Returns the number of faces contained in each element.
 
virtual int NumVerticesPerFace () const =0
 Returns the number of vertices contained in each face.
 
virtual std::string ElementType () const =0
 Returns a string containing the element type.
 
virtual int NumNeighborsPerElement () const =0
 Returns the number of neighboring elements.
 
virtual int NumMyElements () const =0
 Returns the number of finite elements on the calling process.
 
virtual int NumGlobalElements () const =0
 Returns the global number of finite elements.
 
virtual int NumMyVertices () const =0
 Returns the number of vertices on the calling process.
 
virtual int NumGlobalVertices () const =0
 Returns the global number of vertices.
 
virtual int NumMyBoundaryFaces () const =0
 Returns the number of boundary faces on the calling process.
 
virtual int NumGlobalBoundaryFaces () const =0
 Returns the global number of boundary faces.
 
virtual double MyVolume () const =0
 Returns the volume of all local elements.
 
virtual double GlobalVolume () const =0
 Returns the global volume of the grid.
 
virtual void VertexCoord (const int LocalVertex, double *coord) const =0
 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 =0
 Returns the coordinates of specified local vertices.
 
virtual void ElementVertices (const int LocalElement, int *elements) const =0
 Returns the local vertex IDs of the specified local finite element.
 
virtual void ElementNeighbors (const int LocalElement, int *elements) const =0
 Returns the local IDs of neighboring elements.
 
virtual void FaceVertices (const int LocalFace, int &tag, int *IDs) const =0
 Returns the local vertex IDs of vertices contained in the specified boundary face.
 
virtual int FacePatch (const int LocalFace) const =0
 Returns the patch ID of the specified face.
 
virtual double ElementMinLength (const int LocalElement) const =0
 Returns the volume of the specified local finite element.
 
virtual double ElementMaxLength (const int LocalElement) const =0
 Returns the volume of the specified local finite element.
 
virtual double ElementVolume (const int LocalElement) const =0
 Returns the volume of the specified local finite element.
 
virtual double FaceArea (const int LocalFace) const =0
 Returns the area of the specified local face.
 
virtual const Epetra_Map & VertexMap () const =0
 Returns a reference to the map representing the vertex distribution.
 
virtual const Epetra_Map & RowMap () const =0
 Returns a reference to the map representing the distribution of rows.
 
virtual void ExportToVertexMap (const Epetra_DistObject &RowObject, Epetra_DistObject &VertexObject) const =0
 Exports distributed object from RowMap() to VertexMap().
 
virtual void ExportToRowMap (const Epetra_DistObject &RowObject, Epetra_DistObject &VertexObject) const =0
 Exports distributed object from VertexMap() to RowMap().
 
virtual const Epetra_Comm & Comm () const =0
 Returns a reference to the communicator object.
 

Detailed Description

Creates a grid composed by hexahedra in a cube.

Author
Marzio Sala, SNL 9214.
Date
Last updated on 31-Mar-05.

Constructor & Destructor Documentation

◆ HexCubeGrid()

Galeri::FiniteElements::HexCubeGrid::HexCubeGrid ( Epetra_Comm &  Comm,
const int  nx,
const int  ny,
const int  nz,
const int  mx,
const int  my,
const int  mz,
const double  lx = 1.0,
const double  ly = 1.0,
const double  lz = 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.
mz- (In) Number of subdomains along the Z-axis.
lx- (In) Length of the cube along the X-axis.
ly- (In) Length of the cube along the Y-axis.
lz- (In) Length of the cube along the Z-axis.
Note
The total number of processors must equal mx * my.

References Comm(), RowMap(), and VertexMap().

Member Function Documentation

◆ Comm()

virtual const Epetra_Comm & Galeri::FiniteElements::HexCubeGrid::Comm ( ) const
inlinevirtual

Returns a reference to the communicator object.

Implements Galeri::FiniteElements::AbstractGrid.

Referenced by HexCubeGrid().

◆ ElementMaxLength()

virtual double Galeri::FiniteElements::HexCubeGrid::ElementMaxLength ( const int  LocalElement) const
inlinevirtual

Returns the volume of the specified local finite element.

Implements Galeri::FiniteElements::AbstractGrid.

◆ ElementMinLength()

virtual double Galeri::FiniteElements::HexCubeGrid::ElementMinLength ( const int  LocalElement) const
inlinevirtual

Returns the volume of the specified local finite element.

Implements Galeri::FiniteElements::AbstractGrid.

◆ ElementNeighbors()

virtual void Galeri::FiniteElements::HexCubeGrid::ElementNeighbors ( const int  LocalElement,
int *  elements 
) const
inlinevirtual

Returns the local IDs of neighboring elements.

Implements Galeri::FiniteElements::AbstractGrid.

◆ ElementType()

virtual std::string Galeri::FiniteElements::HexCubeGrid::ElementType ( ) const
inlinevirtual

Returns GALERI_HEX.

Implements Galeri::FiniteElements::AbstractGrid.

◆ ElementVertices()

virtual void Galeri::FiniteElements::HexCubeGrid::ElementVertices ( const int  LocalElement,
int *  elements 
) const
inlinevirtual

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.

◆ ElementVolume()

virtual double Galeri::FiniteElements::HexCubeGrid::ElementVolume ( const int  LocalElement) const
inlinevirtual

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.

◆ ExportToRowMap()

void Galeri::FiniteElements::HexCubeGrid::ExportToRowMap ( const Epetra_DistObject &  RowObject,
Epetra_DistObject &  VertexObject 
) const
inlinevirtual

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

Implements Galeri::FiniteElements::AbstractGrid.

◆ ExportToVertexMap()

void Galeri::FiniteElements::HexCubeGrid::ExportToVertexMap ( const Epetra_DistObject &  RowObject,
Epetra_DistObject &  VertexObject 
) const
inlinevirtual

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

Implements Galeri::FiniteElements::AbstractGrid.

◆ FaceArea()

virtual double Galeri::FiniteElements::HexCubeGrid::FaceArea ( const int  LocalFace) const
inlinevirtual

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.

◆ FacePatch()

int Galeri::FiniteElements::HexCubeGrid::FacePatch ( const int  LocalFace) const
inlinevirtual

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.

◆ FaceVertices()

virtual void Galeri::FiniteElements::HexCubeGrid::FaceVertices ( const int  LocalFace,
int &  tag,
int *  IDs 
) const
inlinevirtual

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

Implements Galeri::FiniteElements::AbstractGrid.

◆ GlobalVolume()

virtual double Galeri::FiniteElements::HexCubeGrid::GlobalVolume ( ) const
inlinevirtual

Returns the global volume of the grid.

Implements Galeri::FiniteElements::AbstractGrid.

◆ MyVolume()

virtual double Galeri::FiniteElements::HexCubeGrid::MyVolume ( ) const
inlinevirtual

Returns the volume of all local elements.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumDimensions()

virtual int Galeri::FiniteElements::HexCubeGrid::NumDimensions ( ) const
inlinevirtual

Returns the number of dimensions of the grid.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumFacesPerElement()

virtual int Galeri::FiniteElements::HexCubeGrid::NumFacesPerElement ( ) const
inlinevirtual

Returns the number of faces contained in each element.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumGlobalBoundaryFaces()

virtual int Galeri::FiniteElements::HexCubeGrid::NumGlobalBoundaryFaces ( ) const
inlinevirtual

Returns the global number of boundary faces.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumGlobalElements()

virtual int Galeri::FiniteElements::HexCubeGrid::NumGlobalElements ( ) const
inlinevirtual

Returns the global number of finite elements.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumGlobalVertices()

virtual int Galeri::FiniteElements::HexCubeGrid::NumGlobalVertices ( ) const
inlinevirtual

Returns the global number of vertices.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumMyBoundaryFaces()

virtual int Galeri::FiniteElements::HexCubeGrid::NumMyBoundaryFaces ( ) const
inlinevirtual

Returns the number of boundary faces on the calling process.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumMyElements()

virtual int Galeri::FiniteElements::HexCubeGrid::NumMyElements ( ) const
inlinevirtual

Returns the number of finite elements on the calling process.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumMyVertices()

virtual int Galeri::FiniteElements::HexCubeGrid::NumMyVertices ( ) const
inlinevirtual

Returns the number of vertices on the calling process.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumNeighborsPerElement()

virtual int Galeri::FiniteElements::HexCubeGrid::NumNeighborsPerElement ( ) const
inlinevirtual

Returns the number of neighboring elements.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumVerticesPerElement()

virtual int Galeri::FiniteElements::HexCubeGrid::NumVerticesPerElement ( ) const
inlinevirtual

Returns the number of vertices contained in each element.

Implements Galeri::FiniteElements::AbstractGrid.

◆ NumVerticesPerFace()

virtual int Galeri::FiniteElements::HexCubeGrid::NumVerticesPerFace ( ) const
inlinevirtual

Returns the number of vertices contained in each face.

Implements Galeri::FiniteElements::AbstractGrid.

◆ RowMap()

virtual const Epetra_Map & Galeri::FiniteElements::HexCubeGrid::RowMap ( ) const
inlinevirtual

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

Implements Galeri::FiniteElements::AbstractGrid.

Referenced by HexCubeGrid().

◆ VertexCoord() [1/2]

virtual void Galeri::FiniteElements::HexCubeGrid::VertexCoord ( const int  Length,
const int *  IDs,
double *  x,
double *  y,
double *  z 
) const
inlinevirtual

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.

References Galeri::FiniteElements::Length().

◆ VertexCoord() [2/2]

virtual void Galeri::FiniteElements::HexCubeGrid::VertexCoord ( const int  LocalVertex,
double *  coord 
) const
inlinevirtual

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.

◆ VertexMap()

virtual const Epetra_Map & Galeri::FiniteElements::HexCubeGrid::VertexMap ( ) const
inlinevirtual

Returns a reference to the map representing the vertex distribution.

Implements Galeri::FiniteElements::AbstractGrid.

Referenced by HexCubeGrid().


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