113 class HarwellSparseSolutionManager;
123 static char sLUClassName[] =
"HarwellSolver";
125 class HarwellSolver {
126 friend class HarwellSparseSolutionManager;
138 integer iGetErrCode(
void)
const {
146 std::vector<integer>*
const piRow;
147 std::vector<integer>*
const piCol;
148 std::vector<doublereal>*
const pdMat;
162 std::vector<integer>*
const piTmpRow,
163 std::vector<integer>*
const piTmpCol,
164 std::vector<doublereal>*
const pdTmpMat,
187 #ifdef DEBUG_MEMMANAGER
188 ASSERT(piRow->Size()==iMatSize);
189 ASSERT(piCol->Size()==iMatSize);
190 ASSERT(pdMat->Size()==iMatSize);
200 for (
integer iCnt = 0; iCnt < 5*iN; iCnt++) {
203 for (
integer iCnt = 0; iCnt < 8*iN; iCnt++) {
206 for (
integer iCnt = 0; iCnt < 1*iN; iCnt++) {
213 ~HarwellSolver(
void) {
220 if (piKeep != NULL) {
226 void IsValid(
void)
const {
234 #ifdef DEBUG_MEMMANAGER
235 ASSERT(piRow->Size()==iMatSize);
236 ASSERT(piCol->Size()==iMatSize);
237 ASSERT(pdMat->Size()==iMatSize);
246 #ifdef DEBUG_MEMMANAGER
258 bool bLUFactor(
void) {
269 DEBUGCOUT(
"Calling ma28ad_()," << std::endl
270 <<
"iN = " << iN << std::endl
271 <<
"iNonZeroes = " << iNonZeroes << std::endl
272 <<
"pdMat = " << *ppdMat << std::endl
273 <<
"iLicn = " << iLicn << std::endl
274 <<
"piRow = " << *ppiRow << std::endl
275 <<
"iLirn = " << iLirn << std::endl
276 <<
"piCol = " << *ppiCol << std::endl
277 <<
"dU = " << dU << std::endl
278 <<
"piKeep = " << piKeep << std::endl
279 <<
"piW = " << piW << std::endl
280 <<
"iFlag = " << iFlag << std::endl);
282 __FC_DECL__(
ma28ad)(&iN, &iNonZeroes, &((*pdMat)[0]),
283 &iLicn, &((*piRow)[0]),
284 &iLirn, &((*piCol)[0]),
285 &dU, piKeep, piW, pdW,
289 silent_cerr(sLUClassName
290 <<
": error during factorization, code "
291 << iFlag << std::endl);
292 throw ErrFactorization(iFlag);
307 __FC_DECL__(
ma28cd)(&iN, &((*pdMat)[0]), &iLicn, &((*piCol)[0]),
308 piKeep, pdRhs, pdW, &iMtype);
326 std::vector<integer> iRow;
329 std::vector<integer> iCol;
332 std::vector<integer> iColStart;
333 std::vector<doublereal> dMat;
334 std::vector<doublereal> dVec;
352 HarwellSparseSolutionManager(
integer iSize,
357 ~HarwellSparseSolutionManager(
void);
361 void IsValid(
void)
const;
virtual VectorHandler * pResHdl(void) const =0
doublereal * pdSetSolVec(doublereal *pd)
#define MBDYN_EXCEPT_ARGS_PASSTHRU
#define SAFEDELETEARR(pnt)
#define MBDYN_EXCEPT_ARGS_DECL
int ma28cd(integer *n, doublereal *a, integer *licn, integer *icn, integer *ikeep, doublereal *rhs, doublereal *w, integer *mtype)
virtual MatrixHandler * pMatHdl(void) const =0
doublereal * pdSetResVec(doublereal *pd)
virtual void MatrReset(void)=0
virtual void Solve(void)=0
#define ASSERT(expression)
#define defaultMemoryManager
int ma28ad(integer *n, integer *nz, doublereal *a, integer *licn, integer *irn, integer *lirn, integer *icn, doublereal *u, integer *ikeep, integer *iw, doublereal *w, integer *iflag)
#define SAFENEWARR(pnt, item, sz)
virtual VectorHandler * pSolHdl(void) const =0