MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / AssembleTranspose

Method AssembleTranspose

SRC/matrix/Matrix.cpp:1673–1706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1671
1672
1673int
1674Matrix::AssembleTranspose(const Matrix &V, int init_row, int init_col, double fact)
1675{
1676 int pos_Rows, pos_Cols;
1677 int res = 0;
1678
1679 int VnumRows = V.numRows;
1680 int VnumCols = V.numCols;
1681
1682 int final_row = init_row + VnumCols - 1;
1683 int final_col = init_col + VnumRows - 1;
1684
1685 if ((init_row >= 0) && (final_row < numRows) && (init_col >= 0) && (final_col < numCols))
1686 {
1687 for (int i=0; i<VnumRows; i++)
1688 {
1689 pos_Cols = init_col + i;
1690 for (int j=0; j<VnumCols; j++)
1691 {
1692 pos_Rows = init_row + j;
1693
1694 (*this)(pos_Rows,pos_Cols) += V(i,j)*fact;
1695 }
1696 }
1697 }
1698 else
1699 {
1700 opserr << "WARNING: Matrix::AssembleTranspose(const Matrix &V, int init_row, int init_col, double fact): ";
1701 opserr << "position outside bounds \n";
1702 res = -1;
1703 }
1704
1705 return res;
1706}
1707
1708
1709int

Callers 5

updateMethod · 0.45
getdg_dfMethod · 0.45
GetJacobianMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected