Searched refs:offsetfrom (Results 1 – 4 of 4) sorted by relevance
| /petsc/src/snes/tutorials/network/power/ |
| H A D | pffunctions.c | 36 PetscInt offsetfrom, offsetto, goffsetfrom, goffsetto, numComps; in FormJacobian_Power_private() local 122 PetscCall(DMNetworkGetLocalVecOffset(networkdm, vfrom, ALL_COMPONENTS, &offsetfrom)); in FormJacobian_Power_private() 129 thetaf = xarr[offsetfrom]; in FormJacobian_Power_private() 130 Vmf = xarr[offsetfrom + 1]; in FormJacobian_Power_private() 246 PetscInt offsetfrom, offsetto, offset, i, j, key, numComps; in FormFunction_Power() local 310 PetscCall(DMNetworkGetLocalVecOffset(networkdm, vfrom, ALL_COMPONENTS, &offsetfrom)); in FormFunction_Power() 313 thetaf = xarr[offsetfrom]; in FormFunction_Power() 314 Vmf = xarr[offsetfrom + 1]; in FormFunction_Power() 321 …farr[offsetfrom] += Gff * Vmf * Vmf + Vmf * Vmt * (Gft * PetscCosScalar(thetaft) + Bft * PetscSinS… in FormFunction_Power() 322 …farr[offsetfrom + 1] += -Bff * Vmf * Vmf + Vmf * Vmt * (-Bft * PetscCosScalar(thetaft) + Gft * Pet… in FormFunction_Power()
|
| H A D | power2.c | 17 PetscInt offsetfrom, offsetto, offset; in FormFunction_Subnet() local 83 PetscCall(DMNetworkGetLocalVecOffset(networkdm, vfrom, ALL_COMPONENTS, &offsetfrom)); in FormFunction_Subnet() 86 thetaf = xarr[offsetfrom]; in FormFunction_Subnet() 87 Vmf = xarr[offsetfrom + 1]; in FormFunction_Subnet() 94 …farr[offsetfrom] += Gff * Vmf * Vmf + Vmf * Vmt * (Gft * PetscCosScalar(thetaft) + Bft * PetscSinS… in FormFunction_Subnet() 95 …farr[offsetfrom + 1] += -Bff * Vmf * Vmf + Vmf * Vmt * (-Bft * PetscCosScalar(thetaft) + Gft * Pet… in FormFunction_Subnet() 163 PetscInt offsetfrom, offsetto, goffsetfrom, goffsetto; in FormJacobian_Subnet() local 249 PetscCall(DMNetworkGetLocalVecOffset(networkdm, vfrom, ALL_COMPONENTS, &offsetfrom)); in FormJacobian_Subnet() 256 thetaf = xarr[offsetfrom]; in FormJacobian_Subnet() 257 Vmf = xarr[offsetfrom + 1]; in FormJacobian_Subnet()
|
| /petsc/src/ts/tutorials/power_grid/stability_9bus/ |
| H A D | ex9busdmnetwork.c | 488 PetscInt vfrom, vto, offsetfrom, offsetto; in FormIFunction() local 582 PetscCall(DMNetworkGetLocalVecOffset(networkdm, vfrom, 0, &offsetfrom)); in FormIFunction() 586 Vfr = xarr[offsetfrom]; in FormIFunction() 587 Vfi = xarr[offsetfrom + 1]; in FormIFunction() 592 farr[offsetfrom] += Yftr * Vti + Yfti * Vtr; in FormIFunction() 593 farr[offsetfrom + 1] += Yftr * Vtr - Yfti * Vti; in FormIFunction() 750 PetscInt vfrom, vto, offsetfrom, offsetto; in AlgFunction() local 827 PetscCall(DMNetworkGetLocalVecOffset(networkdm, vfrom, 0, &offsetfrom)); in AlgFunction() 831 Vfr = xarr[offsetfrom]; in AlgFunction() 832 Vfi = xarr[offsetfrom + 1]; in AlgFunction() [all …]
|
| /petsc/src/ts/tutorials/network/ |
| H A D | pipes.c | 104 PetscInt vfrom, vto, offsetfrom, offsetto, varoffset; in WASHIFunction() local 189 PetscCall(DMNetworkGetLocalVecOffset(networkdm, vfrom, ALL_COMPONENTS, &offsetfrom)); in WASHIFunction() 195 juncx = (PipeField *)(xarr + offsetfrom); in WASHIFunction() 196 juncf = (PetscScalar *)(farr + offsetfrom); in WASHIFunction() 228 PetscInt k, nx, vkey, vfrom, vto, offsetfrom, offsetto; in WASHSetInitialSolution() local 261 PetscCall(DMNetworkGetLocalVecOffset(networkdm, vfrom, ALL_COMPONENTS, &offsetfrom)); in WASHSetInitialSolution() 266 if (junction->type == RESERVOIR) (xarr + offsetfrom)[1] = wash->H0; /* 1st H */ in WASHSetInitialSolution()
|