| /petsc/src/dm/impls/network/tests/ |
| H A D | ex3.c | 20 PetscErrorCode StarGraphCreateEdgeList(PetscInt k, PetscBool directin, PetscInt *ne, PetscInt *edge… in StarGraphCreateEdgeList() argument 25 *ne = k; in StarGraphCreateEdgeList() 60 PetscInt ne = 0, compkey, eStart, eEnd, vStart, vEnd, e, v; in StarGraphCreate() local 67 if (rank == 0) PetscCall(StarGraphCreateEdgeList(k, directin, &ne, &edgelist)); in StarGraphCreate() 68 PetscCall(DMNetworkAddSubnetwork(dm, "Main", ne, edgelist, NULL)); in StarGraphCreate() 91 PetscErrorCode StarGraphTestQuery(DM dm, PetscInt ne) in StarGraphTestQuery() argument 99 …globalnumedge == ne, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Global number of edges should be %" PetscIn… in StarGraphTestQuery() 100 …alnumvert == ne + 1, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Global number of vertices should be %" Pets… in StarGraphTestQuery() 107 PetscInt ne = 1; in main() local 114 PetscCall(PetscOptionsGetInt(NULL, NULL, "-ne", &ne, NULL)); in main() [all …]
|
| H A D | ex1.c | 20 PetscErrorCode CreateStarGraphEdgeList(PetscInt k, PetscBool directin, PetscInt *ne, PetscInt *edge… in CreateStarGraphEdgeList() argument 25 *ne = k; in CreateStarGraphEdgeList() 60 PetscInt ne = 0, compkey, eStart, eEnd, vStart, vEnd, e, v; in CreateSimpleStarGraph() local 67 if (rank == 0) PetscCall(CreateStarGraphEdgeList(k, directin, &ne, &edgelist)); in CreateSimpleStarGraph() 68 PetscCall(DMNetworkAddSubnetwork(dm, "Main", ne, edgelist, NULL)); in CreateSimpleStarGraph() 97 PetscInt dofv = 1, dofe = 1, ne = 1; in main() local 106 PetscCall(PetscOptionsGetInt(NULL, NULL, "-ne", &ne, NULL)); in main() 107 PetscCall(CreateSimpleStarGraph(PETSC_COMM_WORLD, dofv, dofe, ne, PETSC_TRUE, &dm)); in main()
|
| H A D | ex2.c | 20 static PetscErrorCode StarGraphCreateEdgeList(PetscInt k, PetscBool directin, PetscInt *ne, PetscIn… in StarGraphCreateEdgeList() argument 25 *ne = k; in StarGraphCreateEdgeList() 104 PetscInt ne = 0, compkey, eStart, eEnd, vStart, vEnd, e, v; in StarGraphCreate() local 112 if (rank == 0) PetscCall(StarGraphCreateEdgeList(k, directin, &ne, &edgelist)); in StarGraphCreate() 113 PetscCall(DMNetworkAddSubnetwork(dm, "Main", ne, edgelist, NULL)); in StarGraphCreate() 182 PetscInt dofv = 1, dofe = 1, ne = 1; in main() local 193 PetscCall(PetscOptionsGetInt(NULL, NULL, "-ne", &ne, NULL)); in main() 197 PetscCall(StarGraphCreate(PETSC_COMM_WORLD, dofv, dofe, ne, PETSC_TRUE, &dm)); in main()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex55.c | 13 PetscInt i, m, M, its, Istart, Iend, j, Ii, ix, ne = 4; in main() local 39 PetscCall(PetscOptionsGetInt(NULL, NULL, "-ne", &ne, NULL)); in main() 40 h = 1. / ne; in main() 44 M = 2 * (ne + 1) * (ne + 1); /* global number of equations */ in main() 45 m = (ne + 1) * (ne + 1) / npe; in main() 46 if (mype == npe - 1) m = (ne + 1) * (ne + 1) - (npe - 1) * m; in main() 149 j = Ii / (ne + 1); in main() 150 i = Ii % (ne + 1); in main() 152 x = h * (Ii % (ne + 1)); in main() 153 y = h * (Ii / (ne + 1)); in main() [all …]
|
| H A D | ex54.c | 10 PetscInt i, m, M, its, Istart, Iend, j, Ii, ix, ne = 4; in main() local 32 PetscCall(PetscOptionsGetInt(NULL, NULL, "-ne", &ne, NULL)); in main() 33 h = 1. / ne; in main() 36 M = (ne + 1) * (ne + 1); /* global number of nodes */ in main() 95 j = Ii / (ne + 1); in main() 96 i = Ii % (ne + 1); in main() 98 x = h * (Ii % (ne + 1)); in main() 99 y = h * (Ii / (ne + 1)); in main() 102 if (i < ne && j < ne) { in main() 109 idx[2] = Ii + (ne + 1) + 1; in main() [all …]
|
| H A D | ex56.c | 27 PetscInt m, nn, M, Istart, Iend, i, j, k, ii, jj, kk, ic, ne = 4, id; in main() local 48 PetscCall(PetscOptionsInt("-ne", nestring, "", ne, &ne, NULL)); in main() 70 h = 1. / ne; in main() 71 nn = ne + 1; in main() 97 … NP), comm, PETSC_ERR_ARG_WRONG, "-ne %" PetscInt_FMT ": (ne+1)%%(npe^{1/3}) must equal zero", ne); in main() 187 if (i < ne && j < ne && k < ne) { in main()
|
| /petsc/include/petsc/finclude/ |
| H A D | petscsysbase.h | 140 #define CHKERRQ(ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr,__LINE__,__FILE__);return;endif 141 #define CHKERRA(ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr,__LINE__,__FILE__);call MPIU_Abor… 142 #define CHKERRMPI(ierr) if (ierr .ne. 0) then;call PetscErrorMPI(ierr,__LINE__,__FILE__);return;end… 143 #define CHKERRMPIA(ierr) if (ierr .ne. 0) then;call PetscErrorMPI(ierr,__LINE__,__FILE__);call MPIU… 145 #define CHKERRQ(ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr);return;endif 146 #define CHKERRA(ierr) if (ierr .ne. 0) then;call PetscErrorF(ierr);call MPIU_Abort(PETSC_COMM_SELF,… 147 #define CHKERRMPI(ierr) if (ierr .ne. 0) then;call PetscErrorMPI(ierr);return;endif 148 #define CHKERRMPIA(ierr) if (ierr .ne. 0) then;call PetscErrorMPI(ierr);call MPIU_Abort(PETSC_COMM_…
|
| /petsc/src/snes/tutorials/network/power/ |
| H A D | power2.c | 11 PetscErrorCode FormFunction_Subnet(DM networkdm, Vec localX, Vec localF, PetscInt nv, PetscInt ne, … in FormFunction_Subnet() argument 127 PetscInt nv, ne; in FormFunction() local 143 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormFunction() 144 PetscCall(FormFunction_Subnet(networkdm, localX, localF, nv, ne, vtx, edges, appctx)); in FormFunction() 147 PetscCall(DMNetworkGetSubnetwork(networkdm, 1, &nv, &ne, &vtx, &edges)); in FormFunction() 148 PetscCall(FormFunction_Subnet(networkdm, localX, localF, nv, ne, vtx, edges, appctx)); in FormFunction() 158 …an_Subnet(DM networkdm, Vec localX, Mat J, Mat Jpre, PetscInt nv, PetscInt ne, const PetscInt *vtx… in FormJacobian_Subnet() argument 343 PetscInt ne, nv; in FormJacobian() local 356 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormJacobian() 357 PetscCall(FormJacobian_Subnet(networkdm, localX, J, Jpre, nv, ne, vtx, edges, appctx)); in FormJacobian() [all …]
|
| H A D | power.c | 17 PetscInt nv, ne; in FormFunction() local 30 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormFunction() 31 PetscCall(FormFunction_Power(networkdm, localX, localF, nv, ne, vtx, edges, User)); in FormFunction() 43 PetscInt vStart, vEnd, nv, ne; in SetInitialValues() local 57 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in SetInitialValues() 58 PetscCall(SetInitialGuess_Power(networkdm, localX, nv, ne, vtx, edges, user_power)); in SetInitialValues()
|
| H A D | pffunctions.c | 32 PetscErrorCode FormJacobian_Power_private(DM networkdm, Vec localX, Mat J, PetscInt nv, PetscInt ne… in FormJacobian_Power_private() argument 218 PetscInt nv, ne; in FormJacobian_Power() local 230 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormJacobian_Power() 231 PetscCall(FormJacobian_Power_private(networkdm, localX, J, nv, ne, vtx, edges, appctx)); in FormJacobian_Power() 240 PetscErrorCode FormFunction_Power(DM networkdm, Vec localX, Vec localF, PetscInt nv, PetscInt ne, c… in FormFunction_Power() argument 350 PetscErrorCode SetInitialGuess_Power(DM networkdm, Vec localX, PetscInt nv, PetscInt ne, const Pets… in SetInitialGuess_Power() argument
|
| /petsc/src/snes/tutorials/network/water/ |
| H A D | waterfunctions.c | 21 PetscErrorCode FormFunction_Water(DM networkdm, Vec localX, Vec localF, PetscInt nv, PetscInt ne, c… in FormFunction_Water() argument 40 for (i = 0; i < ne; i++) { /* for each edge */ in FormFunction_Water() 105 PetscInt nv, ne; in WaterFormFunction() local 112 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &v, &e)); in WaterFormFunction() 126 PetscCall(FormFunction_Water(networkdm, localX, localF, nv, ne, v, e, NULL)); in WaterFormFunction() 138 PetscInt nv, ne; in WaterSetInitialGuess() local 150 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in WaterSetInitialGuess() 151 PetscCall(SetInitialGuess_Water(networkdm, localX, nv, ne, vtx, edges, NULL)); in WaterSetInitialGuess() 198 PetscErrorCode SetInitialGuess_Water(DM networkdm, Vec localX, PetscInt nv, PetscInt ne, const Pets… in SetInitialGuess_Water() argument
|
| H A D | waterreaddata.c | 129 PetscInt i, j, nv = 0, ne = 0, ncurve = 0, ntitle = 0, nlines, ndata, curve_id; in WaterReadData() local 247 edge[ne].type = EDGE_TYPE_PIPE; in WaterReadData() 248 pipe = &edge[ne].pipe; in WaterReadData() 257 edge[ne].id = pipe->id; in WaterReadData() 266 ne++; in WaterReadData() 274 edge[ne].type = EDGE_TYPE_PUMP; in WaterReadData() 275 pump = &edge[ne].pump; in WaterReadData() 282 edge[ne].id = pump->id; in WaterReadData() 283 ne++; in WaterReadData()
|
| H A D | water.c | 18 PetscInt nv, ne, i; in main() local 64 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in main() 66 …for (i = 0; i < ne; i++) PetscCall(DMNetworkAddComponent(networkdm, edges[i], appctx.compkey_edge,… in main()
|
| /petsc/src/dm/tutorials/ |
| H A D | ex5.c | 9 PetscInt M = 10, N = 8, ne, nc, i; in main() local 43 PetscCall(DMDAGetElements(da, &ne, &nc, &e)); in main() 45 for (i = 0; i < ne; i++) { in main() 51 PetscCall(DMDARestoreElements(da, &ne, &nc, &e)); in main()
|
| /petsc/src/snes/tutorials/network/ |
| H A D | ex1.c | 91 PetscInt nv, ne, i, j, offset, nvar, row; in FormJacobian_subPower() local 111 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormJacobian_subPower() 112 PetscCall(FormJacobian_Power_private(networkdm, localX, J, nv, ne, vtx, edges, appctx)); in FormJacobian_subPower() 115 PetscCall(DMNetworkGetSubnetwork(networkdm, 1, &nv, &ne, &vtx, &edges)); in FormJacobian_subPower() 135 PetscErrorCode FormFunction_Dummy(DM networkdm, Vec localX, Vec localF, PetscInt nv, PetscInt ne, c… in FormFunction_Dummy() argument 168 PetscInt nv, ne, v; in FormFunction() local 190 PetscCall(DMNetworkGetSubnetwork(networkdm, 0, &nv, &ne, &vtx, &edges)); in FormFunction() 192 PetscCall(FormFunction_Dummy(networkdm, localX, localF, nv, ne, vtx, edges, user)); in FormFunction() 194 PetscCall(FormFunction_Power(networkdm, localX, localF, nv, ne, vtx, edges, &appctx_power)); in FormFunction() 198 PetscCall(DMNetworkGetSubnetwork(networkdm, 1, &nv, &ne, &vtx, &edges)); in FormFunction() [all …]
|
| /petsc/src/dm/tests/ |
| H A D | ex10.c | 14 PetscInt e, ne, nv, v, ecompkey, vcompkey; in main() local 64 PetscCall(DMNetworkGetSubnetwork(network, 0, &nv, &ne, &nodes, &edges)); in main() 65 for (e = 0; e < ne; e++) { in main()
|
| H A D | noflux_check.c | 112 PetscInt ne, num_pts; in main() local 118 ne = 8; in main() 119 num_pts = ne + 1; in main()
|
| /petsc/src/dm/impls/da/ |
| H A D | dagetelem.c | 19 da->ne = 1 * (xe - xs - 1); in DMDAGetElements_1D() 20 PetscCall(PetscMalloc1(1 + 2 * da->ne, &da->e)); in DMDAGetElements_1D() 31 *nel = da->ne; in DMDAGetElements_1D() 73 da->ne = ns * (xe - xs - 1) * (ye - ys - 1); in DMDAGetElements_2D() 74 PetscCall(PetscMalloc1(1 + nn * da->ne, &da->e)); in DMDAGetElements_2D() 96 *nel = da->ne; in DMDAGetElements_2D() 142 da->ne = ns * (xe - xs - 1) * (ye - ys - 1) * (ze - zs - 1); in DMDAGetElements_3D() 143 PetscCall(PetscMalloc1(1 + nn * da->ne, &da->e)); in DMDAGetElements_3D() 175 *nel = da->ne; in DMDAGetElements_3D() 315 dd->ne = 0; in DMDASetElementType() [all …]
|
| H A D | dadd.c | 37 PetscInt me = 1, ne = 1, pe = 1; in DMDACreatePatchIS() local 107 if (ly) ne = ly[0]; in DMDACreatePatchIS() 153 while (jj > ne - 1 || jj < ns) { in DMDACreatePatchIS() 156 ne = ly[0]; in DMDACreatePatchIS() 160 ns = ne; in DMDACreatePatchIS() 161 ne += ly[nr]; in DMDACreatePatchIS() 178 ym = ne - ns; in DMDACreatePatchIS() 200 if (N > 1) ne = ns + nw; in DMDACreatePatchIS() 206 ne = ne - oy; in DMDACreatePatchIS() 212 ym = ne - ns; in DMDACreatePatchIS() [all …]
|
| /petsc/lib/petsc/bin/maint/abi-compliance-checker/ |
| H A D | Makefile.pl | 107 if($PREFIX ne "/") { 123 if($DESTDIR ne "/") { 252 $Files{$File::Find::dir."/$_"} = 1 if($_ ne ".");
|
| /petsc/src/ksp/ksp/tutorials/network/ |
| H A D | ex3.c | 18 …PetscInt i, j, net, Nsubnet, nsubnet, ne, nv, nvar, v, ncomp, compkey0, compkey1, compkey, … in main() local 100 PetscCall(DMNetworkGetSubnetwork(dmnetwork, net, &nv, &ne, &vtx, &edges)); in main() 173 PetscCall(DMNetworkGetSubnetwork(dmnetwork, net, &nv, &ne, &vtx, &edges)); in main() 174 …"[%d] subnet %" PetscInt_FMT ": nv %" PetscInt_FMT ", ne %" PetscInt_FMT "\n", rank, net, nv, ne)); in main()
|
| H A D | ex4.c | 9 PetscInt i, j, net, Nsubnet, ne, nv, nvar, v, goffset, row, compkey0, compkey1, compkey; in main() local 85 PetscCall(DMNetworkGetSubnetwork(dmnetwork, net, &nv, &ne, &vtx, &edges)); in main()
|
| /petsc/src/dm/impls/network/ |
| H A D | networkview.c | 287 PetscInt vfrom, vto, i, j, nv, ne, nsv, p, nsubnet; in DMView_Network() local 308 PetscCall(DMNetworkGetSubnetwork(dm, i, &nv, &ne, &vtx, &edges)); in DMView_Network() 309 if (ne) { in DMView_Network() 310 … ": nEdges %" PetscInt_FMT ", nVertices(include shared vertices) %" PetscInt_FMT "\n", i, ne, nv)); in DMView_Network() 311 for (j = 0; j < ne; j++) { in DMView_Network()
|
| /petsc/src/tao/constrained/tutorials/ |
| H A D | ex1.c | 37 PetscInt ne; /* Global number of equality constraints */ member 196 user->ne = 1; in InitializeProblem() 198 neloc = (rank == 0) ? user->ne : 0; in InitializeProblem() 203 PetscCall(VecSetSizes(user->ce, neloc, user->ne)); in InitializeProblem() 216 PetscCall(MatSetSizes(user->Ae, neloc, nloc, user->ne, user->n)); in InitializeProblem()
|
| /petsc/doc/manual/ |
| H A D | dmnetwork.md | 50 …DMNetworkAddSubnetwork(DM dm, const char* name, PetscInt ne, PetscInt edgelist[], PetscInt *netnum… 53 …Here `name` is the subnetwork name, `ne` is the number of local edges on the subnetwork, and `edge… 55 Each element of `edgelist` is an integer array of size `2*ne` 151 DMNetworkGetSubnetwork(DM dm, PetscInt netnum, PetscInt *nv, PetscInt *ne, const PetscInt **vtx, co…
|