Lines Matching refs:farr
245 PetscScalar *farr; in FormFunction_Power() local
257 PetscCall(VecGetArray(localF, &farr)); in FormFunction_Power()
273 farr[offset] = xarr[offset] - bus->va * PETSC_PI / 180.0; in FormFunction_Power()
274 farr[offset + 1] = xarr[offset + 1] - bus->vm; in FormFunction_Power()
282 farr[offset] += Vm * Vm * bus->gl / Sbase; in FormFunction_Power()
283 if (bus->ide != PV_BUS) farr[offset + 1] += -Vm * Vm * bus->bl / Sbase; 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()
324 …farr[offsetto] += Gtt * Vmt * Vmt + Vmt * Vmf * (Gtf * PetscCosScalar(thetatf) + Btf * PetscSinSca… in FormFunction_Power()
325 …farr[offsetto + 1] += -Btt * Vmt * Vmt + Vmt * Vmf * (-Btf * PetscCosScalar(thetatf) + Gtf * Petsc… in FormFunction_Power()
332 farr[offset] += -gen->pg / Sbase; in FormFunction_Power()
333 farr[offset + 1] += -gen->qg / Sbase; in FormFunction_Power()
338 farr[offset] += load->pl / Sbase; in FormFunction_Power()
339 farr[offset + 1] += load->ql / Sbase; in FormFunction_Power()
343 if (bus && bus->ide == PV_BUS) farr[offset + 1] = xarr[offset + 1] - bus->vm; in FormFunction_Power()
346 PetscCall(VecRestoreArray(localF, &farr)); in FormFunction_Power()