85 virtual void IsValid(
void)
const;
95 virtual inline void Reset(
void);
186 if (
pGTL[iRow] > 0) {
187 if (
pGTL[iCol] > 0) {
191 }
else if (
pGTL[iCol] < 0) {
196 }
else if (
pGTL[iRow] < 0) {
197 if (
pGTL[iCol] > 0) {
201 }
else if (
pGTL[iCol] < 0) {
208 silent_cerr(
"SchurMatrixHandler::PutCoef() "
209 "Process(" << MBDynComm.Get_rank() <<
"): "
210 "trying to operate on nonlocal indices "
211 << iRow <<
"," << iCol << std::endl);
213 silent_cerr(
"SchurMatrixHandler::PutCoef() "
214 "trying to operate on nonlocal indices "
215 << iRow <<
"," << iCol << std::endl);
229 if (
pGTL[iRow] > 0) {
230 if (
pGTL[iCol] > 0) {
234 }
else if (
pGTL[iCol] < 0) {
239 }
else if (
pGTL[iRow] < 0) {
240 if (
pGTL[iCol] > 0) {
244 }
else if (
pGTL[iCol] < 0) {
251 silent_cerr(
"SchurMatrixHandler::IncCoef() "
252 "Process(" << MBDynComm.Get_rank() <<
"): "
253 "trying to operate on nonlocal indices "
254 << iRow <<
"," << iCol << std::endl);
256 silent_cerr(
"SchurMatrixHandler::IncCoef() "
257 "trying to operate on nonlocal indices "
258 << iRow <<
"," << iCol << std::endl);
272 if (
pGTL[iRow] > 0) {
273 if (
pGTL[iCol] > 0) {
277 }
else if (
pGTL[iCol] < 0) {
282 }
else if (
pGTL[iRow] < 0) {
283 if (
pGTL[iCol] > 0) {
287 }
else if (
pGTL[iCol] < 0) {
294 silent_cerr(
"SchurMatrixHandler::DecCoef() "
295 "Process(" << MBDynComm.Get_rank() <<
"): "
296 "trying to operate on nonlocal indices "
297 << iRow <<
"," << iCol << std::endl);
299 silent_cerr(
"SchurMatrixHandler::DecCoef() "
300 "trying to operate on nonlocal indices "
301 << iRow <<
"," << iCol << std::endl);
314 if (
pGTL[iRow] > 0) {
315 if (
pGTL[iCol] > 0) {
316 return pB->operator()(
pGTL[iRow],
pGTL[iCol]);
318 }
else if(
pGTL[iCol] < 0) {
322 }
else if (
pGTL[iRow] < 0) {
323 if (
pGTL[iCol] > 0) {
324 return pF->operator()(-
pGTL[iRow],
pGTL[iCol]);
326 }
else if (
pGTL[iCol] < 0) {
332 silent_cerr(
"SchurMatrixHandler::dGetCoef() "
333 "Process(" << MBDynComm.Get_rank() <<
"): "
334 "trying to operate on nonlocal indices "
335 << iRow <<
"," << iCol << std::endl);
337 silent_cerr(
"SchurMatrixHandler::dGetCoef() "
338 "trying to operate on nonlocal indices "
339 << iRow <<
"," << iCol << std::endl);
352 if (
pGTL[iRow] > 0) {
353 if (
pGTL[iCol] > 0) {
356 }
else if (
pGTL[iCol] < 0) {
361 if (
pGTL[iCol] > 0) {
364 }
else if (
pGTL[iCol] < 0) {
370 silent_cerr(
"SchurMatrixHandler::operator() "
371 "Process(" << MBDynComm.Get_rank() <<
"): "
372 "trying to operate on nonlocal indices "
373 << iRow <<
"," << iCol << std::endl);
375 silent_cerr(
"SchurMatrixHandler::operator() "
376 "trying to operate on nonlocal indices "
377 << iRow <<
"," << iCol << std::endl);
390 if (
pGTL[iRow] > 0) {
391 if (
pGTL[iCol] > 0) {
392 return pB->operator()(
pGTL[iRow],
pGTL[iCol]);
394 }
else if (
pGTL[iCol] < 0) {
399 if (
pGTL[iCol] > 0) {
400 return pF->operator()(-
pGTL[iRow],
pGTL[iCol]);
402 }
else if (
pGTL[iCol] < 0) {
408 silent_cerr(
"SchurMatrixHandler::operator() "
409 "Process(" << MBDynComm.Get_rank() <<
"): "
410 "trying to operate on nonlocal indices "
411 << iRow <<
"," << iCol << std::endl);
413 silent_cerr(
"SchurMatrixHandler::operator() "
414 "trying to operate on nonlocal indices "
415 << iRow <<
"," << iCol << std::endl);
438 for (
int j = 0; j <
ISize; j++) {
439 int iColc = j *
ISize;
440 int iCole = j *
LSize;
442 for (
int k = 0; k <
LSize; k++) {
443 for (
int i = 0; i <
ISize; i++) {
445 pF->operator()(i + 1, k + 1) *
pdE[k + iCole];
459 for (
int j = 0; j <
ISize; j++) {
460 int iColx = j *
LSize;
461 for (
int i = 0; i <
LSize; i++) {
462 if (
pdE[i + iColx] != 0) {
473 silent_cout(
"Schur Matrix " << std::endl);
475 for (
int i = 0; i <
LSize; i++) {
476 for (
int j = 0; j <
LSize; j++) {
477 silent_cout(
pB->operator()(i + 1, j + 1) <<
" ");
480 for (
int j = 0; j <
ISize; j++) {
481 silent_cout(
pdE[i + j*LSize] <<
" ");
483 silent_cout(std::endl);
486 for (
int i = 0; i <
ISize; i++) {
487 for (
int j = 0; j <
LSize; j++) {
488 silent_cout(
pF->operator()(i + 1, j + 1) <<
" ");
491 for (
int j = 0; j <
ISize; j++) {
492 silent_cout(
pdC[i + j*ISize] <<
" ");
494 silent_cout(std::endl);
528 void IsValid(
void)
const;
537 virtual void Reset(
void);
559 silent_cerr(
"You shouldn't have asked for "
560 "the internal pointer of a SchurVectorHandler"
575 silent_cerr(
"Why are you trying to resize a SchurVector ???? "
576 <<
"No Operation Performed!!" << std::endl);
606 if (
pGTL[iRow] > 0) {
609 }
else if (
pGTL[iRow] < 0 ) {
614 silent_cerr(
"SchurVectorHandler::PutCoef() "
615 "Process(" << MBDynComm.Get_rank() <<
"): "
616 "trying to operate on nonlocal index "
617 << iRow << std::endl);
619 silent_cerr(
"SchurVectorHandler::PutCoef() "
620 "trying to operate on nonlocal index "
621 << iRow << std::endl);
635 if (
pGTL[iRow] > 0) {
638 }
else if (
pGTL[iRow] < 0) {
643 silent_cerr(
"SchurVectorHandler::IncCoef "
644 "Process(" << MBDynComm.Get_rank() <<
"): "
645 "trying to operate on nonlocal index "
646 << iRow << std::endl);
648 silent_cerr(
"SchurVectorHandler::IncCoef "
649 "trying to operate on nonlocal index "
650 << iRow << std::endl);
664 if (
pGTL[iRow] > 0) {
667 }
else if (
pGTL[iRow] < 0) {
672 silent_cerr(
"SchurVectorHandler::DecCoef "
673 "Process(" << MBDynComm.Get_rank() <<
"): "
674 "trying to operate on nonlocal index "
675 << iRow << std::endl);
677 silent_cerr(
"SchurVectorHandler::DecCoef "
678 "trying to operate on nonlocal index "
679 << iRow << std::endl);
693 if (
pGTL[iRow] > 0) {
694 return pLV->operator()(
pGTL[iRow]);
696 }
else if (
pGTL[iRow] < 0) {
697 return pIV->operator()(-
pGTL[iRow]);
701 silent_cerr(
"SchurVectorHandler::dGetCoef "
702 "Process(" << MBDynComm.Get_rank() <<
"): "
703 "trying to operate on nonlocal index "
704 << iRow << std::endl);
706 silent_cerr(
"SchurVectorHandler::dGetCoef "
707 "trying to operate on nonlocal index "
708 << iRow << std::endl);
721 if (
pGTL[iRow] > 0) {
722 return pLV->operator()(
pGTL[iRow]);
724 }
else if (
pGTL[iRow] < 0) {
725 return pIV->operator()(-
pGTL[iRow]);
729 silent_cerr(
"SchurVectorHandler::operator()"
730 "Process(" << MBDynComm.Get_rank() <<
"): "
731 "trying to operate on nonlocal index "
732 << iRow << std::endl);
734 silent_cerr(
"SchurVectorHandler::operator()"
735 "trying to operate on nonlocal index "
736 << iRow << std::endl);
745 silent_cerr(
"SchurVectorHandler::operator() "
746 "cannot be used on nonlocal index "
747 << iRow << std::endl);
755 silent_cout(
"Schur Vector " << std::endl);
757 for (
int j = 0; j <
LSize; j++) {
758 silent_cout(
pLV->operator()(j + 1) <<
" " << std::endl);
761 for (
int j = 0; j <
ISize; j++) {
762 silent_cout(
pIV->operator()(j + 1) <<
" " << std::endl);
794 inline void Reset(
void);
859 if (
pGTL[iRow] > 0) {
860 if (
pGTL[iCol] > 0) {
864 }
else if (
pGTL[iCol] < 0 ) {
874 }
else if (
pGTL[iRow] < 0 ) {
875 if (
pGTL[iCol] > 0) {
879 }
else if (
pGTL[iCol] < 0) {
886 silent_cerr(
"SchurMatrixHandlerUm::PutCoef() "
887 "Process(" << MBDynComm.Get_rank() <<
"): "
888 "trying to operate on nonlocal indices "
889 << iRow <<
"," << iCol << std::endl);
891 silent_cerr(
"SchurMatrixHandlerUm::PutCoef() "
892 "trying to operate on nonlocal indices "
893 << iRow <<
"," << iCol << std::endl);
907 if (
pGTL[iRow] > 0) {
908 if (
pGTL[iCol] > 0) {
912 }
else if (
pGTL[iCol] < 0) {
922 }
else if (
pGTL[iRow] < 0) {
923 if (
pGTL[iCol] > 0) {
927 }
else if (
pGTL[iCol] < 0) {
934 silent_cerr(
"SchurMatrixHandlerUm::IncCoef() "
935 "Process(" << MBDynComm.Get_rank() <<
"): "
936 "trying to operate on nonlocal indices "
937 << iRow <<
"," << iCol << std::endl);
939 silent_cerr(
"SchurMatrixHandlerUm::IncCoef() "
940 "trying to operate on nonlocal indices "
941 << iRow <<
"," << iCol << std::endl);
955 if (
pGTL[iRow] > 0) {
956 if (
pGTL[iCol] > 0) {
960 }
else if (
pGTL[iCol] < 0) {
970 }
else if (
pGTL[iRow] < 0) {
975 }
else if (iCol < 0) {
982 silent_cerr(
"SchurMatrixHandlerUm::DecCoef() "
983 "Process(" << MBDynComm.Get_rank() <<
"): "
984 "trying to operate on nonlocal indices "
985 << iRow <<
"," << iCol << std::endl);
987 silent_cerr(
"SchurMatrixHandlerUm::DecCoef() "
988 "trying to operate on nonlocal indices "
989 << iRow <<
"," << iCol << std::endl);
1002 if (
pGTL[iRow] > 0) {
1003 if (
pGTL[iCol] > 0) {
1004 return pB->operator()(
pGTL[iRow],
pGTL[iCol]);
1006 }
else if (
pGTL[iCol] < 0) {
1015 }
else if (
pGTL[iRow] < 0) {
1016 if (
pGTL[iCol] > 0) {
1017 return pF->operator()(-
pGTL[iRow],
pGTL[iCol]);
1019 }
else if (
pGTL[iCol] < 0) {
1025 silent_cerr(
"SchurMatrixHandlerUm::dGetCoef() "
1026 "Process(" << MBDynComm.Get_rank() <<
"): "
1027 "trying to operate on nonlocal indices "
1028 << iRow <<
"," << iCol << std::endl);
1030 silent_cerr(
"SchurMatrixHandlerUm::dGetCoef() "
1031 "trying to operate on nonlocal indices "
1032 << iRow <<
"," << iCol << std::endl);
1055 for (
int j = 0; j <
ISize; j++) {
1056 int iColc = j *
ISize;
1057 int iCole = j *
LSize;
1059 for (
int k = 0; k <
LSize; k++) {
1060 for (
int i = 0; i <
ISize; i++) {
1062 pF->operator()(i + 1, k + 1) *
pdEs[k + iCole];
1076 for (
int j = 0; j <
ISize; j++) {
1077 int iColx = j *
LSize;
1079 for (
int i = 0; i <
LSize; i++) {
1080 if (
pdEs[i + iColx] != 0) {
1091 silent_cout(
"Schur Matrix " << std::endl);
1093 for (
int i = 0; i <
LSize; i++) {
1094 for (
int j = 0; j <
LSize; j++) {
1095 silent_cout(
pB->operator()(i + 1, j + 1) <<
" ");
1098 for (
int j = 0; j <
ISize; j++) {
1100 silent_cout(
pdE[i + j*LSize] <<
" ");
1102 silent_cout(
pdEs[i + j*LSize] <<
" ");
1105 silent_cout(std::endl);
1108 for (
int i = 0; i <
ISize; i++) {
1109 for (
int j = 0;j <
LSize; j++) {
1110 silent_cout(
pF->operator()(i + 1, j + 1) <<
" ");
1113 for (
int j = 0; j <
ISize; j++) {
1114 silent_cout(
pdC[i + j*ISize] <<
" ");
1116 silent_cout(std::endl);
const doublereal & dGetCoef(integer iRow) const
virtual void Reset(void)=0
doublereal * GetCMat(void)
void DecCoef(integer iRow, const doublereal &dCoef)
SchurMatrixHandler(int LocSize, int IntSize, MatrixHandler *pBM, integer *pGlobToLoc, doublereal *pdEv=0)
virtual doublereal * GetECol(const integer iCol) const
virtual void MatEFCReset(void)
doublereal * GetEColSol(const integer iCol) const
void PutCoef(integer iRow, const doublereal &dCoef)
virtual void IncCoef(integer iRow, integer iCol, const doublereal &dCoef)
#define MBDYN_EXCEPT_ARGS
virtual doublereal * pdGetVec(void) const =0
ErrGeneric(MBDYN_EXCEPT_ARGS_DECL)
VectorHandler * GetIVec(void)
#define MBDYN_EXCEPT_ARGS_PASSTHRU
void DecCoef(integer ix, integer iy, const doublereal &inc)
MatrixHandler * GetBMat(void)
virtual void IncCoef(integer iRow, integer iCol, const doublereal &dCoef)
virtual void IncCoef(integer iRow, const doublereal &dCoef)=0
VectorHandler * GetLVec(void)
virtual void DecCoef(integer iRow, integer iCol, const doublereal &dCoef)
#define MBDYN_EXCEPT_ARGS_DECL
virtual VectorHandler & CompNewf(VectorHandler &f, const VectorHandler &g) const
virtual void CompLocSchur(void)
virtual VectorHandler & CompNewg(VectorHandler &g, const VectorHandler &f) const
virtual void Resize(integer, integer)
void Resize(integer iNewSize)
virtual integer iGetSize(void) const =0
virtual ~SchurMatrixHandler(void)
virtual VectorHandler & MatVecDecMul(VectorHandler &out, const VectorHandler &in) const
virtual doublereal * GetEColSol(const integer iCol) const
virtual void PutCoef(integer iRow, const doublereal &dCoef)
integer iGetSize(void) const
virtual void Reset(void)=0
virtual integer iGetNumRows(void) const
~SchurMatrixHandlerUm(void)
void IncCoef(integer iRow, const doublereal &dCoef)
virtual void DecCoef(integer iRow, const doublereal &dCoef)=0
const doublereal & dGetCoef(integer iRow, integer iCol) const
ErrGeneric(MBDYN_EXCEPT_ARGS_DECL)
SchurMatrixHandlerUm(int LocSize, int IntSize, MatrixHandler *pBM, integer *pGlobToLoc)
virtual void DecCoef(integer iRow, const doublereal &dCoef)
doublereal * GetECol(const integer iCol) const
VectorHandler & CompNewf(VectorHandler &f, const VectorHandler &g) const
virtual const doublereal & dGetCoef(integer iRow, integer iCol) const
virtual integer iGetNumCols(void) const
void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
virtual void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
#define ASSERT(expression)
doublereal * pdGetVec(void) const
virtual void PutCoef(integer iRow, const doublereal &dCoef)=0
virtual const doublereal & operator()(integer iRow, integer iCol) const
void PutCoef(integer ix, integer iy, const doublereal &val)
void IncCoef(integer iRow, integer iCol, const doublereal &dCoef)
virtual void PutCoef(integer iRow, integer iCol, const doublereal &dCoef)
virtual void DecCoef(integer iRow, integer iCol, const doublereal &dCoef)
void SetBMat(MatrixHandler *pBM)
const doublereal & operator()(integer iRow) const
virtual void PrintMatrix(void)
SchurVectorHandler(int LocSize, int IntSize, VectorHandler *pLocVec, integer *pGlobToLoc)
ErrGeneric(MBDYN_EXCEPT_ARGS_DECL)
void DecCoef(integer iRow, integer iCol, const doublereal &dCoef)
void IncCoef(integer ix, integer iy, const doublereal &inc)
~SchurVectorHandler(void)
virtual void IncCoef(integer iRow, const doublereal &dCoef)