VTK
dox/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkBiQuadraticQuadraticHexahedron.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00070 #ifndef __vtkBiQuadraticQuadraticHexahedron_h
00071 #define __vtkBiQuadraticQuadraticHexahedron_h
00072 
00073 #include "vtkCommonDataModelModule.h" // For export macro
00074 #include "vtkNonLinearCell.h"
00075 
00076 class vtkQuadraticEdge;
00077 class vtkQuadraticQuad;
00078 class vtkBiQuadraticQuad;
00079 class vtkHexahedron;
00080 class vtkDoubleArray;
00081 
00082 class VTKCOMMONDATAMODEL_EXPORT vtkBiQuadraticQuadraticHexahedron : public vtkNonLinearCell
00083 {
00084 public:
00085   static vtkBiQuadraticQuadraticHexahedron *New();
00086   vtkTypeMacro(vtkBiQuadraticQuadraticHexahedron,vtkNonLinearCell);
00087   void PrintSelf(ostream& os, vtkIndent indent);
00088 
00090 
00092   int GetCellType() {return VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON;}
00093   int GetCellDimension() {return 3;}
00094   int GetNumberOfEdges() {return 12;}
00095   int GetNumberOfFaces() {return 6;}
00096   vtkCell *GetEdge(int);
00097   vtkCell *GetFace(int);
00099 
00100   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00101   void Contour(double value, vtkDataArray *cellScalars,
00102                vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00103                vtkCellArray *lines, vtkCellArray *polys,
00104                vtkPointData *inPd, vtkPointData *outPd,
00105                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00106   int EvaluatePosition(double x[3], double* closestPoint,
00107                        int& subId, double pcoords[3],
00108                        double& dist2, double *weights);
00109   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00110                         double *weights);
00111   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00112   void Derivatives(int subId, double pcoords[3], double *values,
00113                    int dim, double *derivs);
00114   virtual double *GetParametricCoords();
00115 
00117 
00120   void Clip(double value, vtkDataArray *cellScalars,
00121             vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
00122             vtkPointData *inPd, vtkPointData *outPd,
00123             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00124             int insideOut);
00126 
00128 
00130   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00131                         double x[3], double pcoords[3], int& subId);
00133 
00136   static void InterpolationFunctions(double pcoords[3], double weights[24]);
00139   static void InterpolationDerivs(double pcoords[3], double derivs[72]);
00141 
00143   virtual void InterpolateFunctions(double pcoords[3], double weights[24])
00144     {
00145     vtkBiQuadraticQuadraticHexahedron::InterpolationFunctions(pcoords,weights);
00146     }
00147   virtual void InterpolateDerivs(double pcoords[3], double derivs[72])
00148     {
00149     vtkBiQuadraticQuadraticHexahedron::InterpolationDerivs(pcoords,derivs);
00150     }
00152 
00153 
00155   static int *GetEdgeArray(int edgeId);
00156   static int *GetFaceArray(int faceId);
00158 
00162   void JacobianInverse(double pcoords[3], double **inverse, double derivs[72]);
00163 
00164 protected:
00165   vtkBiQuadraticQuadraticHexahedron();
00166   ~vtkBiQuadraticQuadraticHexahedron();
00167 
00168   vtkQuadraticEdge *Edge;
00169   vtkQuadraticQuad *Face;
00170   vtkBiQuadraticQuad *BiQuadFace;
00171   vtkHexahedron    *Hex;
00172   vtkPointData     *PointData;
00173   vtkCellData      *CellData;
00174   vtkDoubleArray   *CellScalars;
00175   vtkDoubleArray   *Scalars;
00176 
00177   void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
00178     vtkDataArray *cellScalars);
00179 
00180 private:
00181   vtkBiQuadraticQuadraticHexahedron(const vtkBiQuadraticQuadraticHexahedron&);  // Not implemented.
00182   void operator=(const vtkBiQuadraticQuadraticHexahedron&);  // Not implemented.
00183 };
00184 
00185 #endif
00186 
00187