19 #ifndef __itkFEMLinearSystemWrapper_h
20 #define __itkFEMLinearSystemWrapper_h
87 virtual void Clean(
void);
187 virtual void DestroyMatrix(
unsigned int matrixIndex = 0) = 0;
207 virtual void DestroyVector(
unsigned int vectorIndex = 0) = 0;
234 virtual Float GetMatrixValue(
unsigned int i,
unsigned int j,
unsigned int matrixIndex = 0)
const = 0;
243 virtual void SetMatrixValue(
unsigned int i,
unsigned int j,
Float value,
unsigned int matrixIndex = 0) = 0;
252 virtual void AddMatrixValue(
unsigned int i,
unsigned int j,
Float value,
unsigned int matrixIndex = 0) = 0;
267 unsigned int matrixIndex = 0);
282 virtual void SetVectorValue(
unsigned int i,
Float value,
unsigned int vectorIndex = 0) = 0;
290 virtual void AddVectorValue(
unsigned int i,
Float value,
unsigned int vectorIndex = 0) = 0;
317 virtual void Solve(
void) = 0;
324 virtual void SwapMatrices(
unsigned int matrixIndex1,
unsigned int matrixIndex2) = 0;
333 virtual void CopyMatrix(
unsigned int matrixIndex1,
unsigned int matrixIndex2);
340 virtual void SwapVectors(
unsigned int vectorIndex1,
unsigned int vectorIndex2) = 0;
347 virtual void SwapSolutions(
unsigned int solutionIndex1,
unsigned int solutionIndex2) = 0;
377 unsigned int rightMatrixIndex) = 0;
385 virtual void AddMatrixMatrix(
unsigned int matrixIndex1,
unsigned int matrixIndex2);
393 virtual void AddVectorVector(
unsigned int vectorIndex1,
unsigned int vectorIndex2);
401 virtual void MultiplyMatrixVector(
unsigned int resultVectorIndex,
unsigned int matrixIndex,
unsigned int vectorIndex);
409 virtual void MultiplyMatrixSolution(
unsigned int resultVectorIndex,
unsigned int matrixIndex,
unsigned int solutionIndex);
416 virtual void CopySolution2Vector(
unsigned int solutionIndex,
unsigned int vectorIndex) = 0;
423 virtual void CopyVector2Solution(
unsigned int vectorIndex,
unsigned int solutionIndex) = 0;
430 virtual void CopyVector(
unsigned int vectorSource,
unsigned int vectorDestination);
490 ColumnArray & newNumbering,
unsigned int nextRowNumber,
491 unsigned int matrixIndex = 0);
509 FEMExceptionLinearSystem(
const char *file,
unsigned int lineNumber, std::string location, std::string moreDescription);
530 std::string moreDescription,
531 unsigned int index1);
538 std::string moreDescription,
unsigned int index1,
539 unsigned int index2);
553 #endif // #ifndef __itkFEMLinearSystemWrapper_h
void FollowConnectionsCuthillMckeeOrdering(unsigned int rowNumber, ColumnArray &rowDegree, ColumnArray &newNumbering, unsigned int nextRowNumber, unsigned int matrixIndex=0)
virtual ~FEMExceptionLinearSystemBounds()
unsigned int GetNumberOfSolutions() const
void ScaleSolution(Float scale, unsigned int solutionIndex=0)
virtual void MultiplyMatrixVector(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex)
void CuthillMckeeOrdering(ColumnArray &newNumbering, int startingRow, unsigned int matrixIndex=0)
unsigned int m_NumberOfMatrices
virtual void SetMatrixValue(unsigned int i, unsigned int j, Float value, unsigned int matrixIndex=0)=0
virtual void InitializeVector(unsigned int vectorIndex=0)=0
void SetSystemOrder(unsigned int N)
void SetNumberOfMatrices(unsigned int nMatrices)
virtual void ReverseCuthillMckeeOrdering(ColumnArray &newNumbering, unsigned int matrixIndex=0)
unsigned int GetNumberOfVectors() const
virtual void AddMatrixValue(unsigned int i, unsigned int j, Float value, unsigned int matrixIndex=0)=0
virtual void SwapMatrices(unsigned int matrixIndex1, unsigned int matrixIndex2)=0
virtual Float GetVectorValue(unsigned int i, unsigned int vectorIndex=0) const =0
virtual void Solve(void)=0
virtual Float GetMatrixValue(unsigned int i, unsigned int j, unsigned int matrixIndex=0) const =0
void SetNumberOfSolutions(unsigned int nSolutions)
virtual void MultiplyMatrixMatrix(unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, unsigned int rightMatrixIndex)=0
virtual void AddMatrixMatrix(unsigned int matrixIndex1, unsigned int matrixIndex2)
virtual void AddSolutionValue(unsigned int i, Float value, unsigned int solutionIndex=0)=0
virtual void GetColumnsOfNonZeroMatrixElementsInRow(unsigned int row, ColumnArray &cols, unsigned int matrixIndex=0)
void SetNumberOfVectors(unsigned int nVectors)
std::vector< unsigned int > ColumnArray
unsigned int m_NumberOfVectors
Declaration of several exception classes that are used within the FEM code.
Defines all functions required by Solver class to allocate, assemble and solve a linear system of equ...
Provides functions to access the values of the solution vector.
virtual void CopySolution2Vector(unsigned int solutionIndex, unsigned int vectorIndex)=0
virtual void AddVectorVector(unsigned int vectorIndex1, unsigned int vectorIndex2)
virtual void AddVectorValue(unsigned int i, Float value, unsigned int vectorIndex=0)=0
virtual bool IsMatrixInitialized(unsigned int matrixIndex=0)=0
virtual void SwapSolutions(unsigned int solutionIndex1, unsigned int solutionIndex2)=0
void ScaleVector(Float scale, unsigned int vectorIndex=0)
const LinearSystemWrapper & operator=(const LinearSystemWrapper &)
virtual ~FEMExceptionLinearSystem()
virtual bool IsVectorInitialized(unsigned int vectorIndex=0)=0
virtual ~LinearSystemWrapper()
unsigned int m_NumberOfSolutions
virtual void DestroyMatrix(unsigned int matrixIndex=0)=0
virtual void CopyMatrix(unsigned int matrixIndex1, unsigned int matrixIndex2)
virtual void SetVectorValue(unsigned int i, Float value, unsigned int vectorIndex=0)=0
virtual void InitializeMatrix(unsigned int matrixIndex=0)=0
virtual void OptimizeMatrixStorage(unsigned int matrixIndex, unsigned int tempMatrixIndex)
virtual void ScaleMatrix(Float scale, unsigned int matrixIndex=0)
virtual void CopyVector(unsigned int vectorSource, unsigned int vectorDestination)
virtual void SetSolutionValue(unsigned int i, Float value, unsigned int solutionIndex=0)=0
virtual bool IsSolutionInitialized(unsigned int solutionIndex=0)=0
unsigned int GetNumberOfMatrices() const
virtual void DestroyVector(unsigned int vectorIndex=0)=0
virtual void MultiplyMatrixSolution(unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int solutionIndex)
const Self * ConstPointer
virtual void CopyVector2Solution(unsigned int vectorIndex, unsigned int solutionIndex)=0
Base class for all exception's that can occur within FEM classes.
unsigned int GetSystemOrder() const
virtual void DestroySolution(unsigned int solutionIndex=0)=0
virtual void SwapVectors(unsigned int vectorIndex1, unsigned int vectorIndex2)=0
virtual void InitializeSolution(unsigned int solutionIndex=0)=0