ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFEMElement2DMembrane.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 __itkFEMElement2DMembrane_h
00020 #define __itkFEMElement2DMembrane_h
00021 
00022 #include "itkFEMElementBase.h"
00023 #include "itkFEMMaterialLinearElasticity.h"
00024 
00025 namespace itk
00026 {
00027 namespace fem
00028 {
00052 template <class TBaseClass = Element>
00053 class Element2DMembrane : public TBaseClass
00054 {
00055 public:
00056 
00058   typedef Element2DMembrane        Self;
00059   typedef TBaseClass               Superclass;
00060   typedef SmartPointer<Self>       Pointer;
00061   typedef SmartPointer<const Self> ConstPointer;
00062 
00064   itkTypeMacro(Element2DMembrane, TBaseClass);
00065 
00066   // Repeat the required typedefs and enums from parent class
00067   typedef typename Superclass::Float      Float;
00068   typedef typename Superclass::MatrixType MatrixType;
00069   typedef typename Superclass::VectorType VectorType;
00070 
00074   Element2DMembrane();
00075 
00076   // ////////////////////////////////////////////////////////////////////////
00084   virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const;
00085 
00089   virtual void GetMaterialMatrix(MatrixType & D) const;
00090 
00094   void GetMassMatrix(MatrixType & Me) const;
00095 
00099   virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const
00100   {
00101     return 2;
00102   }
00103 
00107   virtual Material::ConstPointer GetMaterial(void) const
00108   {
00109     return m_mat;
00110   }
00111 
00112   virtual void SetMaterial(Material::ConstPointer mat_)
00113   {
00114     m_mat =
00115       dynamic_cast<const MaterialLinearElasticity *>( mat_.GetPointer() );
00116   }
00117 
00118 protected:
00119 
00120   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00121 
00125   const MaterialLinearElasticity *m_mat;
00126 
00127 };  // class Element2DMembrane
00128 
00129 }
00130 }  // end namespace itk::fem
00131 
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkFEMElement2DMembrane.hxx"
00134 #endif
00135 
00136 #endif  // #ifndef __itkFEMElement2DMembrane_h
00137