Lines Matching refs:newDMnetwork
1659 DM_Network *newDMnetwork = (DM_Network *)dm->data; in SetSubnetIdLookupBT() local
1666 PetscCall(PetscSectionGetOffset(newDMnetwork->DataSection, edges[e], &offset)); in SetSubnetIdLookupBT()
1667 header = (DMNetworkComponentHeader)(newDMnetwork->componentdataarray + offset); in SetSubnetIdLookupBT()
1686 …DM_Network *newDMnetwork = (DM_Network *)((newDM)->data), *newCoordnetwork, *oldCoord… in DMNetworkDistributeCoordinates() local
1712 …PetscCall(DMPlexDistributeField(newDMnetwork->plex, migrationSF, oldCoordnetwork->DofSection, oldC… in DMNetworkDistributeCoordinates()
1717 …PetscCall(DMPlexDistributeData(newDMnetwork->plex, migrationSF, oldCoordnetwork->DataSection, MPIU… in DMNetworkDistributeCoordinates()
1767 DM_Network *oldDMnetwork = (DM_Network *)((*dm)->data), *newDMnetwork; in DMNetworkDistribute() local
1791 newDMnetwork = (DM_Network *)newDM->data; in DMNetworkDistribute()
1792 newDMnetwork->max_comps_registered = oldDMnetwork->max_comps_registered; in DMNetworkDistribute()
1793 PetscCall(PetscMalloc1(newDMnetwork->max_comps_registered, &newDMnetwork->component)); in DMNetworkDistribute()
1800 PetscCall(DMPlexDistribute(oldDMnetwork->plex, overlap, &pointsf, &newDMnetwork->plex)); in DMNetworkDistribute()
1803 PetscCall(PetscSectionCreate(comm, &newDMnetwork->DofSection)); in DMNetworkDistribute()
1804 …PetscCall(PetscSFDistributeSection(pointsf, oldDMnetwork->DofSection, NULL, newDMnetwork->DofSecti… in DMNetworkDistribute()
1807 PetscCall(PetscSectionCreate(comm, &newDMnetwork->DataSection)); in DMNetworkDistribute()
1808 …newDMnetwork->plex, pointsf, oldDMnetwork->DataSection, MPIU_INT, (void *)oldDMnetwork->componentd… in DMNetworkDistribute()
1810 …PetscCall(PetscSectionGetChart(newDMnetwork->DataSection, &newDMnetwork->cloneshared->pStart, &new… in DMNetworkDistribute()
1811 …PetscCall(DMPlexGetHeightStratum(newDMnetwork->plex, 0, &newDMnetwork->cloneshared->eStart, &newDM… in DMNetworkDistribute()
1812 …PetscCall(DMPlexGetHeightStratum(newDMnetwork->plex, 1, &newDMnetwork->cloneshared->vStart, &newDM… in DMNetworkDistribute()
1813 …newDMnetwork->cloneshared->nEdges = newDMnetwork->cloneshared->eEnd - newDMnetwork->cloneshared… in DMNetworkDistribute()
1814 …newDMnetwork->cloneshared->nVertices = newDMnetwork->cloneshared->vEnd - newDMnetwork->cloneshared… in DMNetworkDistribute()
1815 newDMnetwork->cloneshared->NVertices = oldDMnetwork->cloneshared->NVertices; in DMNetworkDistribute()
1816 newDMnetwork->cloneshared->NEdges = oldDMnetwork->cloneshared->NEdges; in DMNetworkDistribute()
1817 newDMnetwork->cloneshared->svtable = oldDMnetwork->cloneshared->svtable; /* global table! */ in DMNetworkDistribute()
1821 PetscCall(DMSetLocalSection(newDMnetwork->plex, newDMnetwork->DofSection)); in DMNetworkDistribute()
1822 PetscCall(DMGetGlobalSection(newDMnetwork->plex, &newDMnetwork->GlobalDofSection)); in DMNetworkDistribute()
1825 newDMnetwork->cloneshared->Nsubnet = oldDMnetwork->cloneshared->Nsubnet; in DMNetworkDistribute()
1826 newDMnetwork->cloneshared->Nsvtx = oldDMnetwork->cloneshared->Nsvtx; in DMNetworkDistribute()
1828 newDMnetwork->cloneshared->svtx = oldDMnetwork->cloneshared->svtx; /* global vertices! */ in DMNetworkDistribute()
1830 PetscCall(PetscCalloc1(newDMnetwork->cloneshared->Nsubnet, &newDMnetwork->cloneshared->subnet)); in DMNetworkDistribute()
1835 Nsubnet = newDMnetwork->cloneshared->Nsubnet; in DMNetworkDistribute()
1837 newDMnetwork->cloneshared->subnet[j].Nvtx = oldDMnetwork->cloneshared->subnet[j].Nvtx; in DMNetworkDistribute()
1838 newDMnetwork->cloneshared->subnet[j].Nedge = oldDMnetwork->cloneshared->subnet[j].Nedge; in DMNetworkDistribute()
1842 for (e = newDMnetwork->cloneshared->eStart; e < newDMnetwork->cloneshared->eEnd; e++) { in DMNetworkDistribute()
1843 PetscCall(PetscSectionGetOffset(newDMnetwork->DataSection, e, &offset)); in DMNetworkDistribute()
1844 header = (DMNetworkComponentHeader)(newDMnetwork->componentdataarray + offset); in DMNetworkDistribute()
1853 newDMnetwork->cloneshared->subnet[header->subnetid].nedge++; in DMNetworkDistribute()
1857 if (newDMnetwork->cloneshared->Nsvtx) PetscCall(PetscBTCreate(Nsubnet, &btable)); in DMNetworkDistribute()
1860 for (v = newDMnetwork->cloneshared->vStart; v < newDMnetwork->cloneshared->vEnd; v++) { in DMNetworkDistribute()
1861 PetscCall(PetscSectionGetOffset(newDMnetwork->DataSection, v, &offset)); in DMNetworkDistribute()
1862 header = (DMNetworkComponentHeader)(newDMnetwork->componentdataarray + offset); in DMNetworkDistribute()
1873 PetscCall(PetscHMapIGetWithDefault(newDMnetwork->cloneshared->svtable, gidx + 1, 0, &svtx_idx)); in DMNetworkDistribute()
1877 newDMnetwork->cloneshared->subnet[header->subnetid].nvtx++; in DMNetworkDistribute()
1882 for (j = 0; j < newDMnetwork->cloneshared->svtx[svtx_idx].n; j++) { in DMNetworkDistribute()
1883 sv = newDMnetwork->cloneshared->svtx[svtx_idx].sv + 2 * j; in DMNetworkDistribute()
1885 …if (PetscBTLookup(btable, net)) newDMnetwork->cloneshared->subnet[net].nvtx++; /* sv is on net own… in DMNetworkDistribute()
1892 for (j = 0; j < Nsubnet; j++) nv += newDMnetwork->cloneshared->subnet[j].nvtx; in DMNetworkDistribute()
1893 nv += newDMnetwork->cloneshared->Nsvtx; in DMNetworkDistribute()
1896 …PetscCall(PetscCalloc2(newDMnetwork->cloneshared->nEdges, &subnetedge, nv, &subnetvtx)); /* Maps l… in DMNetworkDistribute()
1897 newDMnetwork->cloneshared->subnetedge = subnetedge; in DMNetworkDistribute()
1898 newDMnetwork->cloneshared->subnetvtx = subnetvtx; in DMNetworkDistribute()
1899 for (j = 0; j < newDMnetwork->cloneshared->Nsubnet; j++) { in DMNetworkDistribute()
1900 newDMnetwork->cloneshared->subnet[j].edges = subnetedge; in DMNetworkDistribute()
1901 subnetedge += newDMnetwork->cloneshared->subnet[j].nedge; in DMNetworkDistribute()
1903 newDMnetwork->cloneshared->subnet[j].vertices = subnetvtx; in DMNetworkDistribute()
1904 subnetvtx += newDMnetwork->cloneshared->subnet[j].nvtx; in DMNetworkDistribute()
1907 newDMnetwork->cloneshared->subnet[j].nvtx = newDMnetwork->cloneshared->subnet[j].nedge = 0; in DMNetworkDistribute()
1909 newDMnetwork->cloneshared->svertices = subnetvtx; in DMNetworkDistribute()
1912 for (e = newDMnetwork->cloneshared->eStart; e < newDMnetwork->cloneshared->eEnd; e++) { in DMNetworkDistribute()
1913 PetscCall(PetscSectionGetOffset(newDMnetwork->DataSection, e, &offset)); in DMNetworkDistribute()
1914 … = (DMNetworkComponentHeader)(newDMnetwork->componentdataa… in DMNetworkDistribute()
1915 …newDMnetwork->cloneshared->subnet[header->subnetid].edges[newDMnetwork->cloneshared->subnet[header… in DMNetworkDistribute()
1919 for (v = newDMnetwork->cloneshared->vStart; v < newDMnetwork->cloneshared->vEnd; v++) { in DMNetworkDistribute()
1920 PetscCall(PetscSectionGetOffset(newDMnetwork->DataSection, v, &offset)); in DMNetworkDistribute()
1921 header = (DMNetworkComponentHeader)(newDMnetwork->componentdataarray + offset); in DMNetworkDistribute()
1924 …PetscCall(PetscHMapIGetWithDefault(newDMnetwork->cloneshared->svtable, header->index + 1, 0, &svtx… in DMNetworkDistribute()
1927 …newDMnetwork->cloneshared->subnet[header->subnetid].vertices[newDMnetwork->cloneshared->subnet[hea… in DMNetworkDistribute()
1929 newDMnetwork->cloneshared->svertices[nv++] = v; in DMNetworkDistribute()
1934 for (j = 0; j < newDMnetwork->cloneshared->svtx[svtx_idx].n; j++) { in DMNetworkDistribute()
1935 sv = newDMnetwork->cloneshared->svtx[svtx_idx].sv + 2 * j; in DMNetworkDistribute()
1937 …if (PetscBTLookup(btable, net)) newDMnetwork->cloneshared->subnet[net].vertices[newDMnetwork->clon… in DMNetworkDistribute()
1941 newDMnetwork->cloneshared->nsvtx = nv; /* num of local shared vertices */ in DMNetworkDistribute()
1945 newDMnetwork->cloneshared->distributecalled = PETSC_TRUE; in DMNetworkDistribute()
1950 if (newDMnetwork->cloneshared->Nsvtx) PetscCall(PetscBTDestroy(&btable)); in DMNetworkDistribute()