ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkFEMSolverHyperbolic.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkFEMSolverHyperbolic.h,v $
5  Language: C++
6  Date: $Date: 2009-01-30 21:53:03 $
7  Version: $Revision: 1.4 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef itkFEMSolverHyperbolic_h
19 #define itkFEMSolverHyperbolic_h
20 
21 #include "itkFEMSolver.h"
22 
23 namespace itk {
24 namespace fem {
25 
34 template <unsigned int TDimension = 3>
35 class SolverHyperbolic : public Solver<TDimension>
36 {
37 public:
42 
44  itkNewMacro(Self);
45 
48 
49  typedef Element::Float Float;
50 
52  itkSetMacro(Gamma, Float);
53  itkGetMacro(Gamma, Float);
55 
57  itkSetMacro(Beta, Float);
58  itkGetMacro(Beta, Float);
60 
62  itkSetMacro(NumberOfIterations, unsigned int);
63  itkGetMacro(NumberOfIterations, unsigned int);
65 
67  virtual Float GetTimeStep(void) const ITK_OVERRIDE
68  {
69  return this->m_TimeStep;
70  }
71 
77  virtual void SetTimeStep(Float dt) ITK_OVERRIDE
78  {
79  this->m_TimeStep = dt;
80  }
81 
82 protected:
84  virtual ~SolverHyperbolic() { }
85  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
86 
90  virtual void InitializeLinearSystemWrapper(void) ITK_OVERRIDE;
91 
96  virtual void AssembleElementMatrix(Element::Pointer e) ITK_OVERRIDE;
97 
101  virtual void InitializeMatrixForAssembly(unsigned int N) ITK_OVERRIDE;
102 
107  virtual void FinalizeMatrixAfterAssembly( void ) ITK_OVERRIDE;
108 
109 
111  void GenerateData() ITK_OVERRIDE;
112 
116  virtual void RunSolver(void) ITK_OVERRIDE;
117 
121  void Solve();
122 
126  enum { matrix_K=1, matrix_M=2, matrix_C=3, matrix_tmp=4 };
127 
133 
137  unsigned int m_NumberOfIterations;
138 
139 private:
140  SolverHyperbolic(const Self &) ITK_DELETE_FUNCTION;
141  void operator=(const Self &) ITK_DELETE_FUNCTION;
142 };
143 
144 } // end namespace fem
145 } // end namespace itk
146 
147 #ifndef ITK_MANUAL_INSTANTIATION
148 #include "itkFEMSolverHyperbolic.hxx"
149 #endif
150 
151 
152 #endif // #ifndef itkFEMSolverHyperbolic_h
Light weight base class for most itk classes.
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void InitializeLinearSystemWrapper(void) override
static const double e
The base of the natural logarithm or Euler&#39;s number
Definition: itkMath.h:47
virtual void FinalizeMatrixAfterAssembly(void) override
void GenerateData() override
SmartPointer< const Self > ConstPointer
FEM solver used to generate a solution for a FE formulation.
Definition: itkFEMSolver.h:69
Abstract base element class.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual Float GetTimeStep(void) const override
Solver class suitable for hyperbolic problems.M*ddu + C*du + K*u=F.
virtual void SetTimeStep(Float dt) override
virtual void InitializeMatrixForAssembly(unsigned int N) override
virtual void AssembleElementMatrix(Element::Pointer e) override
virtual void RunSolver(void) override