ITK  4.9.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 #include "ITKFEMExport.h"
26 
27 namespace itk
28 {
29 namespace fem
30 {
39 class ITKFEM_EXPORT Element2DC1Beam : public ElementStd<2, 2>
40 {
41 public:
42 
49 
51  itkSimpleNewMacro(Self);
52 
55 
58  virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE;
59 
60 
65 
70 
71  // ////////////////////////////////////////////////////////////////////////
72  /*
73  * Methods related to the physics of the problem.
74  */
75 
77  virtual void GetStiffnessMatrix(MatrixType & Ke) const ITK_OVERRIDE;
78 
80  virtual void GetMassMatrix(MatrixType & Me) const ITK_OVERRIDE;
81 
83  virtual void GetStrainDisplacementMatrix(MatrixType &, const MatrixType &) const ITK_OVERRIDE
84  {
85  }
86 
88  virtual void GetMaterialMatrix(MatrixType &) const ITK_OVERRIDE
89  {
90  }
91 
92  // ////////////////////////////////////////////////////////////////////////
97  enum { DefaultIntegrationOrder = 1 };
98 
100  virtual void GetIntegrationPointAndWeight(unsigned int i, VectorType & pt, Float & w, unsigned int order = 0) const ITK_OVERRIDE;
101 
102  virtual unsigned int GetNumberOfIntegrationPoints(unsigned int order) const ITK_OVERRIDE;
103 
104  // ////////////////////////////////////////////////////////////////////////
110  virtual VectorType ShapeFunctions(const VectorType & pt) const ITK_OVERRIDE;
111 
113  virtual void ShapeFunctionDerivatives(const VectorType & pt, MatrixType & shapeD) const ITK_OVERRIDE;
114 
116  virtual bool GetLocalFromGlobalCoordinates(const VectorType &, VectorType &) const ITK_OVERRIDE
117  {
118  return false;
119  }
120 
122  virtual Float JacobianDeterminant(const VectorType & pt, const MatrixType *pJ) const ITK_OVERRIDE;
123 
125  virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const ITK_OVERRIDE
126  {
127  return 3;
128  }
129 
133  virtual Material::ConstPointer GetMaterial(void) const ITK_OVERRIDE
134  {
135  return dynamic_cast<const Material *>(m_mat);
136  }
137 
138  virtual void SetMaterial(Material::ConstPointer mat_) ITK_OVERRIDE
139  {
140  m_mat =
141  dynamic_cast<const MaterialLinearElasticity *>( mat_.GetPointer() );
142  }
143 
145  virtual void PopulateEdgeIds(void) ITK_OVERRIDE { /* empty */ }
146 
147 protected:
148  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
149 
150 private:
151 
156 
157 };
158 
159 }
160 } // end namespace itk::fem
161 
162 #endif // #ifndef itkFEMElement2DC1Beam_h
Light weight base class for most itk classes.
SmartPointer< Self > Pointer
virtual Material::ConstPointer GetMaterial(void) const override
SmartPointer< const Self > ConstPointer
ElementStd< 2, 2 > TemplatedParentClass
Implements standard node management in the element classes.
vnl_matrix< Float > MatrixType
Linear elasticity material class.
Base class for storing all the implicit material and other properties required to fully define the el...
virtual void PopulateEdgeIds(void) override
1D Beam (spring that also bends) finite element in 2D space.
const MaterialLinearElasticity * m_mat
vnl_vector< Float > VectorType
virtual void SetMaterial(Material::ConstPointer mat_) override
virtual unsigned int GetNumberOfDegreesOfFreedomPerNode(void) const override
virtual void GetMaterialMatrix(MatrixType &) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TemplatedParentClass Superclass