VTK
vtkQuadratureSchemeDefinition.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadratureSchemeDefinition.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkQuadratureSchemeDefinition_h
35 #define vtkQuadratureSchemeDefinition_h
36 
37 #include "vtkCommonDataModelModule.h" // For export macro
38 #include "vtkObject.h"
39 
42 class vtkXMLDataElement;
43 
45 {
46 public:
47  // vtk stuff
49  void PrintSelf(ostream& os, vtkIndent indent);
51  static vtkInformationStringKey* QUADRATURE_OFFSET_ARRAY_NAME();
52 
56 
58  int DeepCopy(const vtkQuadratureSchemeDefinition *other);
59 
62  int SaveState(vtkXMLDataElement *e);
64  int RestoreState(vtkXMLDataElement *e);
65 
68  void Clear();
69 
71 
72  void Initialize(int cellType,
73  int numberOfNodes,
74  int numberOfQuadraturePoints,
75  double *shapeFunctionWeights);
77 
78 
79  void Initialize(int cellType,
80  int numberOfNodes,
81  int numberOfQuadraturePoints,
82  double *shapeFunctionWeights,
83  double *quadratureWeights);
85 
87  int GetCellType() const { return this->CellType; }
89  int GetQuadratureKey() const { return this->QuadratureKey; }
91  int GetNumberOfNodes() const { return this->NumberOfNodes; }
93  int GetNumberOfQuadraturePoints() const { return this->NumberOfQuadraturePoints; }
97  const double *GetShapeFunctionWeights() const { return this->ShapeFunctionWeights; }
99 
101  const double *GetShapeFunctionWeights(int quadraturePointId) const
102  {
103  int idx=quadraturePointId*this->NumberOfNodes;
104  return this->ShapeFunctionWeights+idx;
105  }
107 
108  const double *GetQuadratureWeights() const { return this->QuadratureWeights; }
109 
110 protected:
113 private:
116  void ReleaseResources();
118  int SecureResources();
121  void SetShapeFunctionWeights(const double *W);
124  void SetQuadratureWeights(const double *W);
125 
126  //
128  void operator=(const vtkQuadratureSchemeDefinition &); // Not implemented.
129  friend ostream &operator<<(ostream &s, const vtkQuadratureSchemeDefinition &d);
130  friend istream &operator>>(istream &s, vtkQuadratureSchemeDefinition &d);
131  //
132  int CellType;
133  int QuadratureKey;
134  int NumberOfNodes;
135  int NumberOfQuadraturePoints;
136  double *ShapeFunctionWeights;
137  double *QuadratureWeights;
138 };
139 
140 #endif
141 
abstract base class for most VTK objects
Definition: vtkObject.h:61
Represents an XML element and those nested inside.
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
const double * GetShapeFunctionWeights() const
Key for string values in vtkInformation.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
CellTypeInDataSet cellType(vtkDataSet *input)
static vtkObject * New()
friend VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, vtkObjectBase &o)
const double * GetShapeFunctionWeights(int quadraturePointId) const
#define VTKCOMMONDATAMODEL_EXPORT