Lines Matching refs:tmp1
46 Vec tmp1; member
268 PetscCall(VecDuplicate(user->data, &user->tmp1)); in CreateCtx()
284 PetscCall(VecDestroy(&user->tmp1)); in DestroyCtx()
298 PetscCall(MatMult(user->mass, u, user->tmp1)); in ReducedFunctionGradient()
299 PetscCall(VecDot(u, user->tmp1, &inner)); /* regularisation contribution to */ in ReducedFunctionGradient()
303 PetscCall(VecAXPY(g, alpha, user->tmp1)); /* regularisation contribution to the gradient */ in ReducedFunctionGradient()
306 …PetscCall(VecSetValues(user->tmp1, user->num_bc_dofs, user->bc_indices, user->bc_values, INSERT_VA… in ReducedFunctionGradient()
307 PetscCall(VecAssemblyBegin(user->tmp1)); in ReducedFunctionGradient()
308 PetscCall(VecAssemblyEnd(user->tmp1)); in ReducedFunctionGradient()
309 PetscCall(KSPSolve(user->ksp_laplace, user->tmp1, user->state)); /* forward solve */ in ReducedFunctionGradient()
312 PetscCall(VecCopy(user->state, user->tmp1)); in ReducedFunctionGradient()
313 PetscCall(VecAXPY(user->tmp1, -1.0, user->data)); in ReducedFunctionGradient()
314 PetscCall(MatMult(user->mass, user->tmp1, user->tmp2)); in ReducedFunctionGradient()
315 PetscCall(VecDot(user->tmp1, user->tmp2, &inner)); /* misfit contribution to */ in ReducedFunctionGradient()
324 PetscCall(MatMult(user->mass, user->adjoint, user->tmp1)); in ReducedFunctionGradient()
325 PetscCall(VecAXPY(g, 1.0, user->tmp1)); /* adjoint contribution to the gradient */ in ReducedFunctionGradient()