79 TaucsSolver::TaucsSolver(
const integer &size)
91 TaucsSolver::~TaucsSolver(
void)
95 taucs_linsolve(NULL,&Factorization,0, NULL,NULL,NULL,NULL);
105 taucs_linsolve(NULL,&Factorization,0, NULL,NULL,NULL,NULL);
109 bHasBeenReset =
true;
113 TaucsSolver::Solve(
void)
const
116 const_cast<TaucsSolver *
>(
this)->
Factor();
117 bHasBeenReset =
false;
129 status = taucs_linsolve(&A, &Factorization, 1,
134 if (status != TAUCS_SUCCESS) {
135 silent_cerr(
"Taucs back-solve failed" << std::endl);
141 TaucsSolver::Factor(
void)
160 char * options_factor_prevordering[] = {
161 "taucs.factor.mf=true",
162 "taucs.factor.ordering=colamd",
163 "taucs.factor.symbolic=false",
165 char * options_factor_ordering[] = {
166 "taucs.factor.mf=true",
167 "taucs.factor.ordering=colamd",
168 "taucs.factor.symbolic=true",
172 opts = options_factor_prevordering;
174 opts = options_factor_ordering;
177 status = taucs_linsolve(&A, &Factorization, 0, NULL, NULL, opts, NULL);
178 if (status != TAUCS_SUCCESS) {
179 if (Symbolic ==
true) {
182 const_cast<TaucsSolver *
>(
this)->
Factor();
185 silent_cerr(
"Taucs factorization failed" << std::endl);
194 std::vector<doublereal>& Ax,
195 std::vector<integer>& Ai,
196 std::vector<integer>& Ac,
197 std::vector<integer>& Ap)
const
199 if (!bHasBeenReset) {
211 A.flags = TAUCS_DOUBLE;
221 TaucsSparseSolutionManager::TaucsSparseSolutionManager(
integer Dim)
230 (void)pLS->pdSetResVec(&b[0]);
231 (void)pLS->pdSetSolVec(&x[0]);
232 pLS->SetSolutionManager(
this);
235 TaucsSparseSolutionManager::~TaucsSparseSolutionManager(
void)
241 TaucsSparseSolutionManager::MatrReset(
void)
247 TaucsSparseSolutionManager::MakeCompressedColumnForm(
void)
249 pLS->MakeCompactForm(A, Ax, Ai, Adummy, Ap);
254 TaucsSparseSolutionManager::Solve(
void)
256 MakeCompressedColumnForm();
262 TaucsSparseSolutionManager::pMatHdl(
void)
const
269 TaucsSparseSolutionManager::pResHdl(
void)
const
276 TaucsSparseSolutionManager::pSolHdl(
void)
const
284 TaucsSparseCCSolutionManager<CC>::TaucsSparseCCSolutionManager(
integer Dim)
285 : TaucsSparseSolutionManager(Dim),
293 TaucsSparseCCSolutionManager<CC>::~TaucsSparseCCSolutionManager(
void)
302 TaucsSparseCCSolutionManager<CC>::MatrReset(
void)
310 TaucsSparseCCSolutionManager<CC>::MakeCompressedColumnForm(
void)
313 pLS->MakeCompactForm(A, Ax, Ai, Adummy, Ap);
326 TaucsSparseCCSolutionManager<CC>::MatrInitialize(
void)
339 TaucsSparseCCSolutionManager<CC>::pMatHdl(
void)
const
349 template class TaucsSparseCCSolutionManager<CColMatrixHandler<0> >;
350 template class TaucsSparseCCSolutionManager<DirCColMatrixHandler<0> >;
virtual integer MakeCompressedColumnForm(doublereal *const Ax, integer *const Ai, integer *const Ap, int offset=0) const =0
#define MBDYN_EXCEPT_ARGS
void Reset(scalar_func_type &d)
#define ASSERT(expression)
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)