VTK  9.0.1
vtkLagrangeInterpolation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLagrangeInterpolation.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 =========================================================================*/
15 // .NAME vtkLagrangeInterpolation
16 // .SECTION Description
17 // .SECTION See Also
18 #ifndef vtkLagrangeInterpolation_h
19 #define vtkLagrangeInterpolation_h
20 
21 #include "vtkCommonDataModelModule.h" // For export macro.
23 #include "vtkSmartPointer.h" // For API.
24 
25 #include <vector> // For scratch storage.
26 
27 // Define this to include support for a "complete" (21- vs 18-point) wedge.
28 #define VTK_21_POINT_WEDGE true
29 
30 class vtkPoints;
31 class vtkVector2i;
32 class vtkVector3d;
33 
34 class VTKCOMMONDATAMODEL_EXPORT vtkLagrangeInterpolation : public vtkHigherOrderInterpolation
35 {
36 public:
37  static vtkLagrangeInterpolation* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
41  static void EvaluateShapeFunctions(const int order, const double pcoord, double* shape);
42  static void EvaluateShapeAndGradient(
43  const int order, const double pcoord, double* shape, double* grad);
44 
45  static int Tensor1ShapeFunctions(const int order[1], const double* pcoords, double* shape);
46  static int Tensor1ShapeDerivatives(const int order[1], const double* pcoords, double* derivs);
47 
48  static int Tensor2ShapeFunctions(const int order[2], const double* pcoords, double* shape);
49  static int Tensor2ShapeDerivatives(const int order[2], const double* pcoords, double* derivs);
50 
51  static int Tensor3ShapeFunctions(const int order[3], const double* pcoords, double* shape);
52  static int Tensor3ShapeDerivatives(const int order[3], const double* pcoords, double* derivs);
53 
54  virtual void Tensor3EvaluateDerivative(const int order[3], const double* pcoords,
55  vtkPoints* points, const double* fieldVals, int fieldDim, double* fieldDerivs) override;
56 
57  static void WedgeShapeFunctions(
58  const int order[3], const vtkIdType numberOfPoints, const double* pcoords, double* shape);
59  static void WedgeShapeDerivatives(
60  const int order[3], const vtkIdType numberOfPoints, const double* pcoords, double* derivs);
61 
62  virtual void WedgeEvaluate(const int order[3], const vtkIdType numberOfPoints,
63  const double* pcoords, double* fieldVals, int fieldDim, double* fieldAtPCoords) override;
64 
65  virtual void WedgeEvaluateDerivative(const int order[3], const double* pcoords, vtkPoints* points,
66  const double* fieldVals, int fieldDim, double* fieldDerivs) override;
67 
68 protected:
70  ~vtkLagrangeInterpolation() override;
71 
72 private:
74  void operator=(const vtkLagrangeInterpolation&) = delete;
75 };
76 
77 #endif // vtkLagrangeInterpolation_h
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkHigherOrderInterpolation::Tensor1ShapeDerivatives
static int Tensor1ShapeDerivatives(const int order[1], const double *pcoords, double *derivs, void(*function_evaluate_shape_and_gradient)(int, double, double *, double *))
vtkHigherOrderInterpolation::Tensor2ShapeDerivatives
static int Tensor2ShapeDerivatives(const int order[2], const double *pcoords, double *derivs, void(*function_evaluate_shape_and_gradient)(int, double, double *, double *))
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkHigherOrderInterpolation::Tensor3EvaluateDerivative
virtual void Tensor3EvaluateDerivative(const int order[3], const double *pcoords, vtkPoints *points, const double *fieldVals, int fieldDim, double *fieldDerivs)=0
vtkHigherOrderInterpolation.h
vtkHigherOrderInterpolation::Tensor3ShapeDerivatives
static int Tensor3ShapeDerivatives(const int order[3], const double *pcoords, double *derivs, void(*function_evaluate_shape_and_gradient)(int, double, double *, double *))
vtkX3D::points
@ points
Definition: vtkX3D.h:452
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSmartPointer.h
vtkLagrangeInterpolation
Definition: vtkLagrangeInterpolation.h:34
vtkHigherOrderInterpolation::Tensor1ShapeFunctions
static int Tensor1ShapeFunctions(const int order[1], const double *pcoords, double *shape, void(*function_evaluate_shape_functions)(int, double, double *))
vtkHigherOrderInterpolation::WedgeShapeDerivatives
static void WedgeShapeDerivatives(const int order[3], const vtkIdType numberOfPoints, const double *pcoords, double *derivs, vtkHigherOrderTriangle &tri, void(*function_evaluate_shape_and_gradient)(int, double, double *, double *))
vtkX3D::order
@ order
Definition: vtkX3D.h:446
vtkHigherOrderInterpolation::WedgeEvaluateDerivative
virtual void WedgeEvaluateDerivative(const int order[3], const double *pcoords, vtkPoints *points, const double *fieldVals, int fieldDim, double *fieldDerivs)=0
vtkHigherOrderInterpolation::Tensor3ShapeFunctions
static int Tensor3ShapeFunctions(const int order[3], const double *pcoords, double *shape, void(*function_evaluate_shape_functions)(int, double, double *))
vtkHigherOrderInterpolation::WedgeEvaluate
virtual void WedgeEvaluate(const int order[3], const vtkIdType numberOfPoints, const double *pcoords, double *fieldVals, int fieldDim, double *fieldAtPCoords)=0
vtkHigherOrderInterpolation::WedgeShapeFunctions
static void WedgeShapeFunctions(const int order[3], const vtkIdType numberOfPoints, const double *pcoords, double *shape, vtkHigherOrderTriangle &tri, void(*function_evaluate_shape_functions)(int, double, double *))
vtkHigherOrderInterpolation
Definition: vtkHigherOrderInterpolation.h:35
vtkHigherOrderInterpolation::Tensor2ShapeFunctions
static int Tensor2ShapeFunctions(const int order[2], const double *pcoords, double *shape, void(*function_evaluate_shape_functions)(int, double, double *))
vtkVector2i
Some derived classes for the different vectors commonly used.
Definition: vtkVector.h:419
vtkVector3d
Definition: vtkVector.h:488
vtkHigherOrderInterpolation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.