Home
last modified time | relevance | path

Searched refs:PetscCall (Results 1 – 25 of 2330) sorted by relevance

12345678910>>...94

/petsc/src/dm/tutorials/
H A Dex19.c15 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
17 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "1D -- DM_BOUNDARY_NONE\n")); in main()
18 PetscCall(DMDACreate(PETSC_COMM_WORLD, &da)); in main()
19 PetscCall(DMSetDimension(da, 1)); in main()
20 PetscCall(DMDASetSizes(da, 8, 1, 1)); in main()
21 PetscCall(DMDASetBoundaryType(da, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE)); in main()
22 PetscCall(DMDASetDof(da, 1)); in main()
23 PetscCall(DMDASetStencilWidth(da, 1)); in main()
24 PetscCall(DMDASetOverlap(da, 1, 1, 1)); in main()
25 PetscCall(DMSetFromOptions(da)); in main()
[all …]
/petsc/src/dm/interface/
H A Ddlregisdmdm.c24 PetscCall(PetscFunctionListDestroy(&DMList)); in DMFinalizePackage()
57 PetscCall(PetscClassIdRegister("Distributed Mesh", &DM_CLASSID)); in DMInitializePackage()
58 PetscCall(PetscClassIdRegister("DM Label", &DMLABEL_CLASSID)); in DMInitializePackage()
59 PetscCall(PetscClassIdRegister("Quadrature", &PETSCQUADRATURE_CLASSID)); in DMInitializePackage()
60 PetscCall(PetscClassIdRegister("Mesh Transform", &DMPLEXTRANSFORM_CLASSID)); in DMInitializePackage()
61 PetscCall(PetscClassIdRegister("Swarm Cell DM", &DMSWARMCELLDM_CLASSID)); in DMInitializePackage()
64 PetscCall(MatRegister(MATHYPRESTRUCT, MatCreate_HYPREStruct)); in DMInitializePackage()
65 PetscCall(MatRegister(MATHYPRESSTRUCT, MatCreate_HYPRESStruct)); in DMInitializePackage()
67 PetscCall(PetscSectionSymRegister(PETSCSECTIONSYMLABEL, PetscSectionSymCreate_Label)); in DMInitializePackage()
70 PetscCall(DMRegisterAll()); in DMInitializePackage()
[all …]
/petsc/src/mat/tests/
H A Dex145.c20 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
24 PetscCall(PetscRandomCreate(PETSC_COMM_WORLD, &rand)); in main()
25 PetscCall(PetscRandomSetFromOptions(rand)); in main()
28 PetscCall(PetscOptionsGetInt(NULL, NULL, "-m", &m, NULL)); in main()
30 PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL)); in main()
32 PetscCall(PetscOptionsGetInt(NULL, NULL, "-p", &p, NULL)); in main()
33 PetscCall(PetscOptionsHasName(NULL, NULL, "-mats_view", &mats_view)); in main()
36 PetscCall(PetscPrintf(PETSC_COMM_WORLD, " Create Elemental matrix A\n")); in main()
37 PetscCall(MatCreate(PETSC_COMM_WORLD, &A)); in main()
38 PetscCall(MatSetSizes(A, m, n, PETSC_DECIDE, PETSC_DECIDE)); in main()
[all …]
H A Dex245.c19 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
23 PetscCall(PetscRandomCreate(PETSC_COMM_WORLD, &rand)); in main()
24 PetscCall(PetscRandomSetFromOptions(rand)); in main()
27 PetscCall(PetscOptionsGetInt(NULL, NULL, "-m", &m, NULL)); in main()
29 PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL)); in main()
31 PetscCall(PetscOptionsGetInt(NULL, NULL, "-p", &p, NULL)); in main()
32 PetscCall(PetscOptionsHasName(NULL, NULL, "-mats_view", &mats_view)); in main()
35 PetscCall(PetscPrintf(PETSC_COMM_WORLD, " Create ScaLAPACK matrix A\n")); in main()
36 PetscCall(MatCreate(PETSC_COMM_WORLD, &A)); in main()
37 PetscCall(MatSetSizes(A, m, n, PETSC_DECIDE, PETSC_DECIDE)); in main()
[all …]
H A Dex70.c16 PetscCall(MatDenseGetArrayRead(A, &Aa)); in CheckLocal()
18 PetscCall(MatDenseGetLDA(A, &lda)); in CheckLocal()
19 PetscCall(MatGetLocalSize(A, &m, &n)); in CheckLocal()
25 PetscCall(MatDenseRestoreArrayRead(A, &Aa)); in CheckLocal()
29 PetscCall(MatDenseGetArrayRead(B, &Bb)); in CheckLocal()
31 PetscCall(MatDenseGetLDA(B, &lda)); in CheckLocal()
32 PetscCall(MatGetLocalSize(B, &m, &n)); in CheckLocal()
38 PetscCall(MatDenseRestoreArrayRead(B, &Bb)); in CheckLocal()
57 PetscCall(MatDestroy(&userdata->A)); in proj_destroy()
58 PetscCall(MatDestroy(&userdata->P)); in proj_destroy()
[all …]
H A Dex23.c32 PetscCall(PetscInitialize(&argc, &args, NULL, help)); in main()
36 PetscCall(PetscOptionsGetBool(NULL, NULL, "-symmetric", &symmetric, NULL)); in main()
37 PetscCall(PetscOptionsGetInt(NULL, NULL, "-m", &m, NULL)); in main()
38 PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL)); in main()
39 PetscCall(PetscOptionsGetBool(NULL, NULL, "-negmap", &negmap, NULL)); in main()
40 PetscCall(PetscOptionsGetBool(NULL, NULL, "-repmap", &repmap, NULL)); in main()
41 PetscCall(PetscOptionsGetBool(NULL, NULL, "-permmap", &permute, NULL)); in main()
42 PetscCall(PetscOptionsGetBool(NULL, NULL, "-diffmap", &diffmap, NULL)); in main()
43 PetscCall(PetscOptionsGetBool(NULL, NULL, "-allow_repeated", &allow_repeated, NULL)); in main()
44 PetscCall(PetscOptionsGetBool(NULL, NULL, "-test_matlab", &test_matlab, NULL)); in main()
[all …]
H A Dex125.c19 PetscCall(MatCreate(PETSC_COMM_WORLD, A)); in CreateRandom()
20 PetscCall(MatSetType(*A, MATAIJ)); in CreateRandom()
21 PetscCall(MatSetFromOptions(*A)); in CreateRandom()
22 PetscCall(MatSetSizes(*A, PETSC_DECIDE, PETSC_DECIDE, n, m)); in CreateRandom()
23 PetscCall(MatSeqAIJSetPreallocation(*A, 5, NULL)); in CreateRandom()
24 PetscCall(MatMPIAIJSetPreallocation(*A, 5, NULL, 5, NULL)); in CreateRandom()
25 PetscCall(MatSetRandom(*A, NULL)); in CreateRandom()
26 PetscCall(MatAssemblyBegin(*A, MAT_FINAL_ASSEMBLY)); in CreateRandom()
27 PetscCall(MatAssemblyEnd(*A, MAT_FINAL_ASSEMBLY)); in CreateRandom()
34 PetscCall(MatCreate(PETSC_COMM_WORLD, A)); in CreateIdentity()
[all …]
H A Dex94.c18 PetscCall(MatAXPY(B, -1.0, A, DIFFERENT_NONZERO_PATTERN)); in MatNormDifference()
19 PetscCall(MatNorm(B, NORM_FROBENIUS, norm)); in MatNormDifference()
44 PetscCall(PetscInitialize(&argc, &args, NULL, help)); in main()
48 PetscCall(PetscOptionsGetReal(NULL, NULL, "-fill", &fill, NULL)); in main()
49 PetscCall(PetscOptionsGetBool(NULL, NULL, "-matops_view", &view, NULL)); in main()
50 if (view) PetscCall(PetscViewerPushFormat(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_ASCII_INFO)); in main()
53 PetscCall(PetscOptionsGetString(NULL, NULL, "-f0", file[0], sizeof(file[0]), &flg)); in main()
55 PetscCall(PetscOptionsGetString(NULL, NULL, "-f1", file[1], sizeof(file[1]), &flg)); in main()
57 PetscCall(PetscOptionsGetString(NULL, NULL, "-f2", file[2], sizeof(file[2]), &flg)); in main()
61 PetscCall(PetscOptionsGetString(NULL, NULL, "-f3", file[3], sizeof(file[3]), &flg)); in main()
[all …]
H A Dex68.c15 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
19 PetscCall(MatCreate(PETSC_COMM_WORLD, &mat)); in main()
20 PetscCall(MatSetSizes(mat, PETSC_DECIDE, PETSC_DECIDE, 4, 4)); in main()
21 PetscCall(MatSetFromOptions(mat)); in main()
22 PetscCall(MatSetUp(mat)); in main()
28 PetscCall(MatSetValues(mat, 1, &i, 1, &j, &v, INSERT_VALUES)); in main()
32 PetscCall(MatSetValues(mat, 1, &i, 1, &j, &v, INSERT_VALUES)); in main()
36 PetscCall(MatSetValues(mat, 1, &i, 1, &j, &v, INSERT_VALUES)); in main()
40 PetscCall(MatSetValues(mat, 1, &i, 1, &j, &v, INSERT_VALUES)); in main()
41 PetscCall(MatAssemblyBegin(mat, MAT_FINAL_ASSEMBLY)); in main()
[all …]
H A Dex88.c15 PetscCall(MatShellGetContext(A, &user)); in MatView_User()
16 PetscCall(MatView(user->B, viewer)); in MatView_User()
25 PetscCall(MatShellGetContext(A, &user)); in MatMult_User()
26 PetscCall(MatMult(user->B, X, Y)); in MatMult_User()
35 PetscCall(MatShellGetContext(A, &user)); in MatMultTranspose_User()
36 PetscCall(MatMultTranspose(user->B, X, Y)); in MatMultTranspose_User()
45 PetscCall(MatShellGetContext(A, &user)); in MatGetDiagonal_User()
46 PetscCall(MatGetDiagonal(user->B, X)); in MatGetDiagonal_User()
68 PetscCall(PetscObjectGetType((PetscObject)A, &mattypename)); in TestMatrix()
69 PetscCall(PetscViewerASCIIPrintf(viewer, "\nMatrix of type: %s\n", mattypename)); in TestMatrix()
[all …]
H A Dex2.c11 PetscCall(MatGetType(mat, &mtype)); in TransposeAXPY()
13PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\nMatAXPY: (C^T)^T = (C^T)^T + alpha * A, C=A, SAME_NONZ… in TransposeAXPY()
15PetscCall(PetscPrintf(PETSC_COMM_WORLD, "\nMatAXPY: (C^H)^H = (C^H)^H + alpha * A, C=A, SAME_NONZ… in TransposeAXPY()
17 PetscCall(MatDuplicate(mat, MAT_COPY_VALUES, &C)); in TransposeAXPY()
18 PetscCall(f(C, &D)); in TransposeAXPY()
19 PetscCall(f(D, &E)); in TransposeAXPY()
20 PetscCall(MatAXPY(E, alpha, mat, SAME_NONZERO_PATTERN)); in TransposeAXPY()
21 PetscCall(MatConvert(E, mtype, MAT_INPLACE_MATRIX, &E)); in TransposeAXPY()
22 PetscCall(MatView(E, PETSC_VIEWER_STDOUT_WORLD)); in TransposeAXPY()
23 PetscCall(MatDestroy(&E)); in TransposeAXPY()
[all …]
/petsc/src/mat/interface/
H A Ddlregismat.c32 PetscCall(MatSolverTypeDestroy()); in MatFinalizePackage()
35 PetscCall(PetscFree(names->rname)); in MatFinalizePackage()
36 PetscCall(PetscFree(names->sname)); in MatFinalizePackage()
37 PetscCall(PetscFree(names->mname)); in MatFinalizePackage()
38 PetscCall(PetscFree(names)); in MatFinalizePackage()
41 PetscCall(PetscFunctionListDestroy(&MatList)); in MatFinalizePackage()
42 PetscCall(PetscFunctionListDestroy(&MatOrderingList)); in MatFinalizePackage()
43 PetscCall(PetscFunctionListDestroy(&MatColoringList)); in MatFinalizePackage()
44 PetscCall(PetscFunctionListDestroy(&MatPartitioningList)); in MatFinalizePackage()
45 PetscCall(PetscFunctionListDestroy(&MatCoarsenList)); in MatFinalizePackage()
[all …]
/petsc/src/mat/tutorials/
H A Dex7.c23 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
30 PetscCall(MatCreate(PETSC_COMM_WORLD, &A)); in main()
31 PetscCall(VecCreate(PETSC_COMM_WORLD, &b)); in main()
33 PetscCall(PetscInfo(A, "Mat info on PETSC_COMM_WORLD with no arguments\n")); in main()
34PetscCall(PetscInfo(A, "Mat info on PETSC_COMM_WORLD with 1 argument equal to 1234: %" PetscInt_FM… in main()
35 PetscCall(PetscInfo(b, "Vec info on PETSC_COMM_WORLD with no arguments\n")); in main()
36PetscCall(PetscInfo(b, "Vec info on PETSC_COMM_WORLD with 1 argument equal to 1234: %" PetscInt_FM… in main()
37 PetscCall(PetscInfo(NULL, "Sys info on PETSC_COMM_WORLD with no arguments\n")); in main()
38PetscCall(PetscInfo(NULL, "Sys info on PETSC_COMM_WORLD with 1 argument equal to 1234: %" PetscInt… in main()
40 PetscCall(MatCreate(PETSC_COMM_SELF, &Aself)); in main()
[all …]
H A Dex2.c21 PetscCall(PetscInitialize(&argc, &argv, 0, help)); in main()
22 PetscCall(PetscRandomCreate(PETSC_COMM_SELF, &rnd)); in main()
27 PetscCall(PetscMalloc1(size * size, &a)); in main()
28 PetscCall(PetscMalloc1(size * size, &b)); in main()
31 PetscCall(PetscRandomGetValue(rnd, &a[i + j * size])); in main()
35 PetscCall(MatCreate(PETSC_COMM_SELF, &A)); in main()
36 PetscCall(MatSetSizes(A, size, size, size, size)); in main()
37 PetscCall(MatSetType(A, MATSEQDENSE)); in main()
38 PetscCall(MatSeqDenseSetPreallocation(A, a)); in main()
39 PetscCall(MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY)); in main()
[all …]
/petsc/src/vec/is/sf/tests/
H A Dex1.c14 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in CheckGraphNotSet()
32 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in CheckGraphEmpty()
37 PetscCall(PetscSFGetLeafRange(sf, &minleaf, &maxleaf)); in CheckGraphEmpty()
65 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
66 PetscCall(PetscOptionsGetString(NULL, NULL, "-user_sf_type", sftype, sizeof(sftype), NULL)); in main()
68 PetscCall(PetscSFCreate(PETSC_COMM_WORLD, &sf)); in main()
69 PetscCall(CheckGraphNotSet(sf)); in main()
70 PetscCall(PetscSFDestroy(&sf)); in main()
72 PetscCall(PetscSFCreate(PETSC_COMM_WORLD, &sf)); in main()
73 PetscCall(CheckGraphNotSet(sf)); in main()
[all …]
H A Dex3.c21 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
25 PetscCall(PetscOptionsGetString(NULL, NULL, "-op", opname, sizeof(opname), &flag)); in main()
26 PetscCall(PetscStrcmp(opname, "replace", &isreplace)); in main()
27 PetscCall(PetscStrcmp(opname, "sum", &issum)); in main()
37 PetscCall(VecCreate(PETSC_COMM_WORLD, &x)); in main()
38 PetscCall(VecSetFromOptions(x)); in main()
39 PetscCall(VecSetSizes(x, PETSC_DECIDE, N)); in main()
46 PetscCall(VecGetOwnershipRange(x, &low, &high)); in main()
47 for (i = low; i < high; i++) PetscCall(VecSetValue(x, i, (PetscScalar)i + 1.0, INSERT_VALUES)); in main()
48 PetscCall(VecAssemblyBegin(x)); in main()
[all …]
/petsc/src/mat/impls/diagonal/tests/
H A Dex1.c12 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
15 PetscCall(VecCreateSeq(comm, n, &a)); in main()
16 PetscCall(VecDuplicate(a, &b)); in main()
17 PetscCall(VecDuplicate(a, &c)); in main()
20 PetscCall(PetscRandomCreate(comm, &rand)); in main()
21 PetscCall(VecSetRandom(a, rand)); in main()
22 PetscCall(VecSetRandom(b, rand)); in main()
24 PetscCall(VecDuplicate(a, &a2)); in main()
25 PetscCall(VecCopy(a, a2)); in main()
26 PetscCall(VecDuplicate(b, &b2)); in main()
[all …]
/petsc/src/vec/is/tests/
H A Dex8.c13 PetscCall(ISLocalToGlobalMappingGetSize(m1, &n1)); in TestEqual()
14 PetscCall(ISLocalToGlobalMappingGetBlockSize(m1, &b1)); in TestEqual()
15 PetscCall(ISLocalToGlobalMappingGetIndices(m1, &idx1)); in TestEqual()
16 PetscCall(ISLocalToGlobalMappingGetSize(m2, &n2)); in TestEqual()
17 PetscCall(ISLocalToGlobalMappingGetBlockSize(m2, &b2)); in TestEqual()
18 PetscCall(ISLocalToGlobalMappingGetIndices(m2, &idx2)); in TestEqual()
20 …if (!flg) PetscCall(PetscPrintf(PETSC_COMM_SELF, "%s: different block sizes %" PetscInt_FMT " %" P… in TestEqual()
22 …if (!flg) PetscCall(PetscPrintf(PETSC_COMM_SELF, "%s: different sizes %" PetscInt_FMT " %" PetscIn… in TestEqual()
24 PetscCall(PetscArraycmp(idx1, idx2, n1, &flg)); in TestEqual()
25 if (!flg) PetscCall(PetscPrintf(PETSC_COMM_SELF, "%s: different indices\n", tname)); in TestEqual()
[all …]
/petsc/src/vec/vec/tests/
H A Dex37.c10 PetscCall(VecGetOwnershipRange(vecs[0], &rstart[0], &rend[0])); in GetISs()
11 PetscCall(VecGetOwnershipRange(vecs[1], &rstart[1], &rend[1])); in GetISs()
13PetscCall(ISCreateStride(PETSC_COMM_WORLD, rend[0] - rstart[0], rstart[0] + rstart[1], 1, &is[0])); in GetISs()
14PetscCall(ISCreateStride(PETSC_COMM_WORLD, rend[1] - rstart[1], rend[0] + rstart[1], 1, &is[1])); in GetISs()
16PetscCall(ISCreateStride(PETSC_COMM_WORLD, rend[0] - rstart[0], rend[0] + rend[1] - 1, -1, &is[0])… in GetISs()
17PetscCall(ISCreateStride(PETSC_COMM_WORLD, rend[1] - rstart[1], rstart[0] + rend[1] - 1, -1, &is[1… in GetISs()
28 PetscCall(VecGetLocalSize(X, &n)); in convert_from_nest()
29 PetscCall(VecGetSize(X, &N)); in convert_from_nest()
30 PetscCall(VecGetOwnershipRange(X, &rstart, NULL)); in convert_from_nest()
31 PetscCall(VecCreate(PetscObjectComm((PetscObject)X), Y)); in convert_from_nest()
[all …]
H A Dex41.c14PetscCall(PetscPrintf(PETSC_COMM_WORLD, "============== %s ==============\n", PETSC_FUNCTION_NAME)… in test_vec_ops()
17 PetscCall(VecCreate(PETSC_COMM_WORLD, &c)); in test_vec_ops()
18 PetscCall(VecSetSizes(c, PETSC_DECIDE, 4)); in test_vec_ops()
19 PetscCall(VecSetType(c, VECMPI)); in test_vec_ops()
20 PetscCall(VecDuplicate(c, &d)); in test_vec_ops()
21 PetscCall(VecDuplicate(c, &e)); in test_vec_ops()
22 PetscCall(VecDuplicate(c, &f)); in test_vec_ops()
25 PetscCall(VecCreate(PETSC_COMM_WORLD, &g)); in test_vec_ops()
26 PetscCall(VecSetSizes(g, PETSC_DECIDE, 6)); in test_vec_ops()
27 PetscCall(VecSetType(g, VECMPI)); in test_vec_ops()
[all …]
/petsc/src/ksp/ksp/tests/
H A Dex22.c15 PetscCall(PetscPrintf(PETSC_COMM_WORLD, "%s \n", PETSC_FUNCTION_NAME)); in test_solve()
21 PetscCall(VecCreate(PETSC_COMM_WORLD, &diag)); in test_solve()
22 PetscCall(VecSetSizes(diag, PETSC_DECIDE, n)); in test_solve()
23 PetscCall(VecSetFromOptions(diag)); in test_solve()
25 PetscCall(VecSet(diag, 1.0 / 10.0)); /* so inverse = diag(10) */ in test_solve()
28 PetscCall(MatCreate(PETSC_COMM_WORLD, &A11)); in test_solve()
29 PetscCall(MatSetSizes(A11, PETSC_DECIDE, PETSC_DECIDE, n, n)); in test_solve()
30 PetscCall(MatSetType(A11, MATAIJ)); in test_solve()
31 PetscCall(MatSeqAIJSetPreallocation(A11, n, NULL)); in test_solve()
32 PetscCall(MatMPIAIJSetPreallocation(A11, np, NULL, np, NULL)); in test_solve()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex76.c23 PetscCall(PetscInitialize(&argc, &args, NULL, help)); in main()
24 PetscCall(PetscLogDefaultBegin()); in main()
27 PetscCall(PetscOptionsGetInt(NULL, NULL, "-rhs", &N, NULL)); in main()
29 PetscCall(MatCreate(PETSC_COMM_WORLD, &A)); in main()
30 PetscCall(PetscStrncpy(dir, ".", sizeof(dir))); in main()
31 PetscCall(PetscOptionsGetString(NULL, NULL, "-load_dir", dir, sizeof(dir), NULL)); in main()
33 PetscCall(PetscSNPrintf(name, sizeof(name), "%s/sizes_%d.dat", dir, size)); in main()
34 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, name, FILE_MODE_READ, &viewer)); in main()
35 PetscCall(ISCreate(PETSC_COMM_WORLD, &sizes)); in main()
36 PetscCall(ISLoad(sizes, viewer)); in main()
[all …]
H A Dex72.c51 PetscCall(PetscInitialize(&argc, &args, NULL, help)); in main()
53 PetscCall(PetscOptionsGetBool(NULL, NULL, "-table", &table, NULL)); in main()
54 PetscCall(PetscOptionsGetBool(NULL, NULL, "-constantnullspace", &constantnullspace, NULL)); in main()
55 PetscCall(PetscOptionsGetBool(NULL, NULL, "-trans", &trans, NULL)); in main()
56 PetscCall(PetscOptionsGetBool(NULL, NULL, "-initialguess", &initialguess, NULL)); in main()
57 PetscCall(PetscOptionsGetBool(NULL, NULL, "-output_solution", &outputSoln, NULL)); in main()
58PetscCall(PetscOptionsGetString(NULL, NULL, "-initialguessfilename", initialguessfilename, sizeof(… in main()
59 PetscCall(PetscOptionsGetInt(NULL, NULL, "-nearnulldim", &nearnulldim, NULL)); in main()
65 PetscCall(PetscOptionsGetString(NULL, NULL, "-f", file[0], sizeof(file[0]), &flg)); in main()
67 PetscCall(PetscStrncpy(file[1], file[0], sizeof(file[1]))); in main()
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex21.c140PetscCall(PetscOptionsString("-fname", "The output mesh file", "ex12.c", options->fname, options->… in ProcessOptions()
141PetscCall(PetscOptionsBool("-shell", "Use DMShell to wrap sections", "ex12.c", options->shell, &op… in ProcessOptions()
158 PetscCall(PetscInitialize(&argc, &argv, NULL, help)); in main()
159 PetscCall(ProcessOptions(PETSC_COMM_WORLD, &user)); in main()
171 PetscCall(PetscViewerHDF5Open(comm, user.fname, FILE_MODE_WRITE, &viewer)); in main()
179PetscCall(DMPlexCreateBoxMesh(comm, 2, PETSC_FALSE, faces, NULL, NULL, NULL, PETSC_TRUE, 0, PETSC_… in main()
180 PetscCall(DMPlexDistribute(dm, overlap, &sf, &pdm)); in main()
182 PetscCall(DMDestroy(&dm)); in main()
185 PetscCall(PetscSFDestroy(&sf)); in main()
186 PetscCall(PetscObjectSetName((PetscObject)dm, exampleDMPlexName)); in main()
[all …]
H A Dex24.c30PetscCall(PetscOptionsBool("-compare_is", "Compare ISs and PetscSections?", FILENAME, options->com… in ProcessOptions()
31PetscCall(PetscOptionsBool("-compare_dm", "Compare DMs?", FILENAME, options->compare_dm, &options-… in ProcessOptions()
32PetscCall(PetscStrncpy(options->partitioning, MATPARTITIONINGPARMETIS, sizeof(options->partitionin… in ProcessOptions()
33PetscCall(PetscOptionsString("-partitioning", "The mat partitioning type to test", "None", options… in ProcessOptions()
34PetscCall(PetscOptionsBool("-repartition", "Partition again after the first partition?", FILENAME,… in ProcessOptions()
36 PetscCall(PetscStrncpy(options->repartitioning, MATPARTITIONINGPARMETIS, 64)); in ProcessOptions()
37PetscCall(PetscOptionsString("-repartitioning", "The mat partitioning type to test (second partiti… in ProcessOptions()
41PetscCall(PetscOptionsBool("-tpweight", "Use target partition weights", FILENAME, options->tpw, &o… in ProcessOptions()
58 PetscCall(DMCreate(comm, dm)); in CreateMesh()
59 PetscCall(DMSetType(*dm, DMPLEX)); in CreateMesh()
[all …]

12345678910>>...94