Public Member Functions | Private Attributes
Sundance::MaximalCofacetBatch Class Reference

MaximalCofacetBatch is used to store the maximal cofacets of a batch of cells of codimension one. More...

List of all members.

Public Member Functions

 MaximalCofacetBatch ()
 Initialize an empty batch.
void reset (int numCells)
 Change the number of cells in the batch.
void reset (int numCells, int numCofacets)
 Change the number of cells and cofacets in the batch.
int numCells () const
 Return the number of cells in the batch.
int numCofacets () const
int cofacetLID (int c, int n, int &facetIndex) const
 Return the LID of the n-th cofacet of the c-th cell in the batch.
void getSpecifiedCofacets (const Array< int > &cofacetNumbers, RCP< Array< int > > &cofacets, RCP< Array< int > > &facetIndices) const
 Pick one specified cofacet for each cell in the batch.
void getSpecifiedCofacets (int cofacetNumber, RCP< Array< int > > &cofacets, RCP< Array< int > > &facetIndices) const
 Pick one specified cofacet for each cell in the batch.
void addSingleCofacet (int c, int cofacetLID, int facetIndex)
 Add a cell with a single cofacet.
void addTwoCofacets (int c, int cofacet1, int facetIndex1, int cofacet2, int facetIndex2)
 Add a cell with two cofacets.

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::BasicSimplicialMesh::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::BasicSimplicialMesh::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:
cThe index (within the batch) of the cell whose cofacets are requested.
nThe number of the cofacet requested. This can only be 0 or 1, and must be less than numCells().
facetIndexThe 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:
cofacetNumberwhich cofacet to select
cofacetsarray for storage of the results.
facetindex 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:
cofacetNumbersthe c-th entry selects cofacet for cell c. Each entry in the array should be either 0 or 1.
cofacetsarray for storage of the results.
facetindex 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(), and reset().

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

Definition at line 75 of file SundanceMaximalCofacetBatch.hpp.

References numCofacets_.

Referenced by 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(), numCells_, and numCofacets_.

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

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(), numCofacets_, 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