VMTK
vtkvmtkOpenNLLinearSystemSolver.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: VMTK
4  Module: $RCSfile: vtkvmtkOpenNLLinearSystemSolver.h,v $
5  Language: C++
6 
7  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
8  See LICENSE file for details.
9 
10  Portions of this code are covered under the VTK copyright.
11  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
12  for details.
13 
14  This software is distributed WITHOUT ANY WARRANTY; without even
15  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  PURPOSE. See the above copyright notices for more information.
17 
18 =========================================================================*/
31 #ifndef __vtkvmtkOpenNLLinearSystemSolver_h
32 #define __vtkvmtkOpenNLLinearSystemSolver_h
33 
34 #include "vtkObject.h"
36 #include "vtkvmtkWin32Header.h"
37 
38 class VTK_VMTK_DIFFERENTIAL_GEOMETRY_EXPORT vtkvmtkOpenNLLinearSystemSolver : public vtkvmtkLinearSystemSolver
39 {
40 public:
43 
44  int Solve() override;
45 
46  vtkSetMacro(SolverType,int);
47  vtkGetMacro(SolverType,int);
49  { this->SetSolverType(VTK_VMTK_OPENNL_SOLVER_CG); }
51  { this->SetSolverType(VTK_VMTK_OPENNL_SOLVER_GMRES); }
53  { this->SetSolverType(VTK_VMTK_OPENNL_SOLVER_BICGSTAB); }
54 
55  vtkSetMacro(PreconditionerType,int);
56  vtkGetMacro(PreconditionerType,int);
58  { this->SetPreconditionerType(VTK_VMTK_OPENNL_PRECONDITIONER_NONE); }
60  { this->SetPreconditionerType(VTK_VMTK_OPENNL_PRECONDITIONER_JACOBI); }
62  { this->SetPreconditionerType(VTK_VMTK_OPENNL_PRECONDITIONER_SSOR); }
63 
64  vtkSetMacro(Omega,double);
65  vtkGetMacro(Omega,double);
66 
67  //BTX
68  enum
69  {
72  VTK_VMTK_OPENNL_SOLVER_BICGSTAB
73  };
74  //ETX
75 
76  //BTX
77  enum
78  {
81  VTK_VMTK_OPENNL_PRECONDITIONER_SSOR
82  };
83  //ETX
84 
85 protected:
88 
89  int SolverType;
91  double Omega;
92 
93 private:
95  void operator=(const vtkvmtkOpenNLLinearSystemSolver&); // Not implemented.
96 };
97 
98 #endif
99 
static vtkvmtkLinearSystemSolver * New()
Solve a linear system of equations using open NL.
Base class for linear system of equation solver implementations.