60 iVecSize(iIntSize), piRowm1(0), piColm1(0)
97 FullSubMatrixHandler::IsValid(
void)
const
99 FullMatrixHandler::IsValid();
106 #ifdef DEBUG_MEMMANAGER
153 silent_cerr(
"FullSubMatrixHandler::Resize() - error"
565 ppdColsm1[iFirstCol + 1][iFirstRow + 1] = d;
566 ppdColsm1[iFirstCol + 2][iFirstRow + 2] = d;
567 ppdColsm1[iFirstCol + 3][iFirstRow + 3] = d;
591 ppdColsm1[iFirstCol + 1][ iFirstRow + 2] = -pdv[
V3];
592 ppdColsm1[iFirstCol + 1][ iFirstRow + 3] = pdv[
V2];
594 ppdColsm1[iFirstCol + 2][ iFirstRow + 1] = pdv[
V3];
595 ppdColsm1[iFirstCol + 2][ iFirstRow + 3] = -pdv[
V1];
597 ppdColsm1[iFirstCol + 3][ iFirstRow + 1] = -pdv[
V2];
598 ppdColsm1[iFirstCol + 3][ iFirstRow + 2] = pdv[
V1];
848 out << std::setw(12) <<
"";
850 out << std::setw(12) << m.
piColm1[
c];
852 out << std::endl << std::endl;
855 out << std::setw(12) << m.
piRowm1[r];
862 return out << std::endl;
974 : bOwnsMemory(
false),
975 iIntSize(iTmpInt), iDoubleSize(iTmpDouble),
976 iNumItems(iTmpInt/2),
977 piRowm1(0), piColm1(0),
994 : iIntSize(2*iTmpInt), iDoubleSize(iTmpInt),
995 iNumItems(iTmpInt), piRowm1(0), piColm1(0), pdMatm1(0)
1024 SparseSubMatrixHandler::IsValid(
void)
const
1035 #ifdef DEBUG_MEMMANAGER
1067 silent_cerr(
"SparseSubMatrixHandler::Resize() - error"
1086 Resize(iNewRow, iNewCol);
1166 pdm[0] = pdFrom[
V1];
1167 pir[0] = iFirstRow + 1;
1168 pic[0] = iFirstCol + 1;
1171 pdm[1] = pdFrom[
V2];
1172 pir[1] = iFirstRow + 2;
1173 pic[1] = iFirstCol + 2;
1176 pdm[2] = pdFrom[
V3];
1177 pir[2] = iFirstRow + 3;
1178 pic[2] = iFirstCol + 3;
1220 pir[0] = iFirstRow + 1;
1221 pic[0] = iFirstCol + 1;
1225 pir[1] = iFirstRow + 2;
1226 pic[1] = iFirstCol + 2;
1230 pir[2] = iFirstRow + 3;
1231 pic[2] = iFirstCol + 3;
1275 pdm[0] = -pdFrom[
V3];
1276 pir[0] = iFirstRow + 1;
1277 pic[0] = iFirstCol + 2;
1280 pdm[1] = pdFrom[
V2];
1281 pir[1] = iFirstRow + 1;
1282 pic[1] = iFirstCol + 3;
1285 pdm[2] = pdFrom[
V3];
1286 pir[2] = iFirstRow + 2;
1287 pic[2] = iFirstCol + 1;
1290 pdm[3] = -pdFrom[
V1];
1291 pir[3] = iFirstRow + 2;
1292 pic[3] = iFirstCol + 3;
1295 pdm[4] = -pdFrom[
V2];
1296 pir[4] = iFirstRow + 3;
1297 pic[4] = iFirstCol + 1;
1300 pdm[5] = pdFrom[
V1];
1301 pir[5] = iFirstRow + 3;
1302 pic[5] = iFirstCol + 2;
1315 #if defined HAVE_MEMSET
1367 pdTmpMat[0] = pdFrom[
M11];
1368 piTmpRow[0] = iFirstRow++;
1369 piTmpCol[0] = iFirstCol;
1371 pdTmpMat[1] = pdFrom[
M21];
1372 piTmpRow[1] = iFirstRow++;
1373 piTmpCol[1] = iFirstCol;
1375 pdTmpMat[2] = pdFrom[
M31];
1376 piTmpRow[2] = iFirstRow;
1377 piTmpCol[2] = iFirstCol;
1383 pdTmpMat[3] = pdFrom[
M12];
1384 piTmpRow[3] = iFirstRow++;
1385 piTmpCol[3] = iFirstCol;
1387 pdTmpMat[4] = pdFrom[
M22];
1388 piTmpRow[4] = iFirstRow++;
1389 piTmpCol[4] = iFirstCol;
1391 pdTmpMat[5] = pdFrom[
M32];
1392 piTmpRow[5] = iFirstRow;
1393 piTmpCol[5] = iFirstCol;
1399 pdTmpMat[6] = pdFrom[
M13];
1400 piTmpRow[6] = iFirstRow++;
1401 piTmpCol[6] = iFirstCol;
1403 pdTmpMat[7] = pdFrom[
M23];
1404 piTmpRow[7] = iFirstRow++;
1405 piTmpCol[7] = iFirstCol;
1407 pdTmpMat[8] = pdFrom[
M33];
1408 piTmpRow[8] = iFirstRow;
1409 piTmpCol[8] = iFirstCol;
1609 if (piTmpRow == 0) {
1613 if (pdTmpVec == 0) {
1614 silent_cerr(
"MySubVectorHandler(): illegal args" << std::endl);
1631 silent_cerr(
"Negative size!" << std::endl);
1640 silent_cerr(
"Can't resize to " << iSize
1641 <<
": larger than max size " <<
iMaxSize
1723 if (iMSize >= iSize) {
1733 MySubVectorHandler::IsValid(
void)
const
1735 MyVectorHandler::IsValid();
1739 #ifdef DEBUG_MEMMANAGER
1791 for (
integer i = 1; i <= iRow; i++) {
1793 <<
" " << std::setw(12) << v(i) << std::endl;
1796 return out << std::endl;
void PutT(integer iRow, integer iCol, const FullMatrixHandler &source)
SparseSubMatrixHandler(const SparseSubMatrixHandler &)
void PutCross(integer iFirstRow, integer iFirstCol, const Vec3 &v)
void PutMat3x3(integer iSubIt, integer iFirstRow, integer iFirstCol, const Mat3x3 &m)
virtual integer iGetNumCols(void) const =0
std::ostream & operator<<(std::ostream &out, const FullSubMatrixHandler &m)
MatrixHandler & SubFromT(MatrixHandler &MH) const
void Attach(integer iSize, doublereal *pd, integer *pi, integer iMSize=0)
virtual ~SparseSubMatrixHandler(void)
#define MBDYN_EXCEPT_ARGS
void PutT(integer iRow, integer iCol, const Vec3 &v)
void Add(integer iRow, integer iCol, const Vec3 &v)
void Put(integer iRow, integer iCol, const FullMatrixHandler &source)
void Resize(integer iNewRow, integer iNewCol)
#define SAFEDELETEARR(pnt)
virtual void IncCoef(integer iRow, const doublereal &dCoef)=0
void Put(integer iRow, integer iCol, const Vec3 &v)
MatrixHandler & AddTo(MatrixHandler &MH) const
void Add(integer iRow, integer iCol, const FullMatrixHandler &source)
void ResizeReset(integer iNewRow, integer iNewCol)
MatrixHandler & SubFromT(MatrixHandler &MH) const
void PutCross(integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
virtual void Resize(integer iNewRows, integer iNewCols)
MatrixHandler & AddTo(MatrixHandler &MH) const
virtual integer iGetSize(void) const =0
void Resize(integer iNewRow, integer iNewCol)
virtual ~FullSubMatrixHandler(void)
void AddT(integer iRow, integer iCol, const Vec3 &v)
virtual void Resize(integer iSize)
FullSubMatrixHandler(const FullSubMatrixHandler &)
virtual integer iGetSize(void) const
virtual VectorHandler & AddTo(VectorHandler &VH) const
void Attach(int iRows, int iCols, integer *piTmpIndx)
MatrixHandler & AddToT(MatrixHandler &MH) const
MatrixHandler & SubFrom(MatrixHandler &MH) const
virtual integer iGetRowIndex(integer iSubRow) const =0
void Attach(int iNumEntr, doublereal *pdTmpMat, integer *piTmpIndx)
virtual ~SubMatrixHandler(void)
#define ASSERT(expression)
void Sub(integer iRow, integer iCol, const FullMatrixHandler &source)
#define defaultMemoryManager
virtual void ResizeReset(integer, integer)
virtual integer iGetNumCols(void) const
static std::stack< cleanup * > c
const doublereal * pGetMat(void) const
void SubT(integer iRow, integer iCol, const Vec3 &v)
void PutDiag(integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
const doublereal * pGetVec(void) const
void PutDiag(integer iFirstRow, integer iFirstCol, const Vec3 &v)
void Sub(integer iRow, integer iCol, const Vec3 &v)
#define SAFENEWARR(pnt, item, sz)
void SubT(integer iRow, integer iCol, const FullMatrixHandler &source)
virtual doublereal * pdGetVec(void) const
void AddT(integer iRow, integer iCol, const FullMatrixHandler &source)
MatrixHandler & AddToT(MatrixHandler &MH) const
virtual integer iGetNumRows(void) const
virtual integer iGetNumRows(void) const =0
MySubVectorHandler(const MySubVectorHandler &)
MatrixHandler & SubFrom(MatrixHandler &MH) const