| ceed-vector.c (e0dd3b27d19566a0742e776b14ca8ce6d5794b11) | ceed-vector.c (96b902e2a709bcaf161c65c2cb076b00357cddfa) |
|---|---|
| 1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3// reserved. See files LICENSE and NOTICE for details. 4// 5// This file is part of CEED, a collection of benchmarks, miniapps, software 6// libraries and APIs for efficient high-order finite element and spectral 7// element discretizations for exascale applications. For more information and 8// source code availability see http://github.com/ceed. --- 22 unchanged lines hidden (view full) --- 31 32/// @addtogroup CeedVectorUser 33/// @{ 34 35/// Indicate that vector will be provided as an explicit argument to 36/// CeedOperatorApply(). 37const CeedVector CEED_VECTOR_ACTIVE = &ceed_vector_active; 38 | 1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3// reserved. See files LICENSE and NOTICE for details. 4// 5// This file is part of CEED, a collection of benchmarks, miniapps, software 6// libraries and APIs for efficient high-order finite element and spectral 7// element discretizations for exascale applications. For more information and 8// source code availability see http://github.com/ceed. --- 22 unchanged lines hidden (view full) --- 31 32/// @addtogroup CeedVectorUser 33/// @{ 34 35/// Indicate that vector will be provided as an explicit argument to 36/// CeedOperatorApply(). 37const CeedVector CEED_VECTOR_ACTIVE = &ceed_vector_active; 38 |
| 39/// Indicate that no vector is applicable (i.e., for @ref CEED_EVAL_WEIGHTS). | 39/// Indicate that no vector is applicable (i.e., for @ref CEED_EVAL_WEIGHT). |
| 40const CeedVector CEED_VECTOR_NONE = &ceed_vector_none; 41 42/// @} 43 44/// ---------------------------------------------------------------------------- 45/// CeedVector Backend API 46/// ---------------------------------------------------------------------------- 47/// @addtogroup CeedVectorBackend --- 481 unchanged lines hidden (view full) --- 529 530 ierr = CeedVectorRestoreArrayRead(vec, &array); CeedChk(ierr); 531 return CEED_ERROR_SUCCESS; 532} 533 534/** 535 @brief Compute x = alpha x 536 | 40const CeedVector CEED_VECTOR_NONE = &ceed_vector_none; 41 42/// @} 43 44/// ---------------------------------------------------------------------------- 45/// CeedVector Backend API 46/// ---------------------------------------------------------------------------- 47/// @addtogroup CeedVectorBackend --- 481 unchanged lines hidden (view full) --- 529 530 ierr = CeedVectorRestoreArrayRead(vec, &array); CeedChk(ierr); 531 return CEED_ERROR_SUCCESS; 532} 533 534/** 535 @brief Compute x = alpha x 536 |
| 537 @param x[in,out] vector for scaling 538 @param alpha[in] scaling factor | 537 @param[in,out] x vector for scaling 538 @param[in] alpha scaling factor |
| 539 540 @return An error code: 0 - success, otherwise - failure 541 542 @ref User 543**/ 544int CeedVectorScale(CeedVector x, CeedScalar alpha) { 545 int ierr; 546 CeedScalar *x_array; --- 12 unchanged lines hidden (view full) --- 559 ierr = CeedVectorRestoreArray(x, &x_array); CeedChk(ierr); 560 561 return CEED_ERROR_SUCCESS; 562} 563 564/** 565 @brief Compute y = alpha x + y 566 | 539 540 @return An error code: 0 - success, otherwise - failure 541 542 @ref User 543**/ 544int CeedVectorScale(CeedVector x, CeedScalar alpha) { 545 int ierr; 546 CeedScalar *x_array; --- 12 unchanged lines hidden (view full) --- 559 ierr = CeedVectorRestoreArray(x, &x_array); CeedChk(ierr); 560 561 return CEED_ERROR_SUCCESS; 562} 563 564/** 565 @brief Compute y = alpha x + y 566 |
| 567 @param y[in,out] target vector for sum 568 @param alpha[in] scaling factor 569 @param x[in] second vector, must be different than y | 567 @param[in,out] y target vector for sum 568 @param[in] alpha scaling factor 569 @param[in] x second vector, must be different than y |
| 570 571 @return An error code: 0 - success, otherwise - failure 572 573 @ref User 574**/ 575int CeedVectorAXPY(CeedVector y, CeedScalar alpha, CeedVector x) { 576 int ierr; 577 CeedScalar *y_array; --- 38 unchanged lines hidden (view full) --- 616 617 return CEED_ERROR_SUCCESS; 618} 619 620/** 621 @brief Compute the pointwise multiplication w = x .* y. Any 622 subset of x, y, and w may be the same vector. 623 | 570 571 @return An error code: 0 - success, otherwise - failure 572 573 @ref User 574**/ 575int CeedVectorAXPY(CeedVector y, CeedScalar alpha, CeedVector x) { 576 int ierr; 577 CeedScalar *y_array; --- 38 unchanged lines hidden (view full) --- 616 617 return CEED_ERROR_SUCCESS; 618} 619 620/** 621 @brief Compute the pointwise multiplication w = x .* y. Any 622 subset of x, y, and w may be the same vector. 623 |
| 624 @param w[out] target vector for the product 625 @param x[in] first vector for product 626 @param y[in] second vector for the product | 624 @param[out] w target vector for the product 625 @param[in] x first vector for product 626 @param[in] y second vector for the product |
| 627 628 @return An error code: 0 - success, otherwise - failure 629 630 @ ref User 631**/ 632int CeedVectorPointwiseMult(CeedVector w, CeedVector x, CeedVector y) { 633 int ierr; 634 CeedScalar *w_array; --- 167 unchanged lines hidden --- | 627 628 @return An error code: 0 - success, otherwise - failure 629 630 @ ref User 631**/ 632int CeedVectorPointwiseMult(CeedVector w, CeedVector x, CeedVector y) { 633 int ierr; 634 CeedScalar *w_array; --- 167 unchanged lines hidden --- |