ITK  4.3.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
68  {
69  return this->m_TimeStep;
70  }
71 
77  virtual void SetTimeStep(Float dt)
78  {
79  this->m_TimeStep = dt;
80  }
81 
82 protected:
84  virtual ~SolverHyperbolic() { }
85  void PrintSelf(std::ostream& os, Indent indent) const;
86 
90  virtual void InitializeLinearSystemWrapper(void);
91 
97 
101  virtual void InitializeMatrixForAssembly(unsigned int N);
102 
107  virtual void FinalizeMatrixAfterAssembly( void );
108 
109 
111  void GenerateData();
112 
116  virtual void RunSolver(void);
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 &); // purposely not implemented
141  void operator=(const Self &); // purposely not implemented
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
153