133 if (pastix_data == NULL) {
134 pastix_print_error(
"pastix_getSchur: wrong pastix_data parameter" );
138 pastix_print_error(
"pastix_getSchur: S parameter" );
142 pastix_print_error(
"pastix_getSchur: lds parameter" );
145 if ( !(pastix_data->
steps & STEP_NUMFACT) ) {
146 pastix_print_error(
"pastix_getSchur: All steps from pastix_task_init() to pastix_task_numfact() have to be called before calling this function" );
149 #if defined(PASTIX_WITH_MPI)
152 pastix_print_error(
"pastix_getSchur: Schur complement is not available yet with multiple MPI processes\n" );
158 iparm = pastix_data->
iparm;
166 case PastixComplex32:
169 case PastixComplex64:
229 if ( pastix_data == NULL ) {
230 pastix_print_error(
"pastixRhsSchurGet: wrong pastix_data parameter" );
233 if ( rhsB == NULL ) {
234 pastix_print_error(
"pastixRhsSchurGet: wrong rhsB parameter" );
238 pastix_print_error(
"pastixRhsSchurGet: wrong b parameter" );
247 pastix_print_error(
"pastixRhsSchurGet: wrong m parameter expecting %ld but was %ld\n",
248 (
long)mschur, (
long)m );
251 if ( n != rhsB->
n ) {
252 pastix_print_error(
"pastixRhsSchurGet: wrong n parameter expecting %ld but was %ld\n",
253 (
long)rhsB->
n, (
long)n );
257 pastix_print_error(
"pastixRhsSchurGet: wrong ldb parameter\n" );
261 bptr = ((
char *)rhsB->
b) + cblk->
lcolidx * pastix_size_of( rhsB->
flttype );
265 rc = LAPACKE_zlacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, (pastix_complex64_t *)bptr, rhsB->
ld, B, ldb );
268 rc = LAPACKE_clacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, (
pastix_complex32_t *)bptr, rhsB->
ld, B, ldb );
271 rc = LAPACKE_dlacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, (
double *)bptr, rhsB->
ld, B, ldb );
274 rc = LAPACKE_slacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, (
float *)bptr, rhsB->
ld, B, ldb );
277 pastix_print_error(
"pastixRhsSchurGet: unknown flttype\n" );
331 if ( pastix_data == NULL ) {
332 pastix_print_error(
"pastixRhsSchurSet: wrong pastix_data parameter" );
335 if ( rhsB == NULL ) {
336 pastix_print_error(
"pastixRhsSchurSet: wrong rhsB parameter" );
340 pastix_print_error(
"pastixRhsSchurSet: wrong b parameter" );
349 pastix_print_error(
"pastixRhsSchurSet: wrong m parameter expecting %ld but was %ld\n",
350 (
long)mschur, (
long)m );
353 if ( n != rhsB->
n ) {
354 pastix_print_error(
"pastixRhsSchurSet: wrong n parameter expecting %ld but was %ld\n",
355 (
long)rhsB->
n, (
long)n );
359 pastix_print_error(
"pastixRhsSchurSet: wrong ldb parameter\n" );
363 bptr = ((
char *)rhsB->
b) + cblk->
lcolidx * pastix_size_of( rhsB->
flttype );
367 rc = LAPACKE_zlacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, B, ldb, (pastix_complex64_t *)bptr, rhsB->
ld );
370 rc = LAPACKE_clacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, B, ldb, (
pastix_complex32_t *)bptr, rhsB->
ld );
373 rc = LAPACKE_dlacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, B, ldb, (
double *)bptr, rhsB->
ld );
376 rc = LAPACKE_slacpy_work( LAPACK_COL_MAJOR,
'A', mschur, n, B, ldb, (
float *)bptr, rhsB->
ld );
379 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.
void pastixIsolateUnknowns(pastix_data_t *pastix_data, pastix_int_t n, const pastix_int_t *list)
Set a list of unknowns that needs to be isolated and pushed at the end of the ordering before the Sch...
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
pastix_int_t * zeros_list
Main PaStiX data structure.
Main PaStiX RHS structure.
SolverCblk *restrict cblktab
Solver column block structure.
Solver column block structure.