ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkFEMElement3DC0LinearTetrahedron.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 #ifndef __itkFEMElement3DC0LinearTetrahedron_h
00019 #define __itkFEMElement3DC0LinearTetrahedron_h
00020 
00021 #include "itkFEMElementStd.h"
00022 // to make some checks in GetLocalFromGlobalCoordinates
00023 #include <vnl/vnl_matrix.h>
00024 #include <vnl/algo/vnl_matrix_inverse.h>
00025 
00026 namespace itk
00027 {
00028 namespace fem
00029 {
00061 class Element3DC0LinearTetrahedron : public ElementStd<4, 3>
00062 {
00063 public:
00064 
00066   typedef Element3DC0LinearTetrahedron Self;
00067   typedef ElementStd<4, 3>             TemplatedParentClass;
00068   typedef TemplatedParentClass         Superclass;
00069   typedef SmartPointer<Self>           Pointer;
00070   typedef SmartPointer<const Self>     ConstPointer;
00071 
00073   itkTypeMacro(Element3DC0LinearTetrahedron, TemplatedParentClass);
00074 
00075   // ////////////////////////////////////////////////////////////////////////
00080   enum { DefaultIntegrationOrder = 1 };
00081 
00083   virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order) const;
00084 
00086   virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const;
00087 
00088   // ////////////////////////////////////////////////////////////////////////
00094   virtual VectorType ShapeFunctions(const VectorType & pt) const;
00095 
00097   virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const;
00098 
00100   virtual bool GetLocalFromGlobalCoordinates(const VectorType & globalPt, VectorType & localPt) const;
00101 
00102 protected:
00103   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00104 
00105   virtual void PopulateEdgeIds(void);
00106 
00107 };
00108 }
00109 }  // end namespace itk::fem
00110 
00111 #endif  // #ifndef __itkFEMElement3DC0LinearTetrahedron_h
00112