MFEM v2.0
|
#include <table.hpp>
Public Member Functions | |
Table () | |
Creates an empty table. | |
Table (int dim, int connections_per_row=3) | |
Create a table with a fixed number of connections. | |
Table (int nrows, int *partitioning) | |
void | MakeI (int nrows) |
Next 7 methods are used together with the default constructor. | |
void | AddAColumnInRow (int r) |
void | AddColumnsInRow (int r, int ncol) |
void | MakeJ () |
void | AddConnection (int r, int c) |
void | AddConnections (int r, int *c, int nc) |
void | ShiftUpI () |
void | SetSize (int dim, int connections_per_row) |
Set the size and the number of connections for the table. | |
void | SetDims (int rows, int nnz) |
int | Size () const |
Returns the number of TYPE I elements. | |
int | Size_of_connections () const |
int | operator() (int i, int j) const |
void | GetRow (int i, Array< int > &row) const |
Return row i in array row (the Table must be finalized) | |
int | RowSize (int i) const |
const int * | GetRow (int i) const |
int * | GetRow (int i) |
int * | GetI () |
int * | GetJ () |
const int * | GetI () const |
const int * | GetJ () const |
void | SetIJ (int *newI, int *newJ, int newsize=-1) |
int | Push (int i, int j) |
void | Finalize () |
int | Width () const |
Returns the number of TYPE II elements (after Finalize() is called). | |
void | LoseData () |
Call this if data has been stolen. | |
void | Print (ostream &out=cout, int width=4) const |
Prints the table to stream out. | |
void | Save (ostream &out) const |
~Table () | |
Destroys Table. | |
Protected Attributes | |
int | size |
size is the number of TYPE I elements. | |
int * | I |
int * | J |
Data type Table. Table stores the connectivity of elements of TYPE I to elements of TYPE II, for example, it may be Element-To-Face connectivity table, etc.
Table::Table | ( | ) | [inline] |
Table::Table | ( | int | dim, |
int | connections_per_row = 3 |
||
) | [explicit] |
Table::Table | ( | int | nrows, |
int * | partitioning | ||
) |
void Table::AddAColumnInRow | ( | int | r | ) | [inline] |
Definition at line 47 of file table.hpp.
References I.
Referenced by Mesh::GetVertexToElementTable(), and Transpose().
void Table::AddColumnsInRow | ( | int | r, |
int | ncol | ||
) | [inline] |
Definition at line 48 of file table.hpp.
References I.
Referenced by ListOfIntegerSets::AsTable(), Mesh::GetElementArrayEdgeTable(), and Mesh::Load().
void Table::AddConnection | ( | int | r, |
int | c | ||
) | [inline] |
Definition at line 50 of file table.hpp.
Referenced by Mesh::GetElementArrayEdgeTable(), Mesh::GetVertexToElementTable(), and Transpose().
void Table::AddConnections | ( | int | r, |
int * | c, | ||
int | nc | ||
) |
Definition at line 70 of file table.cpp.
Referenced by ListOfIntegerSets::AsTable(), and Mesh::Load().
void Table::Finalize | ( | ) |
Finalize the table initialization. The function may be called only once, after the table has been initialized, in order to densen array J (by getting rid of -1's in array J). Calling this function will "freeze" the table and function Push will work no more. Note: The table is functional even without calling Finalize().
Definition at line 186 of file table.cpp.
References I, J, mfem_error(), and size.
Referenced by Mesh::ElementToElementTable(), Mesh::GetEdgeVertexTable(), and Mesh::GetElementToFaceTable().
int* Table::GetI | ( | ) | [inline] |
Definition at line 83 of file table.hpp.
References I.
Referenced by FindPartitioningComponents(), Mesh::GeneratePartitioning(), Mesh::GetElementColoring(), ParMesh::GroupVertex(), Mult(), and Transpose().
int* Table::GetJ | ( | ) | [inline] |
Definition at line 84 of file table.hpp.
References J.
Referenced by FindPartitioningComponents(), NURBSExtension::GenerateBdrElementDofTable(), NURBSExtension::GenerateElementDofTable(), Mesh::GeneratePartitioning(), Mesh::GetElementColoring(), ParMesh::GroupVertex(), Mult(), and Transpose().
void Table::GetRow | ( | int | i, |
Array< int > & | row | ||
) | const |
Return row i in array row (the Table must be finalized)
Definition at line 143 of file table.cpp.
References RowSize(), and Array< T >::SetSize().
Referenced by Mesh::ElementToElementTable(), NURBSExtension::Generate2DBdrElementDofTable(), NURBSExtension::Generate2DElementDofTable(), NURBSExtension::Generate3DBdrElementDofTable(), NURBSExtension::Generate3DElementDofTable(), Mesh::GenerateFaces(), FiniteElementSpace::GetBdrElementDofs(), Mesh::GetBdrElementEdges(), Mesh::GetEdgeVertices(), Mesh::GetElementEdges(), Mesh::GetElementFaces(), Mesh::GetFaceEdges(), GroupTopology::GetGroup(), Mesh::GetVertexToVertexTable(), Mesh::HexUniformRefinement(), Mesh::Load(), NURBSExtension::LoadBE(), NURBSExtension::LoadFE(), Mesh::LoadPatchTopo(), NURBSExtension::MergeWeights(), Mesh::PrintElementsWithPartitioning(), Mesh::PrintTopo(), and Mesh::QuadUniformRefinement().
const int* Table::GetRow | ( | int | i | ) | const [inline] |
void Table::LoseData | ( | ) | [inline] |
void Table::MakeI | ( | int | nrows | ) |
Next 7 methods are used together with the default constructor.
Definition at line 52 of file table.cpp.
Referenced by ListOfIntegerSets::AsTable(), Mesh::GetElementArrayEdgeTable(), Mesh::GetVertexToElementTable(), Mesh::Load(), and Transpose().
void Table::MakeJ | ( | ) |
Definition at line 60 of file table.cpp.
Referenced by ListOfIntegerSets::AsTable(), Mesh::GetElementArrayEdgeTable(), Mesh::GetVertexToElementTable(), Mesh::Load(), and Transpose().
int Table::operator() | ( | int | i, |
int | j | ||
) | const |
void Table::Print | ( | ostream & | out = cout , |
int | width = 4 |
||
) | const |
int Table::Push | ( | int | i, |
int | j | ||
) |
Establish connection between element i and element j in the table. The return value is the index of the connection. It returns -1 if it fails to establish the connection. Possibilities are there is not enough memory on row i to establish connection to j, an attempt to establish new connection after calling Finalize().
Reimplemented in STable.
Definition at line 162 of file table.cpp.
References I, J, mfem_error(), and size.
Referenced by Mesh::ElementToElementTable(), Mesh::GetEdgeVertexTable(), and Mesh::GetElementToFaceTable().
int Table::RowSize | ( | int | i | ) | const [inline] |
Definition at line 78 of file table.hpp.
References I.
Referenced by Mesh::ElementToElementTable(), GroupTopology::GetGroupSize(), GetRow(), ParMesh::GroupNEdges(), ParMesh::GroupNFaces(), ParMesh::GroupNVertices(), Mesh::Load(), NURBSExtension::MergeWeights(), and Mesh::PrintElementsWithPartitioning().
void Table::Save | ( | ostream & | out | ) | const |
void Table::SetDims | ( | int | rows, |
int | nnz | ||
) |
void Table::SetIJ | ( | int * | newI, |
int * | newJ, | ||
int | newsize = -1 |
||
) |
void Table::SetSize | ( | int | dim, |
int | connections_per_row | ||
) |
void Table::ShiftUpI | ( | ) |
Definition at line 79 of file table.cpp.
Referenced by ListOfIntegerSets::AsTable(), Mesh::GetElementArrayEdgeTable(), Mesh::GetVertexToElementTable(), Mesh::Load(), and Transpose().
int Table::Size | ( | ) | const [inline] |
Returns the number of TYPE I elements.
Definition at line 62 of file table.hpp.
References size.
Referenced by Mesh::ElementToElementTable(), FindPartitioningComponents(), Mesh::GetVertexToVertexTable(), Mult(), GroupTopology::NGroups(), Mesh::PrintElementsWithPartitioning(), and Transpose().
int Table::Size_of_connections | ( | ) | const [inline] |
Returns the number of connections in the table. If Finalize() is not called, it returns the number of possible connections established by the used constructor. Otherwise, it is exactly the number of established connections before calling Finalize().
Definition at line 68 of file table.hpp.
Referenced by NURBSExtension::GenerateBdrElementDofTable(), and NURBSExtension::GenerateElementDofTable().
int Table::Width | ( | ) | const |
Returns the number of TYPE II elements (after Finalize() is called).
Definition at line 219 of file table.cpp.
Referenced by Mult(), and Transpose().
int* Table::I [protected] |
Arrays for the connectivity information in the CSR storage. I is of size "size+1", J is of size the number of connections between TYPE I to TYPE II elements (actually stored I[size]).
Definition at line 32 of file table.hpp.
Referenced by AddAColumnInRow(), AddColumnsInRow(), AddConnection(), AddConnections(), Finalize(), GetI(), GetRow(), LoseData(), MakeI(), MakeJ(), operator()(), Print(), Push(), RowSize(), Save(), SetDims(), SetIJ(), SetSize(), ShiftUpI(), Size_of_connections(), Table(), Width(), and ~Table().
int * Table::J [protected] |
Definition at line 32 of file table.hpp.
Referenced by AddConnection(), AddConnections(), Finalize(), GetJ(), GetRow(), LoseData(), MakeJ(), operator()(), Print(), Push(), Save(), SetDims(), SetIJ(), SetSize(), Table(), Width(), and ~Table().
int Table::size [protected] |
size is the number of TYPE I elements.
Definition at line 27 of file table.hpp.
Referenced by Finalize(), LoseData(), MakeJ(), operator()(), Print(), Push(), Save(), SetDims(), SetIJ(), SetSize(), ShiftUpI(), Size(), Size_of_connections(), Table(), and Width().