00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _Isorropia_Colorer_hpp_
00031 #define _Isorropia_Colorer_hpp_
00032
00033 #include <Isorropia_ConfigDefs.hpp>
00034 #include <Teuchos_ParameterList.hpp>
00035 #include <Isorropia_Operator.hpp>
00036
00037 namespace Isorropia {
00038
00045 class Colorer : virtual public Operator {
00046 public:
00047
00049 virtual ~Colorer() {}
00050
00051
00062 virtual void color(bool forceColoring=false) = 0;
00063
00064
00072 virtual int numColors() const {
00073 return numProperties(); }
00074
00075
00084 virtual int numElemsWithColor(int color) const
00085 { return numElemsWithProperty(color); }
00086
00087
00099 virtual void elemsWithColor(int color,
00100 int* elementList,
00101 int len) const {
00102 return elemsWithProperty(color, elementList, len);}
00103
00117 virtual int extractColorsView(int& size,
00118 const int*& array) const {
00119 return extractPropertiesView(size, array);
00120 }
00121
00122
00137 virtual int extractColorsCopy(int len,
00138 int& size,
00139 int* array) const {
00140 return extractPropertiesCopy(len, size, array);
00141 }
00142
00143
00144 };
00145
00146 }
00147
00148 #endif
00149