VTK
vtkQuadraticHexahedron.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadraticHexahedron.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 =========================================================================*/
36 #ifndef __vtkQuadraticHexahedron_h
37 #define __vtkQuadraticHexahedron_h
38 
39 #include "vtkNonLinearCell.h"
40 
41 class vtkQuadraticEdge;
42 class vtkQuadraticQuad;
43 class vtkHexahedron;
44 class vtkDoubleArray;
45 
47 {
48 public:
49  static vtkQuadraticHexahedron *New();
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
57  int GetCellDimension() {return 3;}
58  int GetNumberOfEdges() {return 12;}
59  int GetNumberOfFaces() {return 6;}
60  vtkCell *GetEdge(int);
61  vtkCell *GetFace(int);
63 
64  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
65  void Contour(double value, vtkDataArray *cellScalars,
67  vtkCellArray *lines, vtkCellArray *polys,
68  vtkPointData *inPd, vtkPointData *outPd,
69  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
70  int EvaluatePosition(double x[3], double* closestPoint,
71  int& subId, double pcoords[3],
72  double& dist2, double *weights);
73  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
74  double *weights);
75  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
76  void Derivatives(int subId, double pcoords[3], double *values,
77  int dim, double *derivs);
78  virtual double *GetParametricCoords();
79 
81 
84  void Clip(double value, vtkDataArray *cellScalars,
85  vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
86  vtkPointData *inPd, vtkPointData *outPd,
87  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
88  int insideOut);
90 
92 
94  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
95  double x[3], double pcoords[3], int& subId);
97 
98 
100 
102  static void InterpolationFunctions(double pcoords[3], double weights[20]);
103  // Description:
104  // @deprecated Replaced by vtkQuadraticHexahedron::InterpolateDerivs as of VTK 5.2
105  static void InterpolationDerivs(double pcoords[3], double derivs[60]);
106  // Description:
107  // Compute the interpolation functions/derivatives
108  // (aka shape functions/derivatives)
109  virtual void InterpolateFunctions(double pcoords[3], double weights[20])
110  {
112  }
113  virtual void InterpolateDerivs(double pcoords[3], double derivs[60])
114  {
116  }
117  // Description:
118  // Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
119  // Ids are related to the cell, not to the dataset.
120  static int *GetEdgeArray(int edgeId);
121  static int *GetFaceArray(int faceId);
123 
127  void JacobianInverse(double pcoords[3], double **inverse, double derivs[60]);
128 
129 protected:
132 
140 
141  void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
142  vtkDataArray *cellScalars);
143 
144 private:
145  vtkQuadraticHexahedron(const vtkQuadraticHexahedron&); // Not implemented.
146  void operator=(const vtkQuadraticHexahedron&); // Not implemented.
147 };
148 
149 #endif
150 
151