![]() |
Orfeo Toolbox
3.16
|
Defines all functions required by Solver class to allocate, assemble and solve a linear system of equation. More...
#include <itkFEMLinearSystemWrapper.h>
Inheritance diagram for itk::fem::LinearSystemWrapper:
Collaboration diagram for itk::fem::LinearSystemWrapper:Public Types | |
| typedef std::vector< unsigned int > | ColumnArray |
| typedef const Self * | ConstPointer |
| typedef double | Float |
| typedef Self * | Pointer |
| typedef LinearSystemWrapper | Self |
| typedef Solution | Superclass |
Public Member Functions | |
| LinearSystemWrapper () | |
| virtual | ~LinearSystemWrapper () |
| virtual void | AddMatrixMatrix (unsigned int matrixIndex1, unsigned int matrixIndex2) |
| virtual void | AddMatrixValue (unsigned int i, unsigned int j, Float value, unsigned int matrixIndex=0)=0 |
| virtual void | AddSolutionValue (unsigned int i, Float value, unsigned int solutionIndex=0)=0 |
| virtual void | AddVectorValue (unsigned int i, Float value, unsigned int vectorIndex=0)=0 |
| virtual void | AddVectorVector (unsigned int vectorIndex1, unsigned int vectorIndex2) |
| virtual void | Clean (void) |
| virtual void | CopyMatrix (unsigned int matrixIndex1, unsigned int matrixIndex2) |
| virtual void | CopySolution2Vector (unsigned int solutionIndex, unsigned int vectorIndex)=0 |
| virtual void | CopyVector (unsigned int vectorSource, unsigned int vectorDestination) |
| virtual void | CopyVector2Solution (unsigned int vectorIndex, unsigned int solutionIndex)=0 |
| virtual void | DestroyMatrix (unsigned int matrixIndex=0)=0 |
| virtual void | DestroySolution (unsigned int solutionIndex=0)=0 |
| virtual void | DestroyVector (unsigned int vectorIndex=0)=0 |
| virtual void | GetColumnsOfNonZeroMatrixElementsInRow (unsigned int row, ColumnArray &cols, unsigned int matrixIndex=0) |
| virtual Float | GetMatrixValue (unsigned int i, unsigned int j, unsigned int matrixIndex=0) const =0 |
| unsigned int | GetNumberOfMatrices () |
| unsigned int | GetNumberOfSolutions () |
| unsigned int | GetNumberOfVectors () |
| virtual Float | GetSolutionValue (unsigned int i, unsigned int solutionIndex=0) const =0 |
| unsigned int | GetSystemOrder () const |
| virtual Float | GetVectorValue (unsigned int i, unsigned int vectorIndex=0) const =0 |
| virtual void | InitializeMatrix (unsigned int matrixIndex=0)=0 |
| virtual void | InitializeSolution (unsigned int solutionIndex=0)=0 |
| virtual void | InitializeVector (unsigned int vectorIndex=0)=0 |
| virtual bool | IsMatrixInitialized (unsigned int matrixIndex=0)=0 |
| virtual bool | IsSolutionInitialized (unsigned int solutionIndex=0)=0 |
| virtual bool | IsVectorInitialized (unsigned int vectorIndex=0)=0 |
| virtual void | MultiplyMatrixMatrix (unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, unsigned int rightMatrixIndex)=0 |
| virtual void | MultiplyMatrixVector (unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex) |
| virtual void | OptimizeMatrixStorage (unsigned int matrixIndex, unsigned int tempMatrixIndex) |
| virtual void | ReverseCuthillMckeeOrdering (ColumnArray &newNumbering, unsigned int matrixIndex=0) |
| virtual void | ScaleMatrix (Float scale, unsigned int matrixIndex=0) |
| void | ScaleSolution (Float scale, unsigned int solutionIndex=0) |
| void | ScaleVector (Float scale, unsigned int vectorIndex=0) |
| virtual void | SetMatrixValue (unsigned int i, unsigned int j, Float value, unsigned int matrixIndex=0)=0 |
| void | SetNumberOfMatrices (unsigned int nMatrices) |
| void | SetNumberOfSolutions (unsigned int nSolutions) |
| void | SetNumberOfVectors (unsigned int nVectors) |
| virtual void | SetSolutionValue (unsigned int i, Float value, unsigned int solutionIndex=0)=0 |
| void | SetSystemOrder (unsigned int N) |
| virtual void | SetVectorValue (unsigned int i, Float value, unsigned int vectorIndex=0)=0 |
| virtual void | Solve (void)=0 |
| virtual void | SwapMatrices (unsigned int matrixIndex1, unsigned int matrixIndex2)=0 |
| virtual void | SwapSolutions (unsigned int solutionIndex1, unsigned int solutionIndex2)=0 |
| virtual void | SwapVectors (unsigned int vectorIndex1, unsigned int vectorIndex2)=0 |
Protected Attributes | |
| unsigned int | m_NumberOfMatrices |
| unsigned int | m_NumberOfSolutions |
| unsigned int | m_NumberOfVectors |
| unsigned int | m_Order |
Private Member Functions | |
| LinearSystemWrapper (const LinearSystemWrapper &) | |
| void | CuthillMckeeOrdering (ColumnArray &newNumbering, int startingRow, unsigned int matrixIndex=0) |
| void | FollowConnectionsCuthillMckeeOrdering (unsigned int rowNumber, ColumnArray &rowDegree, ColumnArray &newNumbering, unsigned int nextRowNumber, unsigned int matrixIndex=0) |
| const LinearSystemWrapper & | operator= (const LinearSystemWrapper &) |
Defines all functions required by Solver class to allocate, assemble and solve a linear system of equation.
Linear system is defined as A*x=B, where A is a square matrix and F is a vector. Member functions are provided to access a specific element within A and B. Objects of derived classes should make appropriate calls to the numeric library in implementation of virtual functions to assemble and solve the linear system.
See comments for each virtual member for more information about how to derive a new LinearSystemWrapper class. An example derived class LinearSystemWrapperVNL is defined to use VNL sparse matrix representation and solver.
Definition at line 51 of file itkFEMLinearSystemWrapper.h.
| typedef std::vector<unsigned int> itk::fem::LinearSystemWrapper::ColumnArray |
Definition at line 59 of file itkFEMLinearSystemWrapper.h.
| typedef const Self* itk::fem::LinearSystemWrapper::ConstPointer |
Const pointer to an object.
Reimplemented from itk::fem::Solution.
Definition at line 57 of file itkFEMLinearSystemWrapper.h.
|
inherited |
Floating point storage type used within a class
Reimplemented in itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Definition at line 47 of file itkFEMSolution.h.
Pointer to an object.
Reimplemented from itk::fem::Solution.
Definition at line 56 of file itkFEMLinearSystemWrapper.h.
Standard "Self" typedef.
Reimplemented from itk::fem::Solution.
Reimplemented in itk::fem::LinearSystemWrapperItpack.
Definition at line 54 of file itkFEMLinearSystemWrapper.h.
Standard "Superclass" typedef.
Reimplemented from itk::fem::Solution.
Reimplemented in itk::fem::LinearSystemWrapperItpack.
Definition at line 55 of file itkFEMLinearSystemWrapper.h.
|
inline |
Constructor for linear system, should perform any initialization that is required by derived class.
Definition at line 65 of file itkFEMLinearSystemWrapper.h.
|
inlinevirtual |
Virtual destructor should properly destroy the object and clean up any memory allocated for matrix and vector storage.
Definition at line 73 of file itkFEMLinearSystemWrapper.h.
|
private |
Copy constructor is not allowed.
|
virtual |
Adds two matrices storing the result in the first matrix.
| matrixIndex1 | index of a matrix to add the other matrix to |
| matrixIndex2 | index of matrix to add |
Definition at line 214 of file itkFEMLinearSystemWrapper.cxx.
|
pure virtual |
Virtual function to add a value to a specific element of the A matrix.
| i | row of the element |
| j | column of the element |
| value | value to add to the existing element |
| matrixIndex | index of matrix to add value to |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Definition at line 123 of file itkFEMLinearSystemWrapper.cxx.
References GetMatrixValue(), and SetMatrixValue().
Referenced by itk::fem::Solver::AssembleElementMatrix(), itk::fem::SolverCrankNicolson::AssembleKandM(), and itk::fem::Solver::AssembleLandmarkContribution().
|
pure virtual |
Virtual function to add a value of specific element of the solution vector.
| i | element Index in solution vector |
| value | new value of the element |
| solutionIndex | index of solution vector to add value to |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Definition at line 128 of file itkFEMLinearSystemWrapper.cxx.
References itk::fem::Solution::GetSolutionValue(), and SetSolutionValue().
Referenced by itk::fem::SolverCrankNicolson::AddToDisplacements().
|
pure virtual |
Virtual function to add a value to a specific element of the B vector.
| i | row of the element |
| value | value to add to the existing element |
| vectorIndex | index of vector to add value to |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Definition at line 118 of file itkFEMLinearSystemWrapper.cxx.
References GetVectorValue(), and SetVectorValue().
Referenced by itk::fem::SolverCrankNicolson::AddToDisplacements(), itk::fem::Solver::ApplyBC(), itk::fem::Solver::AssembleF(), and MultiplyMatrixVector().
|
virtual |
Adds two vectors storing the result in the first vector.
| vectorIndex1 | index of a vector to add the other vector to |
| vectorIndex2 | index of vector to add |
Definition at line 242 of file itkFEMLinearSystemWrapper.cxx.
|
virtual |
Clear all the data (matrices) inside the system, so that the system is ready to solve another problem from scratch.
Definition at line 31 of file itkFEMLinearSystemWrapper.cxx.
References DestroyMatrix(), DestroySolution(), DestroyVector(), m_NumberOfMatrices, m_NumberOfSolutions, m_NumberOfVectors, and SetSystemOrder().
|
virtual |
Copies the content of source matrix to destination matrix. Any existing data in destination matrix is overwritten.
| matrixIndex1 | index of a matrix that will be copied |
| matrixIndex2 | index of matrix to copy to |
Definition at line 195 of file itkFEMLinearSystemWrapper.cxx.
|
pure virtual |
Copy a solution vector to a vector
| solutionIndex | index of solution vector to copy |
| vectorIndex | index of vector to copy solution to |
|
virtual |
Copy a vector
| vectorSource | index of a vector to copy |
| vectorDestination | index to copy the vector to |
Definition at line 231 of file itkFEMLinearSystemWrapper.cxx.
|
pure virtual |
Copy a vector to a solution vector
| vectorIndex | index of a vector to copy |
| solutionIndex | index of a solution to copy the solution to |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperDenseVNL, and itk::fem::LinearSystemWrapperVNL.
|
private |
matrix reordering utility
Definition at line 261 of file itkFEMLinearSystemWrapper.cxx.
References FollowConnectionsCuthillMckeeOrdering(), GetColumnsOfNonZeroMatrixElementsInRow(), and m_Order.
Referenced by ReverseCuthillMckeeOrdering().
|
pure virtual |
Free the memory from a matrix
| matrixIndex | index of matrix to destroy |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by Clean(), and OptimizeMatrixStorage().
|
pure virtual |
Free teh mememory from a solution vector
| solutionIndex | index of solution vector to destroy |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by Clean().
|
pure virtual |
Free the memory from a vector
| vectorIndex | index of vector to destroy |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::Solver::ApplyBC(), and Clean().
|
private |
Definition at line 312 of file itkFEMLinearSystemWrapper.cxx.
References GetColumnsOfNonZeroMatrixElementsInRow(), and m_Order.
Referenced by CuthillMckeeOrdering().
|
virtual |
Returns the column index (zero based) of the i-th non zero (non allocated)element in a given row of A matrix. This function is usefull for optimizations when sparse matrices are used. Note that the value of an element with returned column index may actually be equal zero.
| row | Row number |
| cols | Which element in that row. Can range from 0 to number of elements allocated in a row. If this is out of range, the function returns -1. |
| matrixIndex | Index of matrix (defaults to 0) |
Reimplemented in itk::fem::LinearSystemWrapperItpack.
Definition at line 155 of file itkFEMLinearSystemWrapper.cxx.
References m_Order.
Referenced by itk::fem::Solver::ApplyBC(), CuthillMckeeOrdering(), FollowConnectionsCuthillMckeeOrdering(), and OptimizeMatrixStorage().
|
pure virtual |
Virtual function to get a value of a specific element of a matrix.
| i | row of the element |
| j | column of the element |
| matrixIndex | index of matrix to get value from |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by AddMatrixValue(), itk::fem::Solver::ApplyBC(), itk::fem::SolverCrankNicolson::EvaluateResidual(), itk::fem::SolverCrankNicolson::GetDeformationEnergy(), MultiplyMatrixVector(), OptimizeMatrixStorage(), and ScaleMatrix().
|
inline |
Set the maximum number of entries permitted in a matrix
| matrixIndex | index of matrix to set value for |
| maxNonZeros | maximum number of entries allowed in matrix |
Definition at line 111 of file itkFEMLinearSystemWrapper.h.
References m_NumberOfMatrices.
|
inline |
Get Index of solutions used by system
Definition at line 133 of file itkFEMLinearSystemWrapper.h.
References m_NumberOfSolutions.
|
inline |
Get Index of vectors used by system
Definition at line 122 of file itkFEMLinearSystemWrapper.h.
References m_NumberOfVectors.
|
pure virtualinherited |
Returns value of i-th element in a solution vector. This value is calculated generalized displacement of the i-th degree of freedom in a FEM problem. Note that in general there may be several solution vectors. You can select which one do you want by passing the second parameter.
| i | element index in solution vector |
| solutionIndex | index of solution vector to get value from |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by AddSolutionValue(), itk::fem::SolverCrankNicolson::AddToDisplacements(), itk::fem::SolverCrankNicolson::AverageLastTwoDisplacements(), itk::fem::SolverCrankNicolson::EvaluateResidual(), itk::fem::SolverCrankNicolson::GetDeformationEnergy(), itk::fem::Solver::GetDeformationEnergy(), itk::fem::LoadLandmark::GetSolution(), itk::fem::ImageMetricLoad< TMoving, TFixed >::GetSolution(), itk::fem::FiniteDifferenceFunctionLoad< TMoving, TFixed >::GetSolution(), itk::fem::Solver::GetSolution(), itk::fem::ImageMetricLoadImplementation< TLoadClass >::Implementation(), itk::fem::Element::InterpolateSolution(), itk::fem::Element::InterpolateSolutionN(), itk::fem::FEMRegistrationFilter< TMovingImage, TFixedImage >::InterpolateVectorField(), itk::fem::SolverCrankNicolson::PrintDisplacements(), itk::fem::SolverCrankNicolson::PrintMinMaxOfSolution(), ScaleSolution(), and itk::fem::SolverCrankNicolson::SetEnergyToMin().
|
inline |
Get the order of the system
Definition at line 91 of file itkFEMLinearSystemWrapper.h.
References m_Order.
Referenced by itk::fem::LinearSystemWrapperDenseVNL::InitializeMatrix(), itk::fem::LinearSystemWrapperVNL::InitializeMatrix(), itk::fem::LinearSystemWrapperDenseVNL::InitializeSolution(), itk::fem::LinearSystemWrapperVNL::InitializeSolution(), itk::fem::LinearSystemWrapperDenseVNL::InitializeVector(), itk::fem::LinearSystemWrapperVNL::InitializeVector(), itk::fem::LinearSystemWrapperVNL::MultiplyMatrixMatrix(), itk::fem::LinearSystemWrapperVNL::MultiplyMatrixVector(), and itk::fem::LinearSystemWrapperVNL::Solve().
|
pure virtual |
Virtual function to get a value of a specific element of the B vector.
| i | row of the element |
| vectorIndex | index of vector to get value from |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::SolverCrankNicolson::AddToDisplacements(), AddVectorValue(), itk::fem::Solver::AssembleF(), itk::fem::SolverCrankNicolson::EvaluateResidual(), MultiplyMatrixVector(), itk::fem::SolverCrankNicolson::PrintForce(), itk::fem::SolverCrankNicolson::RecomputeForceVector(), ScaleVector(), and itk::fem::SolverCrankNicolson::SetEnergyToMin().
|
pure virtual |
Initialization of the A matrix. First any existing data for matrix A must be be destroyed, and then a new matrix is created in the memory. All elements in A must be set to zero.
| matrixIndex | index of matrix to initialize |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::SolverCrankNicolson::InitializeForSolution(), itk::fem::Solver::InitializeMatrixForAssembly(), and OptimizeMatrixStorage().
|
pure virtual |
Initialization of a solution vector. Existing memory must be destroyed and the new solution vector is created in memory. All values should be set to zero.
| solutionIndex | index of solution vector to initialize |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::SolverCrankNicolson::InitializeForSolution(), itk::fem::SolverCrankNicolson::Solve(), and itk::fem::Solver::Solve().
|
pure virtual |
Initialization of the a vector. First any existing data for vector B must be destroyed, then new vector is created in the memory. All elements in B must be set to zero.
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::Solver::ApplyBC(), itk::fem::Solver::AssembleF(), itk::fem::SolverCrankNicolson::InitializeForSolution(), and MultiplyMatrixVector().
|
pure virtual |
Check to see if matrix is initialized
| matrixIndex | index of matrix to examine |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::Solver::Solve().
|
pure virtual |
Check to see if solution vector is initialized
| solutionIndex | index of solution vector to examine |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
|
pure virtual |
Check to see if vector is initialized
| vectorIndex | vector of index to examine |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::Solver::ApplyBC(), itk::fem::Solver::AssembleF(), and itk::fem::Solver::Solve().
|
pure virtual |
Perform a matrix*matrix operation and store the result in the linear system
| leftMatrixIndex | index of left matrix |
| rightMatrixIndex | index of right matrix |
| resultMatrixIndex | index of matrix where solution is stored |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperDenseVNL, and itk::fem::LinearSystemWrapperVNL.
|
virtual |
Perform a matrix*vector operation and store the result in the linear system
| matrixIndex | index of matrix to multiply |
| vectorIndex | index of vector to multiply |
| resultVectorIndex | index of vector where result is store |
Reimplemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperDenseVNL, and itk::fem::LinearSystemWrapperVNL.
Definition at line 134 of file itkFEMLinearSystemWrapper.cxx.
References AddVectorValue(), GetMatrixValue(), GetVectorValue(), InitializeVector(), and m_Order.
Referenced by itk::fem::SolverCrankNicolson::AssembleFforTimeStep().
|
private |
Asignment operator is not allowed.
|
virtual |
Remove all zeros from a matrix
| matrixIndex | index of matrix to remove zeros from |
| tempMatrixIndex | index of matrix to use for temp storage space |
Definition at line 166 of file itkFEMLinearSystemWrapper.cxx.
References DestroyMatrix(), GetColumnsOfNonZeroMatrixElementsInRow(), GetMatrixValue(), InitializeMatrix(), m_Order, SetMatrixValue(), and SwapMatrices().
|
virtual |
Reorder the Degrees of Freedom in order to reduce bandwidth of matrix
| matrixIndex | index of matrix to examine |
| newNumbering | vector of new degree of freedom ordering |
Definition at line 252 of file itkFEMLinearSystemWrapper.cxx.
References CuthillMckeeOrdering().
|
virtual |
Multiplies all elements of a matrix by a scalar
| scale | scalar to multiply all matrix values by |
| matrixIndex | index of matrix to modify |
Reimplemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Definition at line 56 of file itkFEMLinearSystemWrapper.cxx.
References GetMatrixValue(), m_Order, and SetMatrixValue().
| void itk::fem::LinearSystemWrapper::ScaleSolution | ( | Float | scale, |
| unsigned int | solutionIndex = 0 |
||
| ) |
Multiplies all elements of a solution by a scalar
| scale | scalar to multiply all solution values by |
| solutionIndex | index of solution to modify |
Reimplemented in itk::fem::LinearSystemWrapperDenseVNL.
Definition at line 98 of file itkFEMLinearSystemWrapper.cxx.
References itk::fem::Solution::GetSolutionValue(), m_Order, and SetSolutionValue().
| void itk::fem::LinearSystemWrapper::ScaleVector | ( | Float | scale, |
| unsigned int | vectorIndex = 0 |
||
| ) |
Multiplies all elements of a vector by a scalar
| scale | scalar to multiply all vector values by |
| vectorIndex | index of vector to modify |
Reimplemented in itk::fem::LinearSystemWrapperDenseVNL.
Definition at line 79 of file itkFEMLinearSystemWrapper.cxx.
References GetVectorValue(), m_Order, and SetVectorValue().
|
pure virtual |
Virtual function to set a value of a specific element of the A matrix.
| i | row of the element |
| j | column of the element |
| value | new value of the element |
| matrixIndex | index of matrix to set value in |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by AddMatrixValue(), itk::fem::Solver::ApplyBC(), OptimizeMatrixStorage(), and ScaleMatrix().
|
inline |
Set Index of matrices used by the system
| nMatrices | Index of matrices used by system |
Definition at line 97 of file itkFEMLinearSystemWrapper.h.
References m_NumberOfMatrices.
Referenced by itk::fem::SolverCrankNicolson::InitializeForSolution(), and itk::fem::Solver::InitializeLinearSystemWrapper().
|
inline |
Set Index of solutions used by the system
| nSolutions | Index of solutions used by system |
Definition at line 128 of file itkFEMLinearSystemWrapper.h.
References m_NumberOfSolutions.
Referenced by itk::fem::SolverCrankNicolson::InitializeForSolution(), and itk::fem::Solver::InitializeLinearSystemWrapper().
|
inline |
Set Index of vectors used by the system
| nVectors | Index of vectors used by system |
Definition at line 117 of file itkFEMLinearSystemWrapper.h.
References m_NumberOfVectors.
Referenced by itk::fem::SolverCrankNicolson::InitializeForSolution(), and itk::fem::Solver::InitializeLinearSystemWrapper().
|
pure virtual |
Virtual function to set a value of specific element of the solution vector.
| i | element Index in solution vector |
| value | new value of the element |
| solutionIndex | index of solution vector to set value in |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by AddSolutionValue(), itk::fem::SolverCrankNicolson::AddToDisplacements(), itk::fem::SolverCrankNicolson::AssembleFforTimeStep(), itk::fem::SolverCrankNicolson::AverageLastTwoDisplacements(), ScaleSolution(), and itk::fem::SolverCrankNicolson::SetEnergyToMin().
|
inline |
Set the order of the system. All matrices will be of size NxN and all vectors will be of size N
| N | order of the linear system |
Definition at line 86 of file itkFEMLinearSystemWrapper.h.
References m_Order.
Referenced by Clean(), itk::fem::SolverCrankNicolson::InitializeForSolution(), and itk::fem::Solver::InitializeMatrixForAssembly().
|
pure virtual |
Virtual function to set a value of a specific element of the B vector.
| i | row of the element |
| value | new value of the element |
| vectorIndex | index of vector to set value in |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::SolverCrankNicolson::AddToDisplacements(), AddVectorValue(), itk::fem::Solver::AssembleF(), itk::fem::SolverCrankNicolson::AssembleFforTimeStep(), itk::fem::SolverCrankNicolson::AverageLastTwoDisplacements(), itk::fem::SolverCrankNicolson::RecomputeForceVector(), ScaleVector(), itk::fem::SolverCrankNicolson::SetEnergyToMin(), and itk::fem::SolverCrankNicolson::ZeroVector().
|
pure virtual |
Solves the linear system and creates the solution vector, which can later be accessed via GetSolutionValue(i,SolutionIndex) member function. Here all the major processing is done with calls to external numeric library.
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperVNL, and itk::fem::LinearSystemWrapperDenseVNL.
Referenced by itk::fem::SolverCrankNicolson::Solve(), and itk::fem::Solver::Solve().
|
pure virtual |
Swaps access indices of any 2 matrices in the linear system
| matrixIndex1 | index of a matrix to swap |
| matrixIndex2 | index of matrix to swap with |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperDenseVNL, and itk::fem::LinearSystemWrapperVNL.
Referenced by OptimizeMatrixStorage().
|
pure virtual |
Swaps access indices of any 2 solution vectors in the linear system
| solutionIndex1 | index of a solution vector to swap |
| solutionIndex2 | index of solution vector to swap with |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperDenseVNL, and itk::fem::LinearSystemWrapperVNL.
|
pure virtual |
Swaps access indices of any 2 vectors in the linear system
| vectorIndex1 | index of a vector to swap |
| vectorIndex2 | index of vector to swap with |
Implemented in itk::fem::LinearSystemWrapperItpack, itk::fem::LinearSystemWrapperDenseVNL, and itk::fem::LinearSystemWrapperVNL.
|
protected |
Number of matrices used by system
Definition at line 416 of file itkFEMLinearSystemWrapper.h.
Referenced by itk::fem::LinearSystemWrapperItpack::AddMatrixValue(), Clean(), itk::fem::LinearSystemWrapperItpack::DestroyMatrix(), itk::fem::LinearSystemWrapperItpack::GetColumnsOfNonZeroMatrixElementsInRow(), itk::fem::LinearSystemWrapperItpack::GetMatrixValue(), GetNumberOfMatrices(), itk::fem::LinearSystemWrapperDenseVNL::InitializeMatrix(), itk::fem::LinearSystemWrapperVNL::InitializeMatrix(), itk::fem::LinearSystemWrapperItpack::InitializeMatrix(), itk::fem::LinearSystemWrapperItpack::MultiplyMatrixMatrix(), itk::fem::LinearSystemWrapperItpack::MultiplyMatrixVector(), itk::fem::LinearSystemWrapperItpack::ScaleMatrix(), itk::fem::LinearSystemWrapperItpack::SetMatrixValue(), SetNumberOfMatrices(), itk::fem::LinearSystemWrapperItpack::SwapMatrices(), itk::fem::LinearSystemWrapperDenseVNL::~LinearSystemWrapperDenseVNL(), and itk::fem::LinearSystemWrapperVNL::~LinearSystemWrapperVNL().
|
protected |
Number of solutions used by system
Definition at line 426 of file itkFEMLinearSystemWrapper.h.
Referenced by itk::fem::LinearSystemWrapperItpack::AddSolutionValue(), Clean(), itk::fem::LinearSystemWrapperItpack::CopySolution2Vector(), itk::fem::LinearSystemWrapperItpack::CopyVector2Solution(), itk::fem::LinearSystemWrapperItpack::DestroySolution(), GetNumberOfSolutions(), itk::fem::LinearSystemWrapperItpack::GetSolutionValue(), itk::fem::LinearSystemWrapperDenseVNL::InitializeSolution(), itk::fem::LinearSystemWrapperVNL::InitializeSolution(), itk::fem::LinearSystemWrapperItpack::InitializeSolution(), SetNumberOfSolutions(), itk::fem::LinearSystemWrapperItpack::SetSolutionValue(), itk::fem::LinearSystemWrapperItpack::SwapSolutions(), itk::fem::LinearSystemWrapperDenseVNL::~LinearSystemWrapperDenseVNL(), itk::fem::LinearSystemWrapperItpack::~LinearSystemWrapperItpack(), and itk::fem::LinearSystemWrapperVNL::~LinearSystemWrapperVNL().
|
protected |
Number of vectors used by system
Definition at line 421 of file itkFEMLinearSystemWrapper.h.
Referenced by itk::fem::LinearSystemWrapperItpack::AddVectorValue(), Clean(), itk::fem::LinearSystemWrapperItpack::CopySolution2Vector(), itk::fem::LinearSystemWrapperItpack::CopyVector2Solution(), itk::fem::LinearSystemWrapperItpack::DestroyVector(), GetNumberOfVectors(), itk::fem::LinearSystemWrapperItpack::GetVectorValue(), itk::fem::LinearSystemWrapperDenseVNL::InitializeVector(), itk::fem::LinearSystemWrapperVNL::InitializeVector(), itk::fem::LinearSystemWrapperItpack::InitializeVector(), itk::fem::LinearSystemWrapperItpack::MultiplyMatrixVector(), SetNumberOfVectors(), itk::fem::LinearSystemWrapperItpack::SetVectorValue(), itk::fem::LinearSystemWrapperItpack::SwapVectors(), itk::fem::LinearSystemWrapperDenseVNL::~LinearSystemWrapperDenseVNL(), itk::fem::LinearSystemWrapperItpack::~LinearSystemWrapperItpack(), and itk::fem::LinearSystemWrapperVNL::~LinearSystemWrapperVNL().
|
protected |
Order of linear system
Definition at line 411 of file itkFEMLinearSystemWrapper.h.
Referenced by itk::fem::LinearSystemWrapperItpack::AddMatrixValue(), itk::fem::LinearSystemWrapperItpack::AddSolutionValue(), itk::fem::LinearSystemWrapperItpack::AddVectorValue(), itk::fem::LinearSystemWrapperItpack::CopySolution2Vector(), itk::fem::LinearSystemWrapperItpack::CopyVector2Solution(), CuthillMckeeOrdering(), FollowConnectionsCuthillMckeeOrdering(), GetColumnsOfNonZeroMatrixElementsInRow(), itk::fem::LinearSystemWrapperItpack::GetColumnsOfNonZeroMatrixElementsInRow(), itk::fem::LinearSystemWrapperItpack::GetMatrixValue(), itk::fem::LinearSystemWrapperItpack::GetSolutionValue(), GetSystemOrder(), itk::fem::LinearSystemWrapperItpack::GetVectorValue(), itk::fem::LinearSystemWrapperItpack::InitializeMatrix(), itk::fem::LinearSystemWrapperItpack::InitializeSolution(), itk::fem::LinearSystemWrapperItpack::InitializeVector(), MultiplyMatrixVector(), OptimizeMatrixStorage(), ScaleMatrix(), itk::fem::LinearSystemWrapperItpack::ScaleMatrix(), ScaleSolution(), ScaleVector(), itk::fem::LinearSystemWrapperItpack::SetMatrixValue(), itk::fem::LinearSystemWrapperItpack::SetSolutionValue(), SetSystemOrder(), itk::fem::LinearSystemWrapperItpack::SetVectorValue(), and itk::fem::LinearSystemWrapperItpack::Solve().