ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkFEMElement2DC1Beam.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 __itkFEMElement2DC1Beam_h
20 #define __itkFEMElement2DC1Beam_h
21 
22 #include "itkFEMElementStd.h"
23 #include "itkFEMLoadElementBase.h"
25 
26 namespace itk
27 {
28 namespace fem
29 {
38 class Element2DC1Beam : public ElementStd<2, 2>
39 {
40 public:
41 
48 
50  itkSimpleNewMacro(Self);
51 
54 
57  virtual::itk::LightObject::Pointer CreateAnother(void) const;
58 
59 
64 
69 
70  // ////////////////////////////////////////////////////////////////////////
71  /*
72  * Methods related to the physics of the problem.
73  */
74 
76  virtual void GetStiffnessMatrix(MatrixType & Ke) const;
77 
79  virtual void GetMassMatrix(MatrixType & Me) const;
80 
82  virtual void GetStrainDisplacementMatrix(MatrixType &, const MatrixType &) const
83  {
84  }
85 
87  virtual void GetMaterialMatrix(MatrixType &) const
88  {
89  }
90 
91  // ////////////////////////////////////////////////////////////////////////
97 
99  virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order = 0) const;
100 
101  virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const;
102 
103  // ////////////////////////////////////////////////////////////////////////
109  virtual VectorType ShapeFunctions(const VectorType & pt) const;
110 
112  virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const;
113 
115  virtual bool GetLocalFromGlobalCoordinates(const VectorType &, VectorType &) const
116  {
117  return false;
118  }
119 
121  virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const;
122 
124  virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const
125  {
126  return 3;
127  }
128 
133  {
134  return dynamic_cast<const Material *>(m_mat);
135  }
136 
138  {
139  m_mat =
140  dynamic_cast<const MaterialLinearElasticity *>( mat_.GetPointer() );
141  }
142 
144  virtual void PopulateEdgeIds(void) { /* empty */ }
145 protected:
146  virtual void PrintSelf(std::ostream& os, Indent indent) const;
147 
148 private:
149 
154 
155 };
156 
157 }
158 } // end namespace itk::fem
159 
160 #endif // #ifndef __itkFEMElement2DC1Beam_h
161