ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkFEMElement3DC0LinearTriangular.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 *
00003 * Copyright Insight Software Consortium
00004 *
00005 * Licensed under the Apache License, Version 2.0 (the "License");
00006 * you may not use this file except in compliance with the License.
00007 * You may obtain a copy of the License at
00008 *
00009 * http://www.apache.org/licenses/LICENSE-2.0.txt
00010 *
00011 * Unless required by applicable law or agreed to in writing, software
00012 * distributed under the License is distributed on an "AS IS" BASIS,
00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 * See the License for the specific language governing permissions and
00015 * limitations under the License.
00016 *
00017 *=========================================================================*/
00018 
00019 #ifndef __itkFEMElement3DC0LinearTriangular_h
00020 #define __itkFEMElement3DC0LinearTriangular_h
00021 
00022 #include "itkFEMElementStd.h"
00023 
00024 namespace itk
00025 {
00026 namespace fem
00027 {
00051 class Element3DC0LinearTriangular : public ElementStd<3, 3>
00052 {
00053 public:
00055   typedef Element3DC0LinearTriangular Self;
00056   typedef ElementStd<3, 3>            TemplatedParentClass;
00057   typedef TemplatedParentClass        Superclass;
00058   typedef SmartPointer<Self>          Pointer;
00059   typedef SmartPointer<const Self>    ConstPointer;
00060 
00062   itkTypeMacro(Element3DC0LinearTriangular, TemplatedParentClass);
00063 
00064 // ////////////////////////////////////////////////////////////////////////
00065 /*
00066  * Methods related to numeric integration
00067  */
00068 
00069   enum { DefaultIntegrationOrder = 1 };
00070 
00072   virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const;
00073 
00075   virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const;
00076 
00077   // ////////////////////////////////////////////////////////////////////////
00078   /*
00079    * Methods related to the geometry of an element
00080    */
00081 
00083   virtual VectorType ShapeFunctions(const VectorType & pt) const;
00084 
00086   virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const;
00087 
00089   virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const;
00090 
00092   virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ = 0) const;
00093 
00095   virtual void JacobianInverse(const VectorType & pt, MatrixType & invJ, const MatrixType *pJ = 0) const;
00096 
00098   virtual void PopulateEdgeIds();
00099 
00103   void ComputeNormalDirection(const VectorType & v1, const VectorType & v2, const VectorType & v3,
00104                               VectorType & n) const;
00105 
00109   void GeneralizedProjectPoint(const VectorType & x, const VectorType & origin, const VectorType & normal,
00110                                VectorType & xproj) const;
00111 
00113   itk::fem::Element::Float Determinant2x2(const VectorType & c1, const VectorType & c2) const;
00114 
00118   static const Float trigGaussRuleInfo[6][7][4];
00119 
00124   static const unsigned int Nip[6];
00125 protected:
00126   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00127 
00128 };
00129 }
00130 }  // end namespace itk::fem
00131 
00132 #endif  // #ifndef __itkFEMElement3DC0LinearTriangular_h
00133