VTK
vtkBiQuadraticQuadraticHexahedron.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBiQuadraticQuadraticHexahedron.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 =========================================================================*/
70 #ifndef __vtkBiQuadraticQuadraticHexahedron_h
71 #define __vtkBiQuadraticQuadraticHexahedron_h
72 
73 #include "vtkNonLinearCell.h"
74 
75 class vtkQuadraticEdge;
76 class vtkQuadraticQuad;
77 class vtkBiQuadraticQuad;
78 class vtkHexahedron;
79 class vtkDoubleArray;
80 
82 {
83 public:
86  void PrintSelf(ostream& os, vtkIndent indent);
87 
89 
92  int GetCellDimension() {return 3;}
93  int GetNumberOfEdges() {return 12;}
94  int GetNumberOfFaces() {return 6;}
95  vtkCell *GetEdge(int);
96  vtkCell *GetFace(int);
98 
99  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
100  void Contour(double value, vtkDataArray *cellScalars,
101  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
102  vtkCellArray *lines, vtkCellArray *polys,
103  vtkPointData *inPd, vtkPointData *outPd,
104  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
105  int EvaluatePosition(double x[3], double* closestPoint,
106  int& subId, double pcoords[3],
107  double& dist2, double *weights);
108  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
109  double *weights);
110  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
111  void Derivatives(int subId, double pcoords[3], double *values,
112  int dim, double *derivs);
113  virtual double *GetParametricCoords();
114 
116 
119  void Clip(double value, vtkDataArray *cellScalars,
120  vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
121  vtkPointData *inPd, vtkPointData *outPd,
122  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
123  int insideOut);
125 
127 
129  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
130  double x[3], double pcoords[3], int& subId);
132 
134 
136  static void InterpolationFunctions(double pcoords[3], double weights[24]);
137  // Description:
138  // @deprecated Replaced by vtkBiQuadraticQuadraticHexahedron::InterpolateDerivs as of VTK 5.2
139  static void InterpolationDerivs(double pcoords[3], double derivs[72]);
140  // Description:
141  // Compute the interpolation functions/derivatives
142  // (aka shape functions/derivatives)
143  virtual void InterpolateFunctions(double pcoords[3], double weights[24])
144  {
146  }
147  virtual void InterpolateDerivs(double pcoords[3], double derivs[72])
148  {
150  }
151  // Description:
152  // Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
153  // Ids are related to the cell, not to the dataset.
154  static int *GetEdgeArray(int edgeId);
155  static int *GetFaceArray(int faceId);
157 
161  void JacobianInverse(double pcoords[3], double **inverse, double derivs[72]);
162 
163 protected:
166 
175 
176  void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
177  vtkDataArray *cellScalars);
178 
179 private:
181  void operator=(const vtkBiQuadraticQuadraticHexahedron&); // Not implemented.
182 };
183 
184 #endif
185 
186