99 if (pastix_data == NULL) {
100 pastix_print_error(
"pastix_getSchur: wrong pastix_data parameter" );
104 pastix_print_error(
"pastix_getSchur: S parameter" );
108 pastix_print_error(
"pastix_getSchur: lds parameter" );
111 if ( !(pastix_data->
steps & STEP_NUMFACT) ) {
112 pastix_print_error(
"pastix_getSchur: All steps from pastix_task_init() to pastix_task_numfact() have to be called before calling this function" );
115 #if defined(PASTIX_WITH_MPI)
118 pastix_print_error(
"pastix_getSchur: Schur complement is not available yet with multiple MPI processes\n" );
124 iparm = pastix_data->
iparm;
132 case PastixComplex32:
135 case PastixComplex64:
195 if ( pastix_data == NULL ) {
196 pastix_print_error(
"pastixRhsSchurGet: wrong pastix_data parameter" );
199 if ( rhsB == NULL ) {
200 pastix_print_error(
"pastixRhsSchurGet: wrong rhsB parameter" );
204 pastix_print_error(
"pastixRhsSchurGet: wrong b parameter" );
213 pastix_print_error(
"pastixRhsSchurGet: wrong m parameter expecting %ld but was %ld\n",
214 (
long)mschur, (
long)m );
217 if ( n != rhsB->
n ) {
218 pastix_print_error(
"pastixRhsSchurGet: wrong n parameter expecting %ld but was %ld\n",
219 (
long)rhsB->
n, (
long)n );
223 pastix_print_error(
"pastixRhsSchurGet: wrong ldb parameter\n" );
227 bptr = ((
char *)rhsB->
b) + cblk->
lcolidx * pastix_size_of( rhsB->
flttype );
231 rc = LAPACKE_zlacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, (pastix_complex64_t *)bptr, rhsB->
ld, B, ldb );
234 rc = LAPACKE_clacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, (
pastix_complex32_t *)bptr, rhsB->
ld, B, ldb );
237 rc = LAPACKE_dlacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, (
double *)bptr, rhsB->
ld, B, ldb );
240 rc = LAPACKE_slacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, (
float *)bptr, rhsB->
ld, B, ldb );
243 pastix_print_error(
"pastixRhsSchurGet: unknown flttype\n" );
297 if ( pastix_data == NULL ) {
298 pastix_print_error(
"pastixRhsSchurSet: wrong pastix_data parameter" );
301 if ( rhsB == NULL ) {
302 pastix_print_error(
"pastixRhsSchurSet: wrong rhsB parameter" );
306 pastix_print_error(
"pastixRhsSchurSet: wrong b parameter" );
315 pastix_print_error(
"pastixRhsSchurSet: wrong m parameter expecting %ld but was %ld\n",
316 (
long)mschur, (
long)m );
319 if ( n != rhsB->
n ) {
320 pastix_print_error(
"pastixRhsSchurSet: wrong n parameter expecting %ld but was %ld\n",
321 (
long)rhsB->
n, (
long)n );
325 pastix_print_error(
"pastixRhsSchurSet: wrong ldb parameter\n" );
329 bptr = ((
char *)rhsB->
b) + cblk->
lcolidx * pastix_size_of( rhsB->
flttype );
333 rc = LAPACKE_zlacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, B, ldb, (pastix_complex64_t *)bptr, rhsB->
ld );
336 rc = LAPACKE_clacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, B, ldb, (
pastix_complex32_t *)bptr, rhsB->
ld );
339 rc = LAPACKE_dlacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, B, ldb, (
double *)bptr, rhsB->
ld );
342 rc = LAPACKE_slacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, B, ldb, (
float *)bptr, rhsB->
ld );
345 pastix_print_error(
"pastixRhsSchurSet: unknown flttype\n" );
BEGIN_C_DECLS typedef int pastix_int_t
float _Complex pastix_complex32_t
void coeftab_sgetschur(const SolverMatrix *solvmtx, float *S, pastix_int_t lds)
Extract the Schur complement.
void coeftab_dgetschur(const SolverMatrix *solvmtx, double *S, pastix_int_t lds)
Extract the Schur complement.
void coeftab_zgetschur(const SolverMatrix *solvmtx, pastix_complex64_t *S, pastix_int_t lds)
Extract the Schur complement.
void coeftab_cgetschur(const SolverMatrix *solvmtx, pastix_complex32_t *S, pastix_int_t lds)
Extract the Schur complement.
@ PASTIX_ERR_BADPARAMETER
void pastixSetSchurUnknownList(pastix_data_t *pastix_data, pastix_int_t n, const pastix_int_t *list)
Set the list of unknowns that belongs to the schur complement.
int pastixGetSchur(const pastix_data_t *pastix_data, void *S, pastix_int_t lds)
Return the Schur complement.
int pastixRhsSchurSet(const pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, void *B, pastix_int_t ldb, pastix_rhs_t rhsB)
Set the vector in an RHS data structure.
int pastixRhsSchurGet(const pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, pastix_rhs_t rhsB, void *B, pastix_int_t ldb)
Get the vector in an RHS data structure.
pastix_coeftype_t flttype
pastix_int_t * schur_list
Main PaStiX data structure.
Main PaStiX RHS structure.
SolverCblk *restrict cblktab
Solver column block structure.
Solver column block structure.