VMTK
Loading...
Searching...
No Matches
vtkvmtkGaussQuadrature.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: VMTK
4
5 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
6 See LICENSE file for details.
7
8 Portions of this code are covered under the VTK copyright.
9 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
10 for details.
11
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
15
16=========================================================================*/
36
37#ifndef __vtkvmtkGaussQuadrature_h
38#define __vtkvmtkGaussQuadrature_h
39
40#include "vtkObject.h"
41#include "vtkvmtkWin32Header.h"
42
43#include "vtkCell.h"
44#include "vtkDoubleArray.h"
45
46class VTK_VMTK_DIFFERENTIAL_GEOMETRY_EXPORT vtkvmtkGaussQuadrature : public vtkObject
47{
48public:
49 vtkTypeMacro(vtkvmtkGaussQuadrature,vtkObject);
51
56 vtkGetObjectMacro(QuadraturePoints,vtkDoubleArray);
57
62 vtkGetObjectMacro(QuadratureWeights,vtkDoubleArray);
63
65
69 vtkSetMacro(Order,int);
70 vtkGetMacro(Order,int);
72
77 {
78 return this->QuadraturePoints->GetNumberOfTuples();
79 }
80
84 double* GetQuadraturePoint(vtkIdType id)
85 {
86 return this->QuadraturePoints->GetTuple(id);
87 }
88
92 void GetQuadraturePoint(vtkIdType id, double* quadraturePoint)
93 {
94 this->QuadraturePoints->GetTuple(id,quadraturePoint);
95 }
96
100 double GetQuadraturePoint(vtkIdType id, int c)
101 {
102 return this->QuadraturePoints->GetComponent(id,c);
103 }
104
108 double GetQuadratureWeight(vtkIdType id)
109 {
110 return this->QuadratureWeights->GetValue(id);
111 }
112
119 void Initialize(vtkIdType cellType);
120
124 void Initialize(vtkCell* cell)
125 {
126 this->Initialize(cell->GetCellType());
127 }
128
134 void Initialize1DGauss();
135
142 void Initialize1DJacobi(int alpha, int beta);
143
147 void ScaleTo01();
148
149protected:
152
153 void TensorProductQuad(vtkvmtkGaussQuadrature* q1D);
154 void TensorProductTriangle(vtkvmtkGaussQuadrature* gauss1D, vtkvmtkGaussQuadrature* jacA1D);
155
156 void TensorProductHexahedron(vtkvmtkGaussQuadrature* q1D);
157 void TensorProductWedge(vtkvmtkGaussQuadrature* q1D, vtkvmtkGaussQuadrature* q2D);
158 void TensorProductTetra(vtkvmtkGaussQuadrature* gauss1D, vtkvmtkGaussQuadrature* jacA1D, vtkvmtkGaussQuadrature* jacB1D);
159
160 vtkDoubleArray* QuadraturePoints;
161 vtkDoubleArray* QuadratureWeights;
162
163 int Order;
165 vtkIdType CellType;
167
168private:
169 vtkvmtkGaussQuadrature(const vtkvmtkGaussQuadrature&); // Not implemented.
170 void operator=(const vtkvmtkGaussQuadrature&); // Not implemented.
171
172};
173
174#endif
Implements a finite element quadrature rule that approximates the definite integral of a function as ...
void GetQuadraturePoint(vtkIdType id, double *quadraturePoint)
double * GetQuadraturePoint(vtkIdType id)
static vtkvmtkGaussQuadrature * New()
void Initialize(vtkIdType cellType)
double GetQuadratureWeight(vtkIdType id)
double GetQuadraturePoint(vtkIdType id, int c)