28 #ifndef _CHAINCON_PRODCELL_H_ 29 #define _CHAINCON_PRODCELL_H_ 39 #include "chomp/system/config.h" 47 template <
class CellT>
137 template <
class CellT>
144 template <
class CellT>
151 template <
class CellT>
159 throw "Constructing a simplicial product of cells " 165 template <
class CellT>
175 template <
class CellT>
189 template <
class CellT>
218 cell = s. cell ?
new CellT (*s. cell) : 0;
223 template <
class CellT>
235 template <
class CellT>
236 inline bool tProdCell<CellT>::operator ==
256 template <
class CellT>
266 template <
class CellT>
272 template <
class CellT>
288 template <
class CellT>
294 template <
class CellT>
300 template <
class CellT>
304 throw "Trying to get a non-existent left cell from a product.";
308 template <
class CellT>
312 throw "Trying to get a non-existent right cell from a product.";
316 template <
class CellT>
320 throw "Trying to get a non-existent cell from a product.";
324 template <
class CellT>
330 template <
class CellT>
333 return (n & 1) ? -1 : 1;
341 template <
class CellT>
360 template <
class CellT>
379 template <
class CellT>
380 std::ostream &operator << (std::ostream &out, const tProdCell<CellT> &s)
386 out <<
"(" << s.
getLeft () <<
" X " <<
396 template <
class CellT>
399 throw "Reading a product cell not programmed. Sorry!";
404 #endif // _CHAINCON_PRODCELL_H_ tProdCell< CellT > & operator=(const tProdCell< CellT > &s)
The assignment operator.
const tProdCell & getLeft() const
Returns the left-hand side part of the product.
int_t hashkey2(const tProdCell< CellT > &s)
Generates a hashing key no.
const CellT & getCell() const
Returns the actual cell in case this is not a product.
tProdCell< CellT > * left
A pointer to the left-hand side part of the product.
int dimension
The dimension of the cell.
int boundaryLength() const
Returns the length of the boundary of the simplicial product, which equals the dimension of the cell ...
CellT * cell
A pointer to the actual cell if this is not a product.
int dim() const
Returns the dimension of the cell.
void swap(tProdCell< CellT > &s)
Swaps the data between two cells.
bool defined() const
Checks if the cell is defined.
bool operator==(const tProdCell< CellT > &s) const
Checks if the two cells are equal.
~tProdCell()
The destructor.
int boundaryCoef(int n) const
Returns the n-th coefficient in the boundary of the simplicial product, which is (-1)^n.
std::istream & operator>>(std::istream &in, tProdCell< CellT > &s)
Reading a product cell is not well defined (too much effort, sorry!).
int_t hashkey1(const tProdCell< CellT > &s)
Generates a hashing key no.
A Cartesian product of simplicial cells as a simplicial cell.
tProdCell< CellT > * right
A pointer to the right-hand side part of the product.
tProdCell()
The default constructor of an undefined product cell.
CellT CellType
The type of the cells whose product is stored here.
const tProdCell & getRight() const
Returns the right-hand side part of the product.
bool product() const
Checks if the cell is really a product of two other cells.
int degenerate() const
Checks if the product cell is degenerate, that is, if its (i-1)st face equals ith face...
CellT::EmptyType EmptyType
The type of the empty cell existence decision class.