ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkFEMElement2DC0LinearLine.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef __itkFEMElement2DC0LinearLine_h
20 #define __itkFEMElement2DC0LinearLine_h
21 
22 #include "itkFEMElementStd.h"
23 
24 namespace itk
25 {
26 namespace fem
27 {
34 class Element2DC0LinearLine : public ElementStd<2, 2>
35 {
36 public:
37 
44 
47 
48  // ////////////////////////////////////////////////////////////////////////
54 
56  virtual void GetIntegrationPointAndWeight(unsigned int i,
57  VectorType & pt,
58  Float & w,
59  unsigned int order) const;
60 
62  virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const;
63 
64  // ////////////////////////////////////////////////////////////////////////
70  virtual VectorType ShapeFunctions(const VectorType & pt) const;
71 
73  virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const;
74 
80  virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt,
81  VectorType & localPt) const;
82 
92  virtual void Jacobian(const VectorType & pt, MatrixType & J, const MatrixType *pshapeD = 0) const;
93 
97  Float DistanceToLine(const VectorType & x, const VectorType & p1, const VectorType & p2, Float & t,
98  VectorType & closestPoint) const;
99 
100 protected:
101  virtual void PrintSelf(std::ostream& os, Indent indent) const;
102 
103  virtual void PopulateEdgeIds(void); // HACK: Should PopulateEdgeIds
104  // be const or not in this
105  // hierarchy. Sometimes it is,
106  // sometimes it is not.
107 
108 };
109 }
110 } // end namespace itk::fem
111 
112 #endif // #ifndef __itkFEMElement2DC0LinearLine_h
113