Sundance::MaximalCofacetBatch Class Reference

List of all members.

Public Member Functions

 MaximalCofacetBatch ()
void reset (int numCells)
void reset (int numCells, int numCofacets)
int numCells () const
int numCofacets () const
int cofacetLID (int c, int n, int &facetIndex) const
void getSpecifiedCofacets (const Array< int > &cofacetNumbers, RCP< Array< int > > &cofacets, RCP< Array< int > > &facetIndices) const
void getSpecifiedCofacets (int cofacetNumber, RCP< Array< int > > &cofacets, RCP< Array< int > > &facetIndices) const
void addSingleCofacet (int c, int cofacetLID, int facetIndex)
void addTwoCofacets (int c, int cofacet1, int facetIndex1, int cofacet2, int facetIndex2)

Private Attributes

Array< RCP< Array< int > > > cofacetLIDs_
Array< RCP< Array< int > > > facetIndices_
int numCells_
int numCofacets_


Detailed Description

MaximalCofacetBatch is used to store the maximal cofacets of a batch of cells of codimension one. Interior cells will have two cofacets, while boundary cells will have only one. Every cell in the batch required to have the same number of cofacets, which can be arranged at the user level by careful distinction between external boundaries and internal boundaries.

Definition at line 49 of file SundanceMaximalCofacetBatch.hpp.


Constructor & Destructor Documentation

MaximalCofacetBatch::MaximalCofacetBatch (  ) 

Initialize an empty batch

Definition at line 38 of file SundanceMaximalCofacetBatch.cpp.

References cofacetLIDs_, and facetIndices_.


Member Function Documentation

void MaximalCofacetBatch::addSingleCofacet ( int  c,
int  cofacetLID,
int  facetIndex 
)

Add a cell with a single cofacet

Definition at line 71 of file SundanceMaximalCofacetBatch.cpp.

References cofacetLIDs_, facetIndices_, and numCofacets_.

Referenced by Sundance::MeshBase::getMaxCofacetLIDs().

void MaximalCofacetBatch::addTwoCofacets ( int  c,
int  cofacet1,
int  facetIndex1,
int  cofacet2,
int  facetIndex2 
)

Add a cell with two cofacets

Definition at line 81 of file SundanceMaximalCofacetBatch.cpp.

References cofacetLIDs_, facetIndices_, and numCofacets_.

Referenced by Sundance::MeshBase::getMaxCofacetLIDs().

int MaximalCofacetBatch::cofacetLID ( int  c,
int  n,
int &  facetIndex 
) const

Return the LID of the n-th cofacet of the c-th cell in the batch.

Parameters:
c The index (within the batch) of the cell whose cofacets are requested.
n The number of the cofacet requested. This can only be 0 or 1, and must be less than numCells().
facetIndex The c-th cell in the batch is one of the facets of its maximal cofacets. Its facet index within that cell is returned via reference as facetIndex.
Returns:
The LID of the requested cofacet.

Definition at line 97 of file SundanceMaximalCofacetBatch.cpp.

References cofacetLIDs_, facetIndices_, numCells_, and numCofacets_.

Referenced by getSpecifiedCofacets().

void MaximalCofacetBatch::getSpecifiedCofacets ( int  cofacetNumber,
RCP< Array< int > > &  cofacets,
RCP< Array< int > > &  facetIndices 
) const

Pick one specified cofacet for each cell in the batch.

Parameters:
cofacetNumber which cofacet to select
cofacets array for storage of the results.
facet index array for storage of the results.

Definition at line 127 of file SundanceMaximalCofacetBatch.cpp.

References cofacetLIDs_, and facetIndices_.

void MaximalCofacetBatch::getSpecifiedCofacets ( const Array< int > &  cofacetNumbers,
RCP< Array< int > > &  cofacets,
RCP< Array< int > > &  facetIndices 
) const

Pick one specified cofacet for each cell in the batch.

Parameters:
cofacetNumbers the c-th entry selects cofacet for cell c. Each entry in the array should be either 0 or 1.
cofacets array for storage of the results.
facet index array for storage of the results.

Definition at line 108 of file SundanceMaximalCofacetBatch.cpp.

References cofacetLID(), and numCells().

Referenced by Sundance::ExodusWriter::writeMesh().

int Sundance::MaximalCofacetBatch::numCells (  )  const [inline]

Return the number of cells in the batch

Definition at line 70 of file SundanceMaximalCofacetBatch.hpp.

References numCells_.

Referenced by getSpecifiedCofacets().

int Sundance::MaximalCofacetBatch::numCofacets (  )  const [inline]

Definition at line 75 of file SundanceMaximalCofacetBatch.hpp.

References numCofacets_.

void MaximalCofacetBatch::reset ( int  numCells,
int  numCofacets 
)

Change the number of cells and cofacets in the batch.

Definition at line 51 of file SundanceMaximalCofacetBatch.cpp.

References numCofacets_, and reset().

void MaximalCofacetBatch::reset ( int  numCells  ) 

Change the number of cells in the batch.

Definition at line 59 of file SundanceMaximalCofacetBatch.cpp.

References cofacetLIDs_, facetIndices_, numCells_, and numCofacets_.

Referenced by Sundance::MeshBase::getMaxCofacetLIDs(), and reset().


Member Data Documentation

Array<RCP<Array<int> > > Sundance::MaximalCofacetBatch::cofacetLIDs_ [private]

Array<RCP<Array<int> > > Sundance::MaximalCofacetBatch::facetIndices_ [private]

Definition at line 131 of file SundanceMaximalCofacetBatch.hpp.

Referenced by cofacetLID(), numCells(), and reset().

Site Contact