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 vtkInformationStringKey;
00041 class vtkXMLDataElement;
00042
00043 class VTK_COMMON_EXPORT vtkQuadratureSchemeDefinition : public vtkObject
00044 {
00045 public:
00046
00047 vtkTypeMacro(vtkQuadratureSchemeDefinition,vtkObject);
00048 void PrintSelf(ostream& os, vtkIndent indent);
00049 static vtkInformationQuadratureSchemeDefinitionVectorKey* DICTIONARY();
00050 static vtkInformationStringKey* QUADRATURE_OFFSET_ARRAY_NAME();
00051
00054 static vtkQuadratureSchemeDefinition *New();
00055
00057 int DeepCopy(const vtkQuadratureSchemeDefinition *other);
00058
00060
00062 int SaveState(vtkXMLDataElement *e);
00063
00064
00065 int RestoreState(vtkXMLDataElement *e);
00067
00070 void Clear();
00071
00073
00074 void Initialize(int cellType,
00075 int numberOfNodes,
00076 int numberOfQuadraturePoints,
00077 double *shapeFunctionWeights);
00078
00079
00080 void Initialize(int cellType,
00081 int numberOfNodes,
00082 int numberOfQuadraturePoints,
00083 double *shapeFunctionWeights,
00084 double *quadratureWeights);
00086
00088
00089 int GetCellType() const { return this->CellType; }
00090
00091
00092 int GetQuadratureKey() const { return this->QuadratureKey; }
00093
00094
00095 int GetNumberOfNodes() const { return this->NumberOfNodes; }
00096
00097
00098 int GetNumberOfQuadraturePoints() const { return this->NumberOfQuadraturePoints; }
00099
00100
00101
00102
00103 const double *GetShapeFunctionWeights() const { return this->ShapeFunctionWeights; }
00104
00105
00106
00107 const double *GetShapeFunctionWeights(int quadraturePointId) const
00108 {
00109 int idx=quadraturePointId*this->NumberOfNodes;
00110 return this->ShapeFunctionWeights+idx;
00111 }
00112
00113
00114 const double *GetQuadratureWeights() const { return this->QuadratureWeights; }
00116
00117 protected:
00118 vtkQuadratureSchemeDefinition();
00119 ~vtkQuadratureSchemeDefinition();
00120 private:
00122
00124 void ReleaseResources();
00125
00126
00127
00128 int SecureResources();
00129
00130
00131
00132 void SetShapeFunctionWeights(const double *W);
00133
00134
00135
00136 void SetQuadratureWeights(const double *W);
00138
00139
00140 vtkQuadratureSchemeDefinition(const vtkQuadratureSchemeDefinition &);
00141 void operator=(const vtkQuadratureSchemeDefinition &);
00142 friend ostream &operator<<(ostream &s, const vtkQuadratureSchemeDefinition &d);
00143 friend istream &operator>>(istream &s, const vtkQuadratureSchemeDefinition &d);
00144
00145 int CellType;
00146 int QuadratureKey;
00147 int NumberOfNodes;
00148 int NumberOfQuadraturePoints;
00149 double *ShapeFunctionWeights;
00150 double *QuadratureWeights;
00151 };
00152
00153 #endif
00154