| /petsc/src/dm/impls/network/tests/ |
| H A D | ex1.c | 60 PetscInt ne = 0, compkey, eStart, eEnd, vStart, vEnd, e, v; in CreateSimpleStarGraph() local 69 PetscCall(DMNetworkRegisterComponent(dm, "unused", sizeof(PetscInt), &compkey)); in CreateSimpleStarGraph() 77 PetscCall(DMNetworkAddComponent(dm, e, compkey, &compedge[e - eStart], numdofedge)); in CreateSimpleStarGraph() 81 PetscCall(DMNetworkAddComponent(dm, v, compkey, &compvert[v - vStart], numdofvert)); in CreateSimpleStarGraph() 96 PetscInt *compprev, *comp, compkey; in main() local 120 PetscCall(DMNetworkRegisterComponent(dmclone, "unusedclone", sizeof(PetscInt), &compkey)); in main() 125 PetscCall(DMNetworkAddComponent(dmclone, e, compkey, &comp[e - eStart], 2)); in main()
|
| H A D | ex2.c | 48 PetscInt vStart, vEnd, v, vglobal, compkey = 0, off, NVert; in StarGraphSetCoordinates() local 56 PetscCall(DMNetworkRegisterComponent(cdm, "coordinate", sizeof(PetscReal), &compkey)); in StarGraphSetCoordinates() 60 PetscCall(DMNetworkAddComponent(cdm, v, compkey, &vcolor[v - vStart], 2)); in StarGraphSetCoordinates() 104 PetscInt ne = 0, compkey, eStart, eEnd, vStart, vEnd, e, v; in StarGraphCreate() local 114 PetscCall(DMNetworkRegisterComponent(dm, "unused", sizeof(PetscInt), &compkey)); in StarGraphCreate() 122 PetscCall(DMNetworkAddComponent(dm, e, compkey, &compedge[e - eStart], numdofedge)); in StarGraphCreate() 126 PetscCall(DMNetworkAddComponent(dm, v, compkey, &compvert[v - vStart], numdofvert)); in StarGraphCreate()
|
| H A D | ex3.c | 60 PetscInt ne = 0, compkey, eStart, eEnd, vStart, vEnd, e, v; in StarGraphCreate() local 69 PetscCall(DMNetworkRegisterComponent(dm, "unused", sizeof(PetscInt), &compkey)); in StarGraphCreate() 77 PetscCall(DMNetworkAddComponent(dm, e, compkey, &compedge[e - eStart], numdofedge)); in StarGraphCreate() 81 PetscCall(DMNetworkAddComponent(dm, v, compkey, &compvert[v - vStart], numdofvert)); in StarGraphCreate()
|
| /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 155 PetscCall(DMNetworkGetComponent(dmnetwork, vtx[v], j, &compkey, NULL, &nvar)); in main() 159 val = compkey + 1.0; in main() 187 PetscCall(DMNetworkGetComponent(dmnetwork, vtx[i], j, &compkey, (void **)&component, NULL)); in main() 188 if (compkey == 0) { in main() 189 …mpkey %" PetscInt_FMT ", mycomp0->id %" PetscInt_FMT "\n", rank, vtx[i], compkey, ((Comp0 *)compon… in main() 190 } else if (compkey == 1) { in main() 191 …scInt_FMT " compkey %" PetscInt_FMT ", mycomp1->val %g\n", rank, vtx[i], compkey, (double)PetscRea… 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 146 PetscCall(DMNetworkGetComponent(dmnetwork, vtx[v], 1, &compkey, NULL, &nvar)); in main() 147 PetscCall(DMNetworkGetGlobalVecOffset(dmnetwork, vtx[v], compkey, &goffset)); in main()
|
| /petsc/doc/manual/ |
| H A D | dmnetwork.md | 29 DMNetworkRegisterComponent(DM dm, const char *name, size_t size, PetscInt *compkey); 33 component data, and `compkey` is an integer key that can be 101 DMNetworkAddComponent(DM dm, PetscInt p, PetscInt compkey, void* compdata, PetscInt nvar) 106 `compkey` is the component key returned when registering the component 192 DMNetworkGetComponent(DM dm, PetscInt p, PetscInt compnum, PetscInt *compkey, void **component, Pet… 195 input `compnum` is the component number, output `compkey` is the key set by `DMNetworkRegisterCompo… 214 this case, `compkey` is used to differentiate the component type.
|
| /petsc/src/snes/tutorials/network/ |
| H A D | ex1.c | 460 PetscInt vStart, vEnd, compkey; in main() local 620 PetscCall(DMNetworkRegisterComponent(dmcoords, "coordinate&color", sizeof(PetscReal), &compkey)); in main() 621 …for (i = vStart; i < vEnd; i++) PetscCall(DMNetworkAddComponent(dmcoords, i, compkey, &color[i - v… in main()
|
| /petsc/src/dm/impls/network/ |
| H A D | network.c | 1366 PetscInt *compsize, *compkey, *compoffset, *compnvar, *compoffsetvarrel; in DMNetworkAddComponent() local 1385 …PetscCall(PetscCalloc5(header->maxcomps, &compsize, header->maxcomps, &compkey, header->maxcomps, … in DMNetworkAddComponent() 1398 PetscCall(PetscMemcpy(compkey, header->key, header->ndata * sizeof(PetscInt))); in DMNetworkAddComponent() 1412 header->key = compkey; in DMNetworkAddComponent() 1462 PetscErrorCode DMNetworkGetComponent(DM dm, PetscInt p, PetscInt compnum, PeOp PetscInt *compkey, P… in DMNetworkGetComponent() argument 1478 if (compkey) *compkey = header->key[compnum]; in DMNetworkGetComponent()
|