Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

LabeledCellSet.h

Go to the documentation of this file.
00001 #ifndef LABELEDCELLSET_H
00002 #define LABELEDCELLSET_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include <string>
00007 #include "CellSetBase.h"
00008 #include "CellSet.h"
00009 
00010 
00011 
00012 namespace Sundance
00013 {
00014 
00015   using namespace TSF;
00016   using std::string;
00017 
00018   using std::ostream;
00019 
00020   /** \ingroup UserLevelGeometry
00021    * A CellSet containing all cells having a given label.
00022    */
00023 
00024   class LabeledCellSet : public CellSetBase
00025     {
00026     public:
00027       /** create a labeled cell set containing cells
00028        * with a given label */
00029       LabeledCellSet(const CellSet& superset, const string& label);
00030 
00031       /** dtor */
00032       virtual ~LabeledCellSet(){;}
00033 
00034       /** determine if a cell is contained in this set */
00035       virtual bool contains(const Cell& cell) const ;
00036 
00037       /** write self to XML */
00038       virtual XMLObject toXML() const ;
00039 
00040       /** find the cell dimensions that should be searched to find cells
00041        * in this set */
00042       virtual int dimension(const Mesh& mesh) const ;
00043 
00044 
00045       /** test equality */
00046       virtual bool equals(const CellSet& other) const ;
00047 
00048       /** test ordering */
00049       virtual bool lessThan(const CellSet& other) const ;
00050     private:
00051 
00052       /** low-level routine to find a list of cell blocks */
00053       virtual TSFHashtable<CellTopologyCode, TSFSmartPtr<TSFArray<CellBlock> > >
00054         innerGetCellBlocks(const Mesh& mesh,
00055                            TSFNonDupArray<CellTopologyCode>& cellType) const ;
00056 
00057 
00058       /** low-level routine to find an ordered list of cells */
00059       virtual TSFSmartPtr<TSFArray<Cell> >
00060         innerGetOrderedCells(const Mesh& mesh) const ;
00061 
00062       CellSet superset_;
00063       string label_;
00064 
00065     };
00066 
00067 }
00068 #endif

Contact:
Kevin Long (krlong@ca.sandia.gov)


Documentation generated by