48 SLU::SuperMatrix
A,
B,
X,
L,
U;
81 for(
int i = 0; i < NumMyCols; i++ )
83 for(
int i = 0; i < NumMyEqs; i++ )
86 for(
int j = 0; j < NumIndices; j++ )
90 for(
int i = 0; i < NumMyCols; i++ )
102 for(
int i=0; i<NumMyCols; i++) {
123 X_->ExtractView( &rhs_x, &LDA_x );
124 dCreate_Dense_Matrix( &(
data_->
X), m, 1, rhs_x, m, SLU_DN, SLU_D, SLU_GE);
125 B_->ExtractView( &rhs_b, &LDA_b );
126 dCreate_Dense_Matrix( &(
data_->
B), m, 1, rhs_b, m, SLU_DN, SLU_D, SLU_GE);
133 ferr_ =
new double[1];
134 berr_ =
new double[1];
142 SLU::Destroy_SuperMatrix_Store( &(
data_->
A) );
143 SLU::Destroy_SuperMatrix_Store( &(
data_->
B) );
144 SLU::Destroy_SuperMatrix_Store( &(
data_->
X) );
184 for (
int i = 0; i < NumMyCols; i++ )
187 for (
int i = 0; i < NumMyEqs; i++ )
191 for (
int j = 0; j < NumIndices; j++ )
193 int TransRow = xIndices[j];
216 int permt = perm_type;
217 if( m < 3 ) permt = 0;
227 if( Verbose ) cout <<
"MATRIX COPIED!" << endl;
231 char fact, trans, refact, equed;
233 if( Trans ) trans =
'T';
236 if( Equil ) fact =
'E';
247 if( !Factor ) fact =
'F';
250 if( Equil ) equed =
'B';
257 if( Verbose ) cout <<
"TRANS: " << trans << endl;
258 if( Verbose ) cout <<
"REFACT: " << refact << endl;
265 if( info ) cout <<
"WARNING: SuperLU returned with error code = " << info << endl;
269 cout <<
"SYSTEM DIRECT SOLVED!" << endl;
271 cout <<
"SuperLU INFO: " << info <<
"\n\n";
274 cout <<
"SuperLU Memory Usage\n";
275 cout <<
"--------------------\n";
279 cout <<
"--------------------\n\n";
281 if (m<200) dPrint_CompCol_Matrix(
"A", &(
data_->
A));
285 if (m<200) dPrint_Dense_Matrix(
"B", &(
data_->
B));
286 if (m<200) dPrint_Dense_Matrix(
"X", &(
data_->
X));
~Epetra_SLU()
Epetra_SLU Destructor.
int GlobalMaxNumIndices() const
Epetra_MultiVector * GetLHS() const
Epetra_MultiVector * GetRHS() const
int NumGlobalRows() const
SLU::mem_usage_t mem_usage
int ExtractMyRowView(int MyRow, int &NumEntries, double *&Values, int *&Indices) const
SLU::factor_param_t iparam
int NumGlobalCols() const
int ExtractMyRowView(int LocalRow, int &NumIndices, int *&Indices) const
int Solve(bool Verbose=false, bool Equil=true, bool Factor=true, int perm_type=2, double pivot_thresh=-1, bool Refact=true, bool Trans=false)
All computation is performed during the call to Solve()
int GRID(int LRID_in) const
Epetra_Operator * GetOperator() const
const Epetra_CrsGraph & Graph() const
Epetra_SLU(Epetra_LinearProblem *Problem, int fill_fac=-1, int panel_size=-1, int relax=-1)
Epetra_SLU Constructor.