Public Member Functions

ColPack::JacobianRecovery2D Class Reference
[Recovery Classes]

class JacobianRecovery2D in group5. More...

#include <JacobianRecovery2D.h>

Inherits ColPack::RecoveryCore.

Collaboration diagram for ColPack::JacobianRecovery2D:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int DirectRecover_RowCompressedFormat (BipartiteGraphBicoloringInterface *g, double **dp2_RowCompressedMatrix, double **dp2_ColumnCompressedMatrix, unsigned int **uip2_JacobianSparsityPattern, double ***dp3_JacobianValue)
 A routine for recovering a Jacobian from a Star-Bicoloring based compressed representation.
int DirectRecover_CoordinateFormat (BipartiteGraphBicoloringInterface *g, double **dp2_RowCompressedMatrix, double **dp2_ColumnCompressedMatrix, unsigned int **uip2_JacobianSparsityPattern, unsigned int **ip2_RowIndex, unsigned int **ip2_ColumnIndex, double **dp2_JacobianValue)
 A routine for recovering a Jacobian from a Star-Bicoloring based compressed representation.
int DirectRecover_SparseSolversFormat (BipartiteGraphBicoloringInterface *g, double **dp2_RowCompressedMatrix, double **dp2_ColumnCompressedMatrix, unsigned int **uip2_JacobianSparsityPattern, unsigned int **ip2_RowIndex, unsigned int **ip2_ColumnIndex, double **dp2_JacobianValue)
 A routine for recovering a Jacobian from a Star-Bicoloring based compressed representation.

Detailed Description

class JacobianRecovery2D in group5.

Definition at line 31 of file JacobianRecovery2D.h.


Member Function Documentation

int ColPack::JacobianRecovery2D::DirectRecover_CoordinateFormat ( BipartiteGraphBicoloringInterface g,
double **  dp2_RowCompressedMatrix,
double **  dp2_ColumnCompressedMatrix,
unsigned int **  uip2_JacobianSparsityPattern,
unsigned int **  ip2_RowIndex,
unsigned int **  ip2_ColumnIndex,
double **  dp2_JacobianValue 
)

A routine for recovering a Jacobian from a Star-Bicoloring based compressed representation.

Return by recovery routine: three vectors in "Coordinate Format" (zero-based indexing) http://www.intel.com/software/products/mkl/docs/webhelp/appendices/mkl_appA_SMSF.html#mkl_appA_SMSF_5

  • unsigned int** ip2_RowIndex
  • unsigned int** ip2_ColumnIndex
  • double** dp2_JacobianValue // corresponding non-zero values

Definition at line 270 of file JacobianRecovery2D.cpp.

References ColPack::RecoveryCore::CF_available, ColPack::RecoveryCore::dp_CF_Value, free_2DMatrix(), ColPack::BipartiteGraphCore::GetEdgeCount(), ColPack::BipartiteGraphBicoloring::GetLeftVertexColors(), ColPack::BipartiteGraphBicoloring::GetRightVertexColorCount(), ColPack::BipartiteGraphBicoloring::GetRightVertexColors_Transformed(), ColPack::BipartiteGraphBicoloring::GetRightVertexDefaultColor(), ColPack::BipartiteGraphCore::GetRowVertexCount(), ColPack::RecoveryCore::i_CF_rowCount, ColPack::RecoveryCore::ip_CF_ColumnIndex, ColPack::RecoveryCore::ip_CF_RowIndex, and ColPack::RecoveryCore::reset().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::JacobianRecovery2D::DirectRecover_RowCompressedFormat ( BipartiteGraphBicoloringInterface g,
double **  dp2_RowCompressedMatrix,
double **  dp2_ColumnCompressedMatrix,
unsigned int **  uip2_JacobianSparsityPattern,
double ***  dp3_JacobianValue 
)

A routine for recovering a Jacobian from a Star-Bicoloring based compressed representation.

Parameter:

  • Input:
    • dp2_RowCompressedMatrix: The row compressed matrix that contains all computed values. Row compressed matrix is the matrix where all rows with the same color ID (the values of m_vi_LeftVertexColors[] are equal) are merged together.
    • dp2_ColumnCompressedMatrix: The column compressed matrix that contains all computed values. Column compressed matrix is the matrix where all columns with the same color ID (the values of m_vi_RightVertexColors[] are equal) are merged together.
    • uip2_JacobianSparsityPattern.
  • Output:
    • dp3_JacobianValue

Precondition:

  • Star Bicoloring routine has been called.
  • uip2_JacobianSparsityPattern: The Jacobian matrix must be stored in compressed sparse rows format
  • dp3_JacobianValue is just a pointer pointing to a 2D matrix (no memory allocated yet). This matrix will be created (memory will be allocated) by DirectRecover() and the pointer will be assigned to dp3_JacobianValue

Postcondition:

  • dp3_JacobianValue points to a 2d matrix contains the numerical values of the Jacobian. Row Compressed Format is used.

Return value:

  • _TRUE upon successful

About input parameters:

  • This routine doesn't need to take (Star) Bicoloring results (m_vi_LeftVertexColors and m_vi_RightVertexColors) of the Jacobian as another paramenter because that information is known internally already (because of the 1st precondition).

Row Compressed Format for dp3_JacobianValue:

  • This is a 2D matrix of doubles.
  • The first element of each row will specify the number of non-zeros in the Jacobian => Value of the first element + 1 will be the length of that row.
  • The value of each element after the 1st element is the value of the non-zero in the Jacobian. The value of dp3_JacobianValue[col][row] is the value of element [col][uip2_JacobianSparsityPattern[col][row]] in the real (uncompressed) Jacobian
  • An example of compressed sparse rows format:
    • Uncompressed matrix:
      1 .5 0
      .2 2 3
      0 6 -.5
    • Corresponding uip2_JacobianSparsityPattern:
      2 0 1
      3 0 1 2
      2 1 2
    • Corresponding dp3_JacobianValue:
      2 1 .5
      3 .2 2 3
      2 6 -.5

Algorithm: Basically the combination of RecoverForPD2RowWise() (for dp2_RowCompressedMatrix) and RecoverForPD2ColumnWise() (for dp2_ColumnCompressedMatrix) in BipartiteGraphPartialColoringInterface class

Definition at line 73 of file JacobianRecovery2D.cpp.

References ColPack::RecoveryCore::AF_available, ColPack::RecoveryCore::dp2_AF_Value, free_2DMatrix(), ColPack::BipartiteGraphBicoloring::GetLeftVertexColors(), ColPack::BipartiteGraphBicoloring::GetRightVertexColorCount(), ColPack::BipartiteGraphBicoloring::GetRightVertexColors_Transformed(), ColPack::BipartiteGraphBicoloring::GetRightVertexDefaultColor(), ColPack::BipartiteGraphCore::GetRowVertexCount(), ColPack::RecoveryCore::i_AF_rowCount, Pause(), and ColPack::RecoveryCore::reset().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::JacobianRecovery2D::DirectRecover_SparseSolversFormat ( BipartiteGraphBicoloringInterface g,
double **  dp2_RowCompressedMatrix,
double **  dp2_ColumnCompressedMatrix,
unsigned int **  uip2_JacobianSparsityPattern,
unsigned int **  ip2_RowIndex,
unsigned int **  ip2_ColumnIndex,
double **  dp2_JacobianValue 
)