Actual source code: ex87.c
1: static char help[] = "Solves a saddle-point linear system using PCHPDDM.\n\n";
3: #include <petscksp.h>
4: #include <petsc/private/petscimpl.h>
6: static PetscErrorCode MatAndISLoad(const char *prefix, const char *identifier, Mat A, IS is, Mat N, PetscMPIInt size);
8: int main(int argc, char **args)
9: {
10: Vec b, x; /* computed solution and RHS */
11: Mat A[4], aux[2], nest; /* linear system matrix */
12: KSP ksp, *subksp; /* linear solver context */
13: PC pc;
14: IS is[2];
15: PetscMPIInt size;
16: PetscInt m, M, n, N, id = 0;
17: PetscViewer viewer;
18: const char *const system[] = {"elasticity", "stokes", "diffusion", "lagrange"};
19: /* "elasticity":
20: * 2D linear elasticity with rubber-like and steel-like material coefficients, i.e., Poisson's ratio \in {0.4999, 0.35} and Young's modulus \in {0.01 GPa, 200.0 GPa}
21: * discretized by order 2 (resp. 0) Lagrange finite elements in displacements (resp. pressure) on a triangle mesh
22: * "stokes":
23: * 2D lid-driven cavity with constant viscosity
24: * discretized by order 2 (resp. 1) Lagrange finite elements, i.e., lowest-order Taylor--Hood finite elements, in velocities (resp. pressure) on a triangle mesh
25: * if the option -empty_A11 is not set (or set to false), a pressure with a zero mean-value is computed
26: * "diffusion":
27: * 2D primal-dual nonsymmetric diffusion equation
28: * discretized by order 2 (resp. 1) Lagrange finite elements in primal (resp. dual) unknowns on a triangle mesh
29: * "lagrange":
30: * 2D linear elasticity with essential boundary conditions imposed through a Lagrange multiplier
31: */
32: char dir[PETSC_MAX_PATH_LEN], prefix[PETSC_MAX_PATH_LEN];
33: PCType type;
34: PetscBool flg[4] = {PETSC_FALSE, PETSC_FALSE, PETSC_FALSE, PETSC_FALSE};
36: PetscFunctionBeginUser;
37: PetscCall(PetscInitialize(&argc, &args, NULL, help));
38: PetscCallMPI(MPI_Comm_size(PETSC_COMM_WORLD, &size));
39: PetscCall(PetscOptionsGetEList(NULL, NULL, "-system", system, PETSC_STATIC_ARRAY_LENGTH(system), &id, NULL));
40: if (id == 1) PetscCall(PetscOptionsGetBool(NULL, NULL, "-empty_A11", flg, NULL));
41: if (id != 3) PetscCheck(size == 4, PETSC_COMM_WORLD, PETSC_ERR_WRONG_MPI_SIZE, "This example requires 4 processes");
42: else PetscCheck(id == 3 && size == 2, PETSC_COMM_WORLD, PETSC_ERR_WRONG_MPI_SIZE, "This example requires 2 processes");
43: for (PetscInt i = 0; i < 2; ++i) {
44: PetscCall(MatCreate(PETSC_COMM_WORLD, A + (i ? 3 : 0)));
45: if (id < 2 || (id == 3 && i == 0)) {
46: PetscCall(ISCreate(PETSC_COMM_SELF, is + i));
47: PetscCall(MatCreate(PETSC_COMM_SELF, aux + i));
48: } else {
49: is[i] = NULL;
50: aux[i] = NULL;
51: }
52: }
53: PetscCall(PetscStrncpy(dir, ".", sizeof(dir)));
54: PetscCall(PetscOptionsGetString(NULL, NULL, "-load_dir", dir, sizeof(dir), NULL));
55: /* loading matrices and auxiliary data for the diagonal blocks */
56: PetscCall(PetscSNPrintf(prefix, sizeof(prefix), "%s/%s", dir, id == 3 ? "D" : (id == 2 ? "E" : (id == 1 ? "B" : "A"))));
57: PetscCall(MatAndISLoad(prefix, "00", A[0], is[0], aux[0], size));
58: PetscCall(MatAndISLoad(prefix, "11", A[3], is[1], aux[1], size));
59: /* loading the off-diagonal block with a coherent row/column layout */
60: PetscCall(MatCreate(PETSC_COMM_WORLD, A + 2));
61: PetscCall(MatGetLocalSize(A[0], &n, NULL));
62: PetscCall(MatGetSize(A[0], &N, NULL));
63: PetscCall(MatGetLocalSize(A[3], &m, NULL));
64: PetscCall(MatGetSize(A[3], &M, NULL));
65: PetscCall(MatSetSizes(A[2], m, n, M, N));
66: PetscCall(PetscSNPrintf(prefix, sizeof(prefix), "%s/%s10.dat", dir, id == 3 ? "D" : (id == 2 ? "E" : (id == 1 ? "B" : "A"))));
67: PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, prefix, FILE_MODE_READ, &viewer));
68: PetscCall(MatLoad(A[2], viewer));
69: PetscCall(PetscViewerDestroy(&viewer));
70: if (id != 2) {
71: /* transposing the off-diagonal block */
72: PetscCall(PetscOptionsGetBool(NULL, NULL, "-transpose", flg + 1, NULL));
73: PetscCall(PetscOptionsGetBool(NULL, NULL, "-permute", flg + 2, NULL));
74: PetscCall(PetscOptionsGetBool(NULL, NULL, "-explicit", flg + 3, NULL));
75: if (flg[1]) {
76: if (flg[2]) {
77: PetscCall(MatTranspose(A[2], MAT_INITIAL_MATRIX, A + 1));
78: PetscCall(MatDestroy(A + 2));
79: }
80: if (!flg[3]) PetscCall(MatCreateTranspose(A[2 - flg[2]], A + 1 + flg[2]));
81: else PetscCall(MatTranspose(A[2 - flg[2]], MAT_INITIAL_MATRIX, A + 1 + flg[2]));
82: } else {
83: if (flg[2]) {
84: PetscCall(MatHermitianTranspose(A[2], MAT_INITIAL_MATRIX, A + 1));
85: PetscCall(MatDestroy(A + 2));
86: }
87: if (!flg[3]) PetscCall(MatCreateHermitianTranspose(A[2 - flg[2]], A + 1 + flg[2]));
88: else PetscCall(MatHermitianTranspose(A[2 - flg[2]], MAT_INITIAL_MATRIX, A + 1 + flg[2]));
89: }
90: } else {
91: PetscCall(MatCreate(PETSC_COMM_WORLD, A + 1));
92: PetscCall(MatSetSizes(A[1], n, m, N, M));
93: PetscCall(PetscSNPrintf(prefix, sizeof(prefix), "%s/E01.dat", dir));
94: PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, prefix, FILE_MODE_READ, &viewer));
95: PetscCall(MatLoad(A[1], viewer));
96: PetscCall(PetscViewerDestroy(&viewer));
97: PetscCall(MatConvert(A[0], MATBAIJ, MAT_INPLACE_MATRIX, A));
98: }
99: if (flg[0]) PetscCall(MatDestroy(A + 3));
100: else {
101: PetscCall(PetscOptionsGetBool(NULL, NULL, "-diagonal_A11", flg, NULL));
102: if (flg[0]) {
103: PetscCall(MatDestroy(A + 3));
104: PetscCall(MatCreateConstantDiagonal(PETSC_COMM_WORLD, m, m, M, M, PETSC_SMALL, A + 3));
105: }
106: }
107: flg[1] = PETSC_FALSE;
108: PetscCall(PetscOptionsGetBool(NULL, NULL, "-all_transpose", flg + 1, NULL));
109: if (flg[1] && flg[2]) {
110: Mat S;
112: PetscCall(MatTranspose(A[1], MAT_INITIAL_MATRIX, &S));
113: PetscCall(MatDestroy(A + 1));
114: PetscCall(MatCreateHermitianTranspose(S, A + 1));
115: PetscCall(MatDestroy(&S));
116: }
117: /* global coefficient matrix */
118: PetscCall(MatCreateNest(PETSC_COMM_WORLD, 2, NULL, 2, NULL, A, &nest));
119: PetscCall(KSPCreate(PETSC_COMM_WORLD, &ksp));
120: PetscCall(KSPSetOperators(ksp, nest, nest));
121: PetscCall(KSPGetPC(ksp, &pc));
122: /* outer preconditioner */
123: PetscCall(PCSetType(pc, PCFIELDSPLIT));
124: PetscCall(PCFieldSplitSetType(pc, PC_COMPOSITE_SCHUR));
125: PetscCall(PCFieldSplitSetSchurPre(pc, PC_FIELDSPLIT_SCHUR_PRE_SELF, NULL));
126: PetscCall(PCSetFromOptions(pc));
127: PetscCall(PCGetType(pc, &type));
128: PetscCall(PetscStrcmp(type, PCFIELDSPLIT, flg + 1));
129: if (flg[1]) {
130: PetscCall(PCSetUp(pc));
131: PetscCall(PCFieldSplitGetSubKSP(pc, &n, &subksp));
132: PetscCall(KSPGetPC(subksp[0], &pc));
133: /* inner preconditioner associated to top-left block */
134: #if defined(PETSC_HAVE_HPDDM) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES) && defined(PETSC_USE_SHARED_LIBRARIES)
135: PetscCall(PCSetType(pc, PCHPDDM));
136: PetscCall(PCHPDDMSetAuxiliaryMat(pc, is[0], aux[0], NULL, NULL));
137: #endif
138: PetscCall(PCSetFromOptions(pc));
139: PetscCall(KSPGetPC(subksp[1], &pc));
140: /* inner preconditioner associated to Schur complement, which will be set internally to PCKSP (or PCASM if the Schur complement is centralized on a single process) */
141: #if defined(PETSC_HAVE_HPDDM) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES) && defined(PETSC_USE_SHARED_LIBRARIES)
142: PetscCall(PCSetType(pc, PCHPDDM));
143: if (!flg[0]) PetscCall(PCHPDDMSetAuxiliaryMat(pc, is[1], aux[1], NULL, NULL));
144: #endif
145: PetscCall(PCSetFromOptions(pc));
146: PetscCall(PetscFree(subksp));
147: } else PetscCall(MatSetBlockSize(A[0], 2));
148: PetscCall(KSPSetFromOptions(ksp));
149: PetscCall(MatCreateVecs(nest, &b, &x));
150: if (id != 2) {
151: PetscCall(PetscSNPrintf(prefix, sizeof(prefix), "%s/rhs_%s.dat", dir, id == 3 ? "D" : (id == 1 ? "B" : "A")));
152: PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, prefix, FILE_MODE_READ, &viewer));
153: PetscCall(VecLoad(b, viewer));
154: PetscCall(PetscViewerDestroy(&viewer));
155: } else PetscCall(VecSetRandom(b, NULL));
156: PetscCall(KSPSolve(ksp, b, x));
157: flg[1] = PETSC_FALSE;
158: PetscCall(PetscOptionsGetBool(NULL, NULL, "-viewer", flg + 1, NULL));
159: if (flg[1]) PetscCall(PCView(pc, PETSC_VIEWER_STDOUT_WORLD));
160: flg[1] = PETSC_FALSE;
161: PetscCall(PetscOptionsGetBool(NULL, NULL, "-successive_solves", flg + 1, NULL));
162: if (flg[1]) {
163: KSPConvergedReason reason[2];
164: PetscInt iterations[2];
165: PetscCall(KSPGetConvergedReason(ksp, reason));
166: PetscCall(KSPGetTotalIterations(ksp, iterations));
167: PetscCall(KSPMonitorCancel(ksp));
168: PetscCall(PetscOptionsClearValue(NULL, "-ksp_monitor"));
169: PetscCall(PetscObjectStateIncrease((PetscObject)nest));
170: PetscCall(KSPGetPC(ksp, &pc));
171: PetscCall(PCSetUp(pc)); /* update PCFIELDSPLIT submatrices */
172: PetscCall(PCFieldSplitGetSubKSP(pc, &n, &subksp));
173: PetscCall(KSPGetPC(subksp[0], &pc));
174: #if defined(PETSC_HAVE_HPDDM) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES) && defined(PETSC_USE_SHARED_LIBRARIES)
175: PetscCall(PCHPDDMSetAuxiliaryMat(pc, is[0], aux[0], NULL, NULL));
176: #endif
177: PetscCall(PCSetFromOptions(pc));
178: PetscCall(KSPGetPC(subksp[1], &pc));
179: #if defined(PETSC_HAVE_HPDDM) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES) && defined(PETSC_USE_SHARED_LIBRARIES)
180: PetscCall(PCSetType(pc, PCHPDDM)); /* may have been set to PCKSP internally (or PCASM if the Schur complement is centralized on a single process), so need to enforce the proper PCType */
181: if (!flg[0]) PetscCall(PCHPDDMSetAuxiliaryMat(pc, is[1], aux[1], NULL, NULL));
182: #endif
183: PetscCall(PCSetFromOptions(pc));
184: PetscCall(PetscFree(subksp));
185: PetscCall(KSPSolve(ksp, b, x));
186: PetscCall(KSPGetConvergedReason(ksp, reason + 1));
187: PetscCall(KSPGetTotalIterations(ksp, iterations + 1));
188: iterations[1] -= iterations[0];
189: PetscCheck(reason[0] == reason[1] && PetscAbs(iterations[0] - iterations[1]) <= 3, PetscObjectComm((PetscObject)ksp), PETSC_ERR_PLIB, "Successive calls to KSPSolve() did not converge for the same reason (%s v. %s) or with the same number of iterations (+/- 3, %" PetscInt_FMT " v. %" PetscInt_FMT ")", KSPConvergedReasons[reason[0]], KSPConvergedReasons[reason[1]], iterations[0], iterations[1]);
190: }
191: PetscCall(VecDestroy(&x));
192: PetscCall(VecDestroy(&b));
193: PetscCall(KSPDestroy(&ksp));
194: PetscCall(MatDestroy(&nest));
195: PetscCall(MatDestroy(A + 1));
196: PetscCall(MatDestroy(A + 2));
197: for (PetscInt i = 0; i < 2; ++i) {
198: PetscCall(MatDestroy(A + (i ? 3 : 0)));
199: PetscCall(MatDestroy(aux + i));
200: PetscCall(ISDestroy(is + i));
201: }
202: PetscCall(PetscFinalize());
203: return 0;
204: }
206: PetscErrorCode MatAndISLoad(const char *prefix, const char *identifier, Mat A, IS is, Mat aux, PetscMPIInt size)
207: {
208: Mat tmp[3];
209: IS sizes;
210: const PetscInt *idx;
211: PetscInt m;
212: PetscLayout map;
213: PetscViewer viewer;
214: char name[PETSC_MAX_PATH_LEN];
216: PetscFunctionBeginUser;
217: PetscCall(PetscSNPrintf(name, sizeof(name), "%s%s_sizes_%d.dat", prefix, identifier, size));
218: PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, name, FILE_MODE_READ, &viewer));
219: PetscCall(ISCreate(PETSC_COMM_WORLD, &sizes));
220: PetscCall(ISLoad(sizes, viewer));
221: PetscCall(ISSetBlockSize(sizes, is && aux ? 5 : 4)); /* not mandatory but useful to check for proper sizes */
222: PetscCall(ISGetIndices(sizes, &idx));
223: PetscCall(MatSetSizes(A, idx[0], idx[1], idx[2], idx[3]));
224: if (is && aux) {
225: PetscCall(MatCreate(PETSC_COMM_WORLD, tmp));
226: PetscCall(MatSetSizes(tmp[0], idx[4], idx[4], PETSC_DETERMINE, PETSC_DETERMINE));
227: PetscCall(MatSetUp(tmp[0]));
228: }
229: PetscCall(ISRestoreIndices(sizes, &idx));
230: PetscCall(ISDestroy(&sizes));
231: PetscCall(PetscViewerDestroy(&viewer));
232: PetscCall(PetscSNPrintf(name, sizeof(name), "%s%s.dat", prefix, identifier));
233: PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, name, FILE_MODE_READ, &viewer));
234: PetscCall(MatLoad(A, viewer));
235: PetscCall(PetscViewerDestroy(&viewer));
236: if (is && aux) {
237: PetscCall(ISCreate(PETSC_COMM_WORLD, &sizes));
238: PetscCall(MatGetLayouts(tmp[0], &map, NULL));
239: PetscCall(ISSetLayout(sizes, map));
240: PetscCall(PetscSNPrintf(name, sizeof(name), "%s%s_is_%d.dat", prefix, identifier, size));
241: PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, name, FILE_MODE_READ, &viewer));
242: PetscCall(ISLoad(sizes, viewer));
243: PetscCall(ISGetLocalSize(sizes, &m));
244: PetscCall(ISGetIndices(sizes, &idx));
245: PetscCall(ISSetType(is, ISGENERAL));
246: PetscCall(ISGeneralSetIndices(is, m, idx, PETSC_COPY_VALUES));
247: PetscCall(ISRestoreIndices(sizes, &idx));
248: PetscCall(ISDestroy(&sizes));
249: PetscCall(PetscViewerDestroy(&viewer));
250: PetscCall(PetscSNPrintf(name, sizeof(name), "%s%s_aux_%d.dat", prefix, identifier, size));
251: PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, name, FILE_MODE_READ, &viewer));
252: PetscCall(MatLoad(tmp[0], viewer));
253: PetscCall(PetscViewerDestroy(&viewer));
254: PetscCall(MatGetDiagonalBlock(tmp[0], tmp + 1));
255: PetscCall(MatDuplicate(tmp[1], MAT_COPY_VALUES, tmp + 2));
256: PetscCall(MatHeaderReplace(aux, tmp + 2));
257: PetscCall(MatDestroy(tmp));
258: }
259: PetscFunctionReturn(PETSC_SUCCESS);
260: }
262: /*TEST
264: testset:
265: requires: datafilespath hpddm slepc double !complex !defined(PETSC_USE_64BIT_INDICES) defined(PETSC_HAVE_DYNAMIC_LIBRARIES) defined(PETSC_USE_SHARED_LIBRARIES)
266: nsize: 4
267: args: -load_dir ${DATAFILESPATH}/matrices/hpddm/GENEO -ksp_monitor -ksp_rtol 1e-4 -fieldsplit_ksp_max_it 100 -fieldsplit_pc_hpddm_levels_1_eps_nev 10 -fieldsplit_pc_hpddm_levels_1_st_share_sub_ksp -fieldsplit_pc_hpddm_has_neumann -fieldsplit_pc_hpddm_define_subdomains -fieldsplit_1_pc_hpddm_schur_precondition geneo -fieldsplit_pc_hpddm_coarse_pc_type redundant -fieldsplit_pc_hpddm_coarse_redundant_pc_type cholesky -fieldsplit_pc_hpddm_levels_1_sub_pc_type lu -fieldsplit_ksp_type fgmres -ksp_type fgmres -ksp_max_it 10 -fieldsplit_1_pc_hpddm_coarse_correction balanced -fieldsplit_1_pc_hpddm_levels_1_eps_gen_non_hermitian -fieldsplit_1_pc_hpddm_coarse_p 2
268: test:
269: requires: mumps
270: suffix: 1
271: args: -viewer -system {{elasticity stokes}separate output} -fieldsplit_1_pc_hpddm_ksp_pc_side left -fieldsplit_1_pc_hpddm_levels_1_sub_mat_mumps_icntl_26 1
272: filter: grep -v -e "action of " -e " " -e "block size" -e "total: nonzeros=" -e "using I-node" -e "aij" -e "transpose" -e "diagonal" -e "total number of" -e " rows="
273: test:
274: requires: mumps
275: suffix: 2
276: output_file: output/ex87_1_system-stokes.out
277: args: -viewer -system stokes -empty_A11 -transpose {{false true}shared output} -permute {{false true}shared output} -fieldsplit_1_pc_hpddm_ksp_pc_side right -fieldsplit_1_pc_hpddm_coarse_mat_type baij -fieldsplit_1_pc_hpddm_levels_1_sub_mat_mumps_icntl_26 1 -explicit {{false true}shared output}
278: filter: grep -v -e "action of " -e " " -e "block size" -e "total: nonzeros=" -e "using I-node" -e "aij" -e "transpose" -e "diagonal" -e "total number of" -e " rows=" | sed -e "s/ right preconditioning/ left preconditioning/g" -e "s/ using UNPRECONDITIONED/ using PRECONDITIONED/g"
279: test:
280: suffix: 1_petsc
281: args: -system {{elasticity stokes}separate output} -fieldsplit_1_pc_hpddm_ksp_pc_side left -fieldsplit_1_pc_hpddm_levels_1_sub_pc_factor_mat_solver_type petsc -fieldsplit_1_pc_hpddm_levels_1_eps_threshold_absolute 0.3 -permute
282: test:
283: suffix: 2_petsc
284: output_file: output/ex87_1_petsc_system-stokes.out
285: args: -system stokes -empty_A11 -transpose -fieldsplit_1_pc_hpddm_ksp_pc_side right -fieldsplit_1_pc_hpddm_levels_1_sub_pc_factor_mat_solver_type petsc -fieldsplit_1_pc_hpddm_coarse_mat_type baij -fieldsplit_1_pc_hpddm_levels_1_eps_threshold_absolute 0.3 -fieldsplit_1_pc_hpddm_levels_1_sub_pc_factor_shift_type inblocks -successive_solves
286: filter: sed -e "s/type: transpose/type: hermitiantranspose/g"
287: test:
288: suffix: threshold
289: requires: !defined(PETSC_HAVE_MKL_SPARSE_SP2M_FEATURE)
290: output_file: output/ex87_1_petsc_system-elasticity.out
291: args: -fieldsplit_1_pc_hpddm_ksp_pc_side left -fieldsplit_1_pc_hpddm_levels_1_eps_threshold_absolute 0.2 -fieldsplit_1_pc_hpddm_coarse_mat_type {{baij sbaij}shared output} -successive_solves
292: testset:
293: requires: datafilespath hpddm slepc double !complex !defined(PETSC_USE_64BIT_INDICES) defined(PETSC_HAVE_DYNAMIC_LIBRARIES) defined(PETSC_USE_SHARED_LIBRARIES)
294: nsize: 4
295: args: -load_dir ${DATAFILESPATH}/matrices/hpddm/GENEO -ksp_monitor -ksp_rtol 1e-4 -fieldsplit_ksp_max_it 100 -fieldsplit_pc_hpddm_levels_1_st_share_sub_ksp -fieldsplit_pc_hpddm_define_subdomains -fieldsplit_1_pc_hpddm_schur_precondition geneo -fieldsplit_pc_hpddm_coarse_pc_type redundant -fieldsplit_pc_hpddm_coarse_redundant_pc_type cholesky -fieldsplit_pc_hpddm_levels_1_sub_pc_type lu -fieldsplit_ksp_type fgmres -ksp_type fgmres -ksp_max_it 10 -fieldsplit_1_pc_hpddm_coarse_correction balanced -fieldsplit_1_pc_hpddm_levels_1_eps_gen_non_hermitian -fieldsplit_1_pc_hpddm_coarse_p 2 -system stokes -fieldsplit_1_pc_hpddm_ksp_pc_side left -fieldsplit_1_pc_hpddm_levels_1_sub_pc_factor_mat_solver_type petsc -fieldsplit_1_pc_hpddm_levels_1_eps_threshold_absolute 0.3
296: test:
297: suffix: diagonal
298: output_file: output/ex87_1_petsc_system-stokes.out
299: args: -fieldsplit_pc_hpddm_levels_1_eps_nev 10 -fieldsplit_0_pc_hpddm_has_neumann -diagonal_A11 {{false true}shared output}
300: test:
301: suffix: harmonic_overlap_2
302: output_file: output/ex87_1_petsc_system-stokes.out
303: args: -fieldsplit_0_pc_hpddm_harmonic_overlap 2 -fieldsplit_0_pc_hpddm_levels_1_svd_nsv 20 -diagonal_A11 -permute {{false true}shared output} -all_transpose
305: test:
306: requires: datafilespath double !complex !defined(PETSC_USE_64BIT_INDICES) !hpddm !memkind
307: nsize: 4
308: suffix: selfp
309: output_file: output/empty.out
310: filter: grep -v "CONVERGED_RTOL iterations"
311: args: -load_dir ${DATAFILESPATH}/matrices/hpddm/GENEO -system stokes -ksp_rtol 1e-4 -ksp_converged_reason -ksp_max_it 30 -pc_type fieldsplit -pc_fieldsplit_type schur -fieldsplit_ksp_type preonly -pc_fieldsplit_schur_precondition selfp -fieldsplit_pc_type bjacobi -fieldsplit_sub_pc_type lu -transpose {{false true}shared output} -fieldsplit_1_mat_schur_complement_ainv_type lump
313: test:
314: requires: datafilespath hpddm slepc double !complex !defined(PETSC_USE_64BIT_INDICES) defined(PETSC_HAVE_DYNAMIC_LIBRARIES) defined(PETSC_USE_SHARED_LIBRARIES)
315: nsize: 4
316: suffix: nonsymmetric_least_squares
317: output_file: output/empty.out
318: filter: grep -v "CONVERGED_RTOL iterations"
319: args: -load_dir ${DATAFILESPATH}/matrices/hpddm/GENEO -system diffusion -ksp_rtol 1e-4 -ksp_converged_reason -ksp_max_it 20 -pc_type fieldsplit -pc_fieldsplit_type schur -fieldsplit_ksp_type preonly -fieldsplit_0_pc_type pbjacobi -prefix_push fieldsplit_1_ -pc_hpddm_schur_precondition least_squares -pc_hpddm_define_subdomains -prefix_push pc_hpddm_levels_1_ -sub_pc_type lu -sub_pc_factor_shift_type nonzero -eps_nev 5 -eps_gen_non_hermitian -st_share_sub_ksp -prefix_pop -prefix_pop -fieldsplit_1_mat_schur_complement_ainv_type {{diag blockdiag}shared output}
321: test:
322: requires: datafilespath hpddm slepc double !complex !defined(PETSC_USE_64BIT_INDICES) defined(PETSC_HAVE_DYNAMIC_LIBRARIES) defined(PETSC_USE_SHARED_LIBRARIES)
323: nsize: 2
324: suffix: lagrange
325: output_file: output/empty.out
326: filter: grep -v "CONVERGED_RTOL iterations"
327: args: -load_dir ${DATAFILESPATH}/matrices/hpddm/GENEO -ksp_rtol 1e-4 -fieldsplit_ksp_max_it 100 -fieldsplit_0_pc_hpddm_has_neumann -fieldsplit_0_pc_hpddm_levels_1_eps_nev 10 -fieldsplit_0_pc_hpddm_levels_1_st_share_sub_ksp -fieldsplit_0_pc_hpddm_define_subdomains -fieldsplit_1_pc_hpddm_schur_precondition geneo -fieldsplit_0_pc_hpddm_coarse_pc_type redundant -fieldsplit_0_pc_hpddm_coarse_redundant_pc_type cholesky -fieldsplit_0_pc_hpddm_levels_1_sub_pc_type lu -fieldsplit_ksp_type fgmres -ksp_type fgmres -ksp_max_it 10 -system lagrange -transpose {{false true}shared output} -successive_solves
329: test:
330: requires: datafilespath mumps double !complex !defined(PETSC_USE_64BIT_INDICES)
331: nsize: 4
332: suffix: mumps
333: output_file: output/empty.out
334: args: -load_dir ${DATAFILESPATH}/matrices/hpddm/GENEO -ksp_type preonly -system elasticity -pc_type cholesky -mat_mumps_icntl_15 1
336: TEST*/