Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::fem::LinearSystemWrapperDenseVNL Class Reference

LinearSystemWrapper class that uses VNL numeric library functions to define a sparse linear system of equations. More...

#include <itkFEMLinearSystemWrapperDenseVNL.h>

Inheritance diagram for itk::fem::LinearSystemWrapperDenseVNL:

Inheritance graph
[legend]
Collaboration diagram for itk::fem::LinearSystemWrapperDenseVNL:

Collaboration graph
[legend]
List of all members.

Public Types

typedef LinearSystemWrapper::Float Float
typedef LinearSystemWrapper SuperClass
typedef vnl_matrix< FloatMatrixRepresentation
typedef std::vector< MatrixRepresentation * > MatrixHolder

Public Member Functions

 LinearSystemWrapperDenseVNL ()
virtual ~LinearSystemWrapperDenseVNL ()
virtual void InitializeMatrix (unsigned int matrixIndex)
virtual bool IsMatrixInitialized (unsigned int matrixIndex)
virtual void DestroyMatrix (unsigned int matrixIndex)
virtual void InitializeVector (unsigned int vectorIndex)
virtual bool IsVectorInitialized (unsigned int vectorIndex)
virtual void DestroyVector (unsigned int vectorIndex)
virtual void InitializeSolution (unsigned int solutionIndex)
virtual bool IsSolutionInitialized (unsigned int solutionIndex)
virtual void DestroySolution (unsigned int solutionIndex)
virtual void SetMaximumNonZeroValuesInMatrix (unsigned int, unsigned int)
virtual Float GetMatrixValue (unsigned int i, unsigned int j, unsigned int matrixIndex) const
virtual void SetMatrixValue (unsigned int i, unsigned int j, Float value, unsigned int matrixIndex)
virtual void AddMatrixValue (unsigned int i, unsigned int j, Float value, unsigned int matrixIndex)
virtual Float GetVectorValue (unsigned int i, unsigned int vectorIndex) const
virtual void SetVectorValue (unsigned int i, Float value, unsigned int vectorIndex)
virtual void AddVectorValue (unsigned int i, Float value, unsigned int vectorIndex)
virtual Float GetSolutionValue (unsigned int i, unsigned int solutionIndex) const
virtual void SetSolutionValue (unsigned int i, Float value, unsigned int solutionIndex)
virtual void AddSolutionValue (unsigned int i, Float value, unsigned int solutionIndex)
virtual void Solve (void)
virtual void ScaleMatrix (Float scale, unsigned int matrixIndex)
virtual void ScaleVector (Float scale, unsigned int vectorIndex)
virtual void ScaleSolution (Float scale, unsigned int solutionIndex)
virtual void SwapMatrices (unsigned int matrixIndex1, unsigned int matrixIndex2)
virtual void SwapVectors (unsigned int vectorIndex1, unsigned int vectorIndex2)
virtual void SwapSolutions (unsigned int solutionIndex1, unsigned int solutionIndex2)
virtual void CopySolution2Vector (unsigned solutionIndex, unsigned int vectorIndex)
virtual void CopyVector2Solution (unsigned int vectorIndex, unsigned int solutionIndex)
virtual void MultiplyMatrixMatrix (unsigned int resultMatrixIndex, unsigned int leftMatrixIndex, unsigned int rightMatrixIndex)
virtual void MultiplyMatrixVector (unsigned int resultVectorIndex, unsigned int matrixIndex, unsigned int vectorIndex)

Detailed Description

LinearSystemWrapper class that uses VNL numeric library functions to define a sparse linear system of equations.

See also:
LinearSystemWrapper

Definition at line 38 of file itkFEMLinearSystemWrapperDenseVNL.h.


Member Typedef Documentation

typedef LinearSystemWrapper::Float itk::fem::LinearSystemWrapperDenseVNL::Float
 

Floating point storage type used within a class

Reimplemented from itk::fem::Solution.

Definition at line 43 of file itkFEMLinearSystemWrapperDenseVNL.h.

Referenced by AddMatrixValue(), AddSolutionValue(), AddVectorValue(), GetMatrixValue(), GetVectorValue(), SetMatrixValue(), SetSolutionValue(), and SetVectorValue().

typedef std::vector< MatrixRepresentation* > itk::fem::LinearSystemWrapperDenseVNL::MatrixHolder
 

Definition at line 52 of file itkFEMLinearSystemWrapperDenseVNL.h.

typedef vnl_matrix<Float> itk::fem::LinearSystemWrapperDenseVNL::MatrixRepresentation
 

Definition at line 49 of file itkFEMLinearSystemWrapperDenseVNL.h.

typedef LinearSystemWrapper itk::fem::LinearSystemWrapperDenseVNL::SuperClass
 

Definition at line 46 of file itkFEMLinearSystemWrapperDenseVNL.h.


Constructor & Destructor Documentation

itk::fem::LinearSystemWrapperDenseVNL::LinearSystemWrapperDenseVNL  )  [inline]
 

Definition at line 55 of file itkFEMLinearSystemWrapperDenseVNL.h.

virtual itk::fem::LinearSystemWrapperDenseVNL::~LinearSystemWrapperDenseVNL  )  [virtual]
 


Member Function Documentation

virtual void itk::fem::LinearSystemWrapperDenseVNL::AddMatrixValue unsigned int  i,
unsigned int  j,
Float  value,
unsigned int  matrixIndex
[inline, virtual]
 

Virtual function to add a value to a specific element of the A matrix.

Parameters:
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

Implements itk::fem::LinearSystemWrapper.

Definition at line 74 of file itkFEMLinearSystemWrapperDenseVNL.h.

References Float.

virtual void itk::fem::LinearSystemWrapperDenseVNL::AddSolutionValue unsigned int  i,
Float  value,
unsigned int  solutionIndex
[inline, virtual]
 

Virtual function to add a value of specific element of the solution vector.

Parameters:
i element Index in solution vector
value new value of the element
solutionIndex index of solution vector to add value to

Implements itk::fem::LinearSystemWrapper.

Definition at line 80 of file itkFEMLinearSystemWrapperDenseVNL.h.

References Float.

virtual void itk::fem::LinearSystemWrapperDenseVNL::AddVectorValue unsigned int  i,
Float  value,
unsigned int  vectorIndex
[inline, virtual]
 

Virtual function to add a value to a specific element of the B vector.

Parameters:
i row of the element
value value to add to the existing element
vectorIndex index of vector to add value to

Implements itk::fem::LinearSystemWrapper.

Definition at line 77 of file itkFEMLinearSystemWrapperDenseVNL.h.

References Float.

virtual void itk::fem::LinearSystemWrapperDenseVNL::CopySolution2Vector unsigned  solutionIndex,
unsigned int  vectorIndex
[virtual]
 

virtual void itk::fem::LinearSystemWrapperDenseVNL::CopyVector2Solution unsigned int  vectorIndex,
unsigned int  solutionIndex
[virtual]
 

Copy a vector to a solution vector

Parameters:
vectorIndex index of a vector to copy
solutionIndex index of a solution to copy the solution to

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::DestroyMatrix unsigned int  matrixIndex  )  [virtual]
 

Free the memory from a matrix

Parameters:
matrixIndex index of matrix to destroy

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::DestroySolution unsigned int  solutionIndex  )  [virtual]
 

Free teh mememory from a solution vector

Parameters:
solutionIndex index of solution vector to destroy

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::DestroyVector unsigned int  vectorIndex  )  [virtual]
 

Free the memory from a vector

Parameters:
vectorIndex index of vector to destroy

Implements itk::fem::LinearSystemWrapper.

virtual Float itk::fem::LinearSystemWrapperDenseVNL::GetMatrixValue unsigned int  i,
unsigned int  j,
unsigned int  matrixIndex
const [inline, virtual]
 

Virtual function to get a value of a specific element of a matrix.

Parameters:
i row of the element
j column of the element
matrixIndex index of matrix to get value from

Implements itk::fem::LinearSystemWrapper.

Definition at line 72 of file itkFEMLinearSystemWrapperDenseVNL.h.

References Float.

virtual Float itk::fem::LinearSystemWrapperDenseVNL::GetSolutionValue unsigned int  i,
unsigned int  solutionIndex
const [virtual]
 

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.

Parameters:
i element index in solution vector
solutionIndex index of solution vector to get value from
Note:
If the solution vector doesn't exist (problem was not yet solved), or the index i is out of range, the function returns 0.0.

Implements itk::fem::Solution.

virtual Float itk::fem::LinearSystemWrapperDenseVNL::GetVectorValue unsigned int  i,
unsigned int  vectorIndex
const [inline, virtual]
 

Virtual function to get a value of a specific element of the B vector.

Parameters:
i row of the element
vectorIndex index of vector to get value from

Implements itk::fem::LinearSystemWrapper.

Definition at line 75 of file itkFEMLinearSystemWrapperDenseVNL.h.

References Float.

virtual void itk::fem::LinearSystemWrapperDenseVNL::InitializeMatrix unsigned int  matrixIndex  )  [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.

Parameters:
matrixIndex index of matrix to initialize

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::InitializeSolution unsigned int  solutionIndex  )  [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.

Parameters:
solutionIndex index of solution vector to initialize

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::InitializeVector unsigned int  vectorIndex  )  [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.

Implements itk::fem::LinearSystemWrapper.

virtual bool itk::fem::LinearSystemWrapperDenseVNL::IsMatrixInitialized unsigned int  matrixIndex  )  [virtual]
 

Check to see if matrix is initialized

Parameters:
matrixIndex index of matrix to examine

Implements itk::fem::LinearSystemWrapper.

virtual bool itk::fem::LinearSystemWrapperDenseVNL::IsSolutionInitialized unsigned int  solutionIndex  )  [virtual]
 

Check to see if solution vector is initialized

Parameters:
solutionIndex index of solution vector to examine

Implements itk::fem::LinearSystemWrapper.

virtual bool itk::fem::LinearSystemWrapperDenseVNL::IsVectorInitialized unsigned int  vectorIndex  )  [virtual]
 

Check to see if vector is initialized

Parameters:
vectorIndex vector of index to examine

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::MultiplyMatrixMatrix unsigned int  resultMatrixIndex,
unsigned int  leftMatrixIndex,
unsigned int  rightMatrixIndex
[virtual]
 

Perform a matrix*matrix operation and store the result in the linear system

Parameters:
leftMatrixIndex index of left matrix
rightMatrixIndex index of right matrix
resultMatrixIndex index of matrix where solution is stored

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::MultiplyMatrixVector unsigned int  resultVectorIndex,
unsigned int  matrixIndex,
unsigned int  vectorIndex
[virtual]
 

Perform a matrix*vector operation and store the result in the linear system

Parameters:
matrixIndex index of matrix to multiply
vectorIndex index of vector to multiply
resultVectorIndex index of vector where result is store

Reimplemented from itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::ScaleMatrix Float  scale,
unsigned int  matrixIndex
[virtual]
 

Multiplies all elements of a matrix by a scalar

Parameters:
scale scalar to multiply all matrix values by
matrixIndex index of matrix to modify

Reimplemented from itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::ScaleSolution Float  scale,
unsigned int  solutionIndex
[virtual]
 

Multiplies all elements of a solution by a scalar

Parameters:
scale scalar to multiply all solution values by
solutionIndex index of solution to modify

Reimplemented from itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::ScaleVector Float  scale,
unsigned int  vectorIndex
[virtual]
 

Multiplies all elements of a vector by a scalar

Parameters:
scale scalar to multiply all vector values by
vectorIndex index of vector to modify

Reimplemented from itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::SetMatrixValue unsigned int  i,
unsigned int  j,
Float  value,
unsigned int  matrixIndex
[inline, virtual]
 

Virtual function to set a value of a specific element of the A matrix.

Parameters:
i row of the element
j column of the element
value new value of the element
matrixIndex index of matrix to set value in

Implements itk::fem::LinearSystemWrapper.

Definition at line 73 of file itkFEMLinearSystemWrapperDenseVNL.h.

References Float.

virtual void itk::fem::LinearSystemWrapperDenseVNL::SetMaximumNonZeroValuesInMatrix unsigned  int,
unsigned  int
[inline, virtual]
 

Definition at line 68 of file itkFEMLinearSystemWrapperDenseVNL.h.

virtual void itk::fem::LinearSystemWrapperDenseVNL::SetSolutionValue unsigned int  i,
Float  value,
unsigned int  solutionIndex
[inline, virtual]
 

Virtual function to set a value of specific element of the solution vector.

Parameters:
i element Index in solution vector
value new value of the element
solutionIndex index of solution vector to set value in

Implements itk::fem::LinearSystemWrapper.

Definition at line 79 of file itkFEMLinearSystemWrapperDenseVNL.h.

References Float.

virtual void itk::fem::LinearSystemWrapperDenseVNL::SetVectorValue unsigned int  i,
Float  value,
unsigned int  vectorIndex
[inline, virtual]
 

Virtual function to set a value of a specific element of the B vector.

Parameters:
i row of the element
value new value of the element
vectorIndex index of vector to set value in

Implements itk::fem::LinearSystemWrapper.

Definition at line 76 of file itkFEMLinearSystemWrapperDenseVNL.h.

References Float.

virtual void itk::fem::LinearSystemWrapperDenseVNL::Solve void   )  [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.

Note:
This function can only be called after the linear system was properly assembled.

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::SwapMatrices unsigned int  matrixIndex1,
unsigned int  matrixIndex2
[virtual]
 

Swaps access indices of any 2 matrices in the linear system

Parameters:
matrixIndex1 index of a matrix to swap
matrixIndex2 index of matrix to swap with

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::SwapSolutions unsigned int  solutionIndex1,
unsigned int  solutionIndex2
[virtual]
 

Swaps access indices of any 2 solution vectors in the linear system

Parameters:
solutionIndex1 index of a solution vector to swap
solutionIndex2 index of solution vector to swap with

Implements itk::fem::LinearSystemWrapper.

virtual void itk::fem::LinearSystemWrapperDenseVNL::SwapVectors unsigned int  vectorIndex1,
unsigned int  vectorIndex2
[virtual]
 

Swaps access indices of any 2 vectors in the linear system

Parameters:
vectorIndex1 index of a vector to swap
vectorIndex2 index of vector to swap with

Implements itk::fem::LinearSystemWrapper.


The documentation for this class was generated from the following file:
Generated at Thu May 25 02:57:13 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000