00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef vtkQuadratureSchemeDefinition_h
00035 #define vtkQuadratureSchemeDefinition_h
00036
00037 #include "vtkObject.h"
00038
00039 class vtkInformationQuadratureSchemeDefinitionVectorKey;
00040 class vtkXMLDataElement;
00041
00042 class VTK_COMMON_EXPORT vtkQuadratureSchemeDefinition : public vtkObject
00043 {
00044 public:
00045
00046 vtkTypeRevisionMacro(vtkQuadratureSchemeDefinition,vtkObject);
00047 void PrintSelf(ostream& os, vtkIndent indent);
00048 static vtkInformationQuadratureSchemeDefinitionVectorKey* DICTIONARY();
00049
00052 static vtkQuadratureSchemeDefinition *New();
00053
00055 int DeepCopy(const vtkQuadratureSchemeDefinition *other);
00056
00058
00060 int SaveState(vtkXMLDataElement *e);
00061
00062
00063 int RestoreState(vtkXMLDataElement *e);
00065
00068 void Clear();
00069
00071
00072 void Initialize(int cellType,
00073 int numberOfNodes,
00074 int numberOfQuadraturePoints,
00075 double *shapeFunctionWeights);
00076
00077
00078 void Initialize(int cellType,
00079 int numberOfNodes,
00080 int numberOfQuadraturePoints,
00081 double *shapeFunctionWeights,
00082 double *quadratureWeights);
00084
00086
00087 int GetCellType() const { return this->CellType; }
00088
00089
00090 int GetQuadratureKey() const { return this->QuadratureKey; }
00091
00092
00093 int GetNumberOfNodes() const { return this->NumberOfNodes; }
00094
00095
00096 int GetNumberOfQuadraturePoints() const { return this->NumberOfQuadraturePoints; }
00097
00098
00099
00100
00101 const double *GetShapeFunctionWeights() const { return this->ShapeFunctionWeights; }
00102
00103
00104
00105 const double *GetShapeFunctionWeights(int quadraturePointId) const
00106 {
00107 int idx=quadraturePointId*this->NumberOfNodes;
00108 return this->ShapeFunctionWeights+idx;
00109 }
00110
00111
00112 const double *GetQuadratureWeights() const { return this->QuadratureWeights; }
00114
00115 protected:
00116 vtkQuadratureSchemeDefinition();
00117 ~vtkQuadratureSchemeDefinition();
00118 private:
00120
00122 void ReleaseResources();
00123
00124
00125
00126 int SecureResources();
00127
00128
00129
00130 void SetShapeFunctionWeights(const double *W);
00131
00132
00133
00134 void SetQuadratureWeights(const double *W);
00136
00137
00138 vtkQuadratureSchemeDefinition(const vtkQuadratureSchemeDefinition &);
00139 void operator=(const vtkQuadratureSchemeDefinition &);
00140 friend ostream &operator<<(ostream &s, const vtkQuadratureSchemeDefinition &d);
00141 friend istream &operator>>(istream &s, const vtkQuadratureSchemeDefinition &d);
00142
00143 int CellType;
00144 int QuadratureKey;
00145 int NumberOfNodes;
00146 int NumberOfQuadraturePoints;
00147 double *ShapeFunctionWeights;
00148 double *QuadratureWeights;
00149 };
00150
00151 #endif
00152