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

ExclusionCellSet.h

Go to the documentation of this file.
00001 #ifndef EXCLUSIONCELLSET_H
00002 #define EXCLUSIONCELLSET_H
00003 
00004 #include "SundanceDefs.h"
00005 #include "BinaryOpCellSet.h"
00006 #include "CellSet.h"
00007 
00008 namespace Sundance
00009 {
00010 
00011   using namespace TSF;
00012   using std::string;
00013 
00014   using std::ostream;
00015 
00016   /** \ingroup LowLevelGeometry
00017    * ExclusionCellSet represents the exclusion of two cell sets. A
00018    * cell is contained in the set if it is contained in the first set
00019    * but not the second.
00020    */
00021 
00022   class ExclusionCellSet : public BinaryOpCellSet
00023     {
00024     public:
00025       /** construct a exclusion with two operand CellSets */
00026       ExclusionCellSet(const CellSet& left, const CellSet& right);
00027 
00028       /** TUVD */
00029       virtual ~ExclusionCellSet(){;}
00030 
00031       /* determine if a cell is contained in this set */
00032       virtual bool contains(const Cell& cell) const
00033         {return left_.contains(cell) && !right_.contains(cell);}
00034 
00035     protected:
00036       virtual string opType() const {return "ExclusionCellSet";}
00037     };
00038 
00039 
00040 
00041 }
00042 #endif

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


Documentation generated by