ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkFEMElement3DStrain.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 __itkFEMElement3DStrain_h
00020 #define __itkFEMElement3DStrain_h
00021 
00022 #include "itkFEMElementBase.h"
00023 #include "itkFEMMaterialLinearElasticity.h"
00024 
00025 namespace itk
00026 {
00027 namespace fem
00028 {
00046 template <class TBaseClass = Element>
00047 class Element3DStrain : public TBaseClass
00048 {
00049 public:
00050 
00052   typedef Element3DStrain          Self;
00053   typedef TBaseClass               Superclass;
00054   typedef SmartPointer<Self>       Pointer;
00055   typedef SmartPointer<const Self> ConstPointer;
00056 
00058   itkTypeMacro(Element3DStrain, TBaseClass);
00059 
00060   // Repeat the required typedefs and enums from parent class
00061   typedef typename Superclass::Float      Float;
00062   typedef typename Superclass::MatrixType MatrixType;
00063   typedef typename Superclass::VectorType VectorType;
00064 
00068   Element3DStrain();
00069 
00070   // ////////////////////////////////////////////////////////////////////////
00078   virtual void GetStrainDisplacementMatrix(MatrixType & B, const MatrixType & shapeDgl) const;
00079 
00083   virtual void GetMaterialMatrix(MatrixType & D) const;
00084 
00088   virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const
00089   {
00090     return 3;
00091   }
00092 
00096   virtual Material::ConstPointer GetMaterial(void) const
00097   {
00098     return m_mat;
00099   }
00100 
00101   virtual void SetMaterial(Material::ConstPointer mat_)
00102   {
00103     m_mat =
00104       dynamic_cast<const MaterialLinearElasticity *>( mat_.GetPointer() );
00105   }
00106 
00107 protected:
00108 
00109   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00110 
00114   const MaterialLinearElasticity *m_mat;
00115 
00116 };  // class Element3DStrain
00117 
00118 }
00119 }  // end namespace itk::fem
00120 
00121 #ifndef ITK_MANUAL_INSTANTIATION
00122 #include "itkFEMElement3DStrain.hxx"
00123 #endif
00124 
00125 #endif  // #ifndef __itkFEMElement3DStrain_h
00126