| /petsc/include/petsc/private/kernels/ ! |
| H A D | petscaxpy.h | 32 #define PetscKernelAXPY(U, a1, p1, n) \ argument 36 PetscCallBLAS("BLASaxpy", BLASaxpy_(&nn, &a1, p1, &one, U, &one)); \ 38 #define PetscKernelAXPY2(U, a1, a2, p1, p2, n) \ argument 40 fortranmaxpy2_(U, &a1, &a2, p1, p2, &n); \ 42 #define PetscKernelAXPY3(U, a1, a2, a3, p1, p2, p3, n) \ argument 44 fortranmaxpy3_(U, &a1, &a2, &a3, p1, p2, p3, &n); \ 46 #define PetscKernelAXPY4(U, a1, a2, a3, a4, p1, p2, p3, p4, n) \ argument 48 fortranmaxpy4_(U, &a1, &a2, &a3, &a4, p1, p2, p3, p4, &n); \ 53 #define PetscKernelAXPY(U, Alpha, P, n) \ argument 57 *U++ += Alpha * *P++; \ [all …]
|
| /petsc/src/sys/objects/device/impls/cupm/ ! |
| H A D | cupmallocator.hpp | 39 template <typename U> 40 static PetscErrorCode allocate(value_type **, size_type, const StreamBase<U> *) noexcept; 41 template <typename U> 42 static PetscErrorCode deallocate(value_type *, const StreamBase<U> *) noexcept; 43 template <typename U> 44 …de uninitialized_copy(value_type *, const value_type *, size_type, const StreamBase<U> *) noexcept; 48 template <typename U> 49 …orCode HostAllocator<T, P>::allocate(value_type **ptr, size_type n, const StreamBase<U> *) noexcept in allocate() argument 57 template <typename U> 58 inline PetscErrorCode HostAllocator<T, P>::deallocate(value_type *ptr, const StreamBase<U> *) noexc… in deallocate() argument [all …]
|
| /petsc/src/ts/tests/ ! |
| H A D | ex15.c | 43 static PetscErrorCode IFunction_Conservative(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, PetscCtx c… in IFunction_Conservative() argument 49 PetscCall(VecGetArrayRead(U, &u)); in IFunction_Conservative() 56 PetscCall(VecRestoreArrayRead(U, &u)); in IFunction_Conservative() 62 static PetscErrorCode IFunction_Nonconservative(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, PetscCt… in IFunction_Nonconservative() argument 68 PetscCall(VecGetArrayRead(U, &u)); in IFunction_Nonconservative() 75 PetscCall(VecRestoreArrayRead(U, &u)); in IFunction_Nonconservative() 81 static PetscErrorCode IFunction_TransientVar(TS ts, PetscReal t, Vec U, Vec Cdot, Vec F, PetscCtx c… in IFunction_TransientVar() argument 87 PetscCall(VecGetArrayRead(U, &u)); in IFunction_TransientVar() 94 PetscCall(VecRestoreArrayRead(U, &u)); in IFunction_TransientVar() 100 static PetscErrorCode TransientVar(TS ts, Vec U, Vec C, PetscCtx ctx) in TransientVar() argument [all …]
|
| H A D | ex6.c | 13 PetscErrorCode f(PetscReal t, Vec U, Vec V, Vec F) in f() argument 16 PetscCall(VecWAXPY(F, 1.0, U, V)); in f() 23 PetscErrorCode F(PetscReal t, Vec U, Vec V, Vec F) in F() argument 26 PetscCall(VecWAXPY(F, -1.0, V, U)); in F() 33 Vec U, V; member 45 Vec tsrhs, U; in main() local 54 PetscCall(VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, 1, &U)); in main() 66 PetscCall(VecSet(U, 1.0)); in main() 67 PetscCall(TSSolve(ts, U)); in main() 71 PetscCall(VecDestroy(&U)); in main() [all …]
|
| H A D | ex10.c | 15 Vec U, V; member 30 PetscErrorCode TSDAESimpleSetRHSFunction(TSDAESimple tsdae, Vec U, PetscErrorCode (*f)(PetscReal, V… in TSDAESimpleSetRHSFunction() argument 34 tsdae->U = U; in TSDAESimpleSetRHSFunction() 35 PetscCall(PetscObjectReference((PetscObject)U)); in TSDAESimpleSetRHSFunction() 54 PetscCall(VecDestroy(&(*tsdae)->U)); in TSDAESimpleDestroy() 84 Vec U; member 93 PetscErrorCode TSDAESimple_Reduced_TSFunction(TS ts, PetscReal t, Vec U, Vec F, void *actx) in TSDAESimple_Reduced_TSFunction() argument 100 red->U = U; in TSDAESimple_Reduced_TSFunction() 102 PetscCall((*tsdae->f)(t, U, tsdae->V, F, tsdae->fctx)); in TSDAESimple_Reduced_TSFunction() 116 PetscCall((*tsdae->F)(red->t, red->U, V, F, tsdae->Fctx)); in TSDAESimple_Reduced_SNESFunction() [all …]
|
| /petsc/src/mat/impls/lrc/ ! |
| H A D | lrc.c | 7 Mat U, V; /* dense tall-skinny matrices */ member 17 Mat U, V; in MatMult_LRC_kernel() local 20 U = transpose ? Na->V : Na->U; in MatMult_LRC_kernel() 21 V = transpose ? Na->U : Na->V; in MatMult_LRC_kernel() 32 PetscCall(MatMultAdd(U, Na->work1, y, y)); in MatMult_LRC_kernel() 34 PetscCall(MatMult(U, Na->work1, y)); in MatMult_LRC_kernel() 46 PetscCall(MatDenseGetLocalMatrix(U, &Uloc)); in MatMult_LRC_kernel() 106 PetscCall(MatDestroy(&Na->U)); in MatDestroy_LRC() 119 static PetscErrorCode MatLRCGetMats_LRC(Mat N, Mat *A, Mat *U, Vec *c, Mat *V) in MatLRCGetMats_LRC() argument 125 if (U) *U = Na->U; in MatLRCGetMats_LRC() [all …]
|
| /petsc/src/ts/tutorials/ ! |
| H A D | ex51.c | 18 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, void *s) in RHSFunction() argument 24 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction() 30 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction() 38 static PetscErrorCode ExactSolution(PetscReal t, Vec U) in ExactSolution() argument 43 PetscCall(VecGetArray(U, &u)); in ExactSolution() 48 PetscCall(VecRestoreArray(U, &u)); in ExactSolution() 55 Vec U; /* numerical solution will be stored here */ in main() local 87 PetscCall(VecCreate(PETSC_COMM_WORLD, &U)); in main() 88 PetscCall(VecSetSizes(U, n, PETSC_DETERMINE)); in main() 89 PetscCall(VecSetUp(U)); in main() [all …]
|
| H A D | ex41.c | 17 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal *fvalue, PetscCtx ctx) in EventFunction() argument 23 PetscCall(VecGetArrayRead(U, &u)); in EventFunction() 25 PetscCall(VecRestoreArrayRead(U, &u)); in EventFunction() 29 PetscErrorCode PostEventFunction(TS ts, PetscInt nevents, PetscInt event_list[], PetscReal t, Vec U… in PostEventFunction() argument 39 PetscCall(VecGetArray(U, &u)); in PostEventFunction() 42 PetscCall(VecRestoreArray(U, &u)); in PostEventFunction() 50 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, PetscCtx ctx) in RHSFunction() argument 57 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction() 63 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction() 71 static PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec U, Mat A, Mat B, PetscCtx ctx) in RHSJacobian() argument [all …]
|
| H A D | ex40.c | 21 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal *fvalue, PetscCtx ctx) in EventFunction() argument 27 PetscCall(VecGetArrayRead(U, &u)); in EventFunction() 29 PetscCall(VecRestoreArrayRead(U, &u)); in EventFunction() 33 PetscErrorCode PostEventFunction(TS ts, PetscInt nevents, PetscInt event_list[], PetscReal t, Vec U… in PostEventFunction() argument 41 PetscCall(VecGetArray(U, &u)); in PostEventFunction() 44 PetscCall(VecRestoreArray(U, &u)); in PostEventFunction() 56 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, PetscCtx ctx) in RHSFunction() argument 63 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction() 69 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction() 77 static PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec U, Mat A, Mat B, PetscCtx ctx) in RHSJacobian() argument [all …]
|
| H A D | ex20opt_ic.c | 26 Vec U, Lambda[1], Mup[1]; /* first-order adjoint variables */ member 37 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, PetscCtx ctx) in RHSFunction() argument 44 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction() 48 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction() 53 static PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec U, Mat A, Mat B, PetscCtx ctx) in RHSJacobian() argument 62 PetscCall(VecGetArrayRead(U, &u)); in RHSJacobian() 74 PetscCall(VecRestoreArrayRead(U, &u)); in RHSJacobian() 78 static PetscErrorCode RHSHessianProductUU(TS ts, PetscReal t, Vec U, Vec *Vl, Vec Vr, Vec *VHV, Pet… in RHSHessianProductUU() argument 87 PetscCall(VecGetArrayRead(U, &u)); in RHSHessianProductUU() 100 PetscCall(VecRestoreArrayRead(U, &u)); in RHSHessianProductUU() [all …]
|
| H A D | ex44.c | 23 static PetscErrorCode Event(TS ts, PetscReal t, Vec U, PetscReal *fvalue, PetscCtx ctx) in Event() argument 30 PetscCall(TS2GetSolution(ts, &U, &V)); in Event() 31 PetscCall(VecGetArrayRead(U, &u)); in Event() 33 PetscCall(VecRestoreArrayRead(U, &u)); in Event() 37 static PetscErrorCode PostEvent(TS ts, PetscInt nevents, PetscInt event_list[], PetscReal t, Vec U,… in PostEvent() argument 50 PetscCall(TS2GetSolution(ts, &U, &V)); in PostEvent() 51 PetscCall(VecGetArray(U, &u)); in PostEvent() 55 PetscCall(VecRestoreArray(U, &u)); in PostEvent() 68 static PetscErrorCode I2Function(TS ts, PetscReal t, Vec U, Vec V, Vec A, Vec F, PetscCtx ctx) in I2Function() argument 75 PetscCall(VecGetArrayRead(U, &u)); in I2Function() [all …]
|
| /petsc/src/ts/tutorials/multirate/ ! |
| H A D | ex3.c | 18 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunction() argument 24 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction() 28 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction() 33 static PetscErrorCode RHSFunctionslow(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionslow() argument 39 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionslow() 42 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionslow() 47 static PetscErrorCode RHSFunctionfast(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionfast() argument 53 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionfast() 56 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionfast() 61 static PetscErrorCode sol_true(PetscReal t, Vec U) in sol_true() argument [all …]
|
| H A D | ex3fastslowsplit.c | 23 static PetscErrorCode RHSFunctionslow(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionslow() argument 29 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionslow() 32 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionslow() 37 static PetscErrorCode RHSFunctionfast(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionfast() argument 43 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionfast() 46 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionfast() 51 static PetscErrorCode IFunctionfast(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunctionfast() argument 57 PetscCall(VecGetArrayRead(U, &u)); in IFunctionfast() 62 PetscCall(VecRestoreArrayRead(U, &u)); in IFunctionfast() 67 static PetscErrorCode IJacobianfast(TS ts, PetscReal t, Vec U, Vec Udot, PetscReal a, Mat A, Mat B,… in IJacobianfast() argument [all …]
|
| H A D | ex2.c | 18 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunction() argument 24 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction() 28 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction() 33 static PetscErrorCode RHSFunctionslow(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionslow() argument 39 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionslow() 42 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionslow() 47 static PetscErrorCode RHSFunctionfast(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionfast() argument 53 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionfast() 56 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionfast() 64 static PetscErrorCode sol_true(PetscReal t, Vec U, AppCtx *ctx) in sol_true() argument [all …]
|
| H A D | ex1.c | 18 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunction() argument 24 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction() 28 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction() 33 static PetscErrorCode RHSFunctionslow(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionslow() argument 39 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionslow() 42 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionslow() 47 static PetscErrorCode RHSFunctionfast(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionfast() argument 53 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionfast() 56 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionfast() 64 static PetscErrorCode sol_true(PetscReal t, Vec U, AppCtx *ctx) in sol_true() argument [all …]
|
| /petsc/include/petsc/private/cpp/ ! |
| H A D | utility.hpp | 20 template <class T, class U = T> 21 inline T exchange(T &orig, U &&new_value) 24 orig = std::forward<U>(new_value); 118 template <typename T, typename U, int selector> 122 template <typename T, typename U> 123 class compressed_pair_impl<T, U, 0> : std::pair<T, U> { 124 using base_type = std::pair<T, U>; 139 template <typename T, typename U> 140 class compressed_pair_impl<T, U, 1> : T { 146 using second_type = U; [all …]
|
| /petsc/src/ts/tutorials/hybrid/ ! |
| H A D | ex1fd.c | 28 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal *fvalue, PetscCtx ctx) in EventFunction() argument 34 PetscCall(VecGetArrayRead(U, &u)); in EventFunction() 40 PetscCall(VecRestoreArrayRead(U, &u)); in EventFunction() 44 PetscErrorCode ShiftGradients(TS ts, Vec U, AppCtx *actx) in ShiftGradients() argument 54 PetscCall(VecGetArrayRead(U, &u)); in ShiftGradients() 77 PetscCall(VecRestoreArrayRead(U, &u)); in ShiftGradients() 101 PetscErrorCode PostEventFunction(TS ts, PetscInt nevents, PetscInt event_list[], PetscReal t, Vec U… in PostEventFunction() argument 106 if (!forwardsolve) PetscCall(ShiftGradients(ts, U, actx)); in PostEventFunction() 120 static PetscErrorCode IFunction(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, PetscCtx ctx) in IFunction() argument 128 PetscCall(VecGetArrayRead(U, &u)); in IFunction() [all …]
|
| H A D | ex1.c | 26 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal *fvalue, PetscCtx ctx) in EventFunction() argument 32 PetscCall(VecGetArrayRead(U, &u)); in EventFunction() 38 PetscCall(VecRestoreArrayRead(U, &u)); in EventFunction() 42 PetscErrorCode PostEventFunction(TS ts, PetscInt nevents, PetscInt event_list[], PetscReal t, Vec U… in PostEventFunction() argument 60 static PetscErrorCode IFunction(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, PetscCtx ctx) in IFunction() argument 68 PetscCall(VecGetArrayRead(U, &u)); in IFunction() 80 PetscCall(VecRestoreArrayRead(U, &u)); in IFunction() 89 static PetscErrorCode IJacobian(TS ts, PetscReal t, Vec U, Vec Udot, PetscReal a, Mat A, Mat B, Pet… in IJacobian() argument 97 PetscCall(VecGetArrayRead(U, &u)); in IJacobian() 113 PetscCall(VecRestoreArrayRead(U, &u)); in IJacobian() [all …]
|
| /petsc/src/ts/tutorials/autodiff/ ! |
| H A D | adr_ex1.cxx | 40 PetscErrorCode IFunctionPassive(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunctionPassive() argument 47 PetscCall(VecGetArrayRead(U, &u)); in IFunctionPassive() 55 PetscCall(VecRestoreArrayRead(U, &u)); in IFunctionPassive() 62 PetscErrorCode IFunctionActive1(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunctionActive1() argument 72 PetscCall(VecGetArrayRead(U, &u)); in IFunctionActive1() 92 PetscCall(VecRestoreArrayRead(U, &u)); in IFunctionActive1() 99 PetscErrorCode IFunctionActive2(TS ts, PetscReal t, Vec U, Vec Udot, Vec F, AppCtx *ctx) in IFunctionActive2() argument 109 PetscCall(VecGetArrayRead(U, &u)); in IFunctionActive2() 129 PetscCall(VecRestoreArrayRead(U, &u)); in IFunctionActive2() 137 PetscErrorCode IJacobian(TS ts, PetscReal t, Vec U, Vec Udot, PetscReal a, Mat A, Mat B, AppCtx *ct… in IJacobian() argument [all …]
|
| /petsc/src/ksp/ksp/impls/cg/pipecg/ ! |
| H A D | pipecg.c | 25 Vec X, B, Z, P, W, Q, U, M, N, R, S; in KSPSolve_PIPECG() local 41 U = ksp->work[6]; in KSPSolve_PIPECG() 55 PetscCall(KSP_PCApply(ksp, R, U)); /* u <- Br */ in KSPSolve_PIPECG() 59 PetscCall(VecNormBegin(U, NORM_2, &dp)); /* dp <- u'*u = e'*A'*B'*B*A'*e' */ in KSPSolve_PIPECG() 60 PetscCall(PetscCommSplitReductionBegin(PetscObjectComm((PetscObject)U))); in KSPSolve_PIPECG() 61 PetscCall(KSP_MatMult(ksp, Amat, U, W)); /* w <- Au */ in KSPSolve_PIPECG() 62 PetscCall(VecNormEnd(U, NORM_2, &dp)); in KSPSolve_PIPECG() 67 PetscCall(KSP_MatMult(ksp, Amat, U, W)); /* w <- Au */ in KSPSolve_PIPECG() 71 PetscCall(VecDotBegin(R, U, &gamma)); /* gamma <- u'*r */ in KSPSolve_PIPECG() 73 PetscCall(KSP_MatMult(ksp, Amat, U, W)); /* w <- Au */ in KSPSolve_PIPECG() [all …]
|
| /petsc/src/ksp/ksp/impls/cr/pipecr/ ! |
| H A D | pipecr.c | 25 Vec X, B, Z, P, W, Q, U, M, N; in KSPSolve_PIPECR() local 41 U = ksp->work[6]; in KSPSolve_PIPECR() 53 PetscCall(KSP_PCApply(ksp, W, U)); /* u <- Bw */ in KSPSolve_PIPECR() 57 PetscCall(VecNormBegin(U, NORM_2, &dp)); /* dp <- u'*u = e'*A'*B'*B*A'*e' */ in KSPSolve_PIPECR() 58 PetscCall(PetscCommSplitReductionBegin(PetscObjectComm((PetscObject)U))); in KSPSolve_PIPECR() 59 PetscCall(KSP_MatMult(ksp, Amat, U, W)); /* w <- Au */ in KSPSolve_PIPECR() 60 PetscCall(VecNormEnd(U, NORM_2, &dp)); in KSPSolve_PIPECR() 63 PetscCall(KSP_MatMult(ksp, Amat, U, W)); in KSPSolve_PIPECR() 79 if (i > 0 && ksp->normtype == KSP_NORM_PRECONDITIONED) PetscCall(VecNormBegin(U, NORM_2, &dp)); in KSPSolve_PIPECR() 80 PetscCall(VecDotBegin(W, U, &gamma)); in KSPSolve_PIPECR() [all …]
|
| /petsc/src/mat/tests/ ! |
| H A D | ex102.c | 8 Mat A, U, V, LR, X, LRe; in main() local 32 PetscCall(MatCreate(PETSC_COMM_WORLD, &U)); in main() 33 PetscCall(MatSetSizes(U, PETSC_DECIDE, PETSC_DECIDE, M, 3)); in main() 34 PetscCall(MatSetType(U, MATDENSE)); in main() 35 PetscCall(MatSetOptionsPrefix(U, "U_")); in main() 36 PetscCall(MatSetFromOptions(U)); in main() 37 PetscCall(MatSetUp(U)); in main() 38 PetscCall(MatSetRandom(U, NULL)); in main() 66 PetscCall(MatCreateLRC(NULL, U, c, V, &LR)); in main() 69 PetscCall(MatCreateLRC(A, U, c, V, &LR)); in main() [all …]
|
| /petsc/src/sys/objects/device/impls/ ! |
| H A D | segmentedmempool.hpp | 30 template <typename U = T> 31 …PETSC_NODISCARD auto get_stream() const noexcept PETSC_DECLTYPE_AUTO_RETURNS(static_cast<const U &… 57 template <typename U = T> 58 static constexpr PetscErrorCode record_event_(const typename U::event_type &) noexcept in record_event_() 63 template <typename U = T> 64 static constexpr PetscErrorCode wait_for_(const typename U::event_type &) noexcept in wait_for_() 117 template <typename U> 118 PetscErrorCode release(const device::StreamBase<U> *) noexcept; 119 template <typename U> 120 PetscErrorCode claim(const device::StreamBase<U> *, size_type, bool *, bool = false) noexcept; [all …]
|
| /petsc/src/ts/tutorials/advection-diffusion-reaction/ ! |
| H A D | ex5opt_ic.c | 29 PetscErrorCode InitializeLambda(DM da, Vec lambda, Vec U, AppCtx *appctx) in InitializeLambda() argument 36 PetscCall(VecDuplicate(U, &Uob)); in InitializeLambda() 41 PetscCall(VecAYPX(Uob, -1., U)); in InitializeLambda() 64 PetscErrorCode GenerateOBs(TS ts, Vec U, AppCtx *appctx) in GenerateOBs() argument 72 PetscCall(TSSolve(ts, U)); in GenerateOBs() 75 PetscCall(VecView(U, viewer)); in GenerateOBs() 80 PetscErrorCode InitialConditions(DM da, Vec U) in InitialConditions() argument 92 PetscCall(DMDAVecGetArray(da, U, &u)); in InitialConditions() 108 PetscCall(DMDAVecRestoreArray(da, U, &u)); in InitialConditions() 112 PetscErrorCode PerturbedInitialConditions(DM da, Vec U) in PerturbedInitialConditions() argument [all …]
|
| /petsc/src/ts/tutorials/power_grid/ ! |
| H A D | ex9.c | 41 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunction() argument 48 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction() 56 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction() 64 static PetscErrorCode RHSJacobian(TS ts, PetscReal t, Vec U, Mat A, Mat B, AppCtx *ctx) in RHSJacobian() argument 71 PetscCall(VecGetArrayRead(U, &u)); in RHSJacobian() 81 PetscCall(VecRestoreArrayRead(U, &u)); in RHSJacobian() 95 Vec U; /* solution will be stored here */ in main() local 121 PetscCall(MatCreateVecs(A, &U, NULL)); in main() 151 PetscCall(VecGetArray(U, &u)); in main() 159 PetscCall(VecRestoreArray(U, &u)); in main() [all …]
|