| ceed-basis.c (dc1dbf0744997d47eb98656f475bfd131b09dcf8) | ceed-basis.c (b502e64cbeabbc96703d2df7381e3a0625ff8762) |
|---|---|
| 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. --- 593 unchanged lines hidden (view full) --- 602 603 @return An error code: 0 - success, otherwise - failure 604 605 @ref Advanced 606**/ 607int CeedBasisApply(CeedBasis basis, CeedInt nelem, CeedTransposeMode tmode, 608 CeedEvalMode emode, CeedVector u, CeedVector v) { 609 int ierr; | 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. --- 593 unchanged lines hidden (view full) --- 602 603 @return An error code: 0 - success, otherwise - failure 604 605 @ref Advanced 606**/ 607int CeedBasisApply(CeedBasis basis, CeedInt nelem, CeedTransposeMode tmode, 608 CeedEvalMode emode, CeedVector u, CeedVector v) { 609 int ierr; |
| 610 CeedInt ulength = 0, vlength, ndof, nqpt; |
|
| 610 if (!basis->Apply) return CeedError(basis->ceed, 1, | 611 if (!basis->Apply) return CeedError(basis->ceed, 1, |
| 611 "Backend does not support BasisApply"); | 612 "Backend does not support BasisApply"); 613 // check compatibility of topological and geometrical dimensions 614 ierr = CeedBasisGetNumNodes(basis, &ndof); CeedChk(ierr); 615 ierr = CeedBasisGetNumQuadraturePoints(basis, &nqpt); CeedChk(ierr); 616 ierr = CeedVectorGetLength(v, &vlength); CeedChk(ierr); 617 618 if (u) { 619 ierr = CeedVectorGetLength(u, &ulength); CeedChk(ierr); 620 } 621 622 if ((tmode == CEED_TRANSPOSE && (vlength % ndof != 0 || ulength % nqpt != 0)) || 623 (tmode == CEED_NOTRANSPOSE && (ulength % ndof != 0 || vlength % nqpt != 0))) 624 return CeedError(basis->ceed, 1, 625 "Length of input/output vectors incompatible with basis dimensions"); 626 |
| 612 ierr = basis->Apply(basis, nelem, tmode, emode, u, v); CeedChk(ierr); 613 return 0; 614} 615 616/** 617 @brief Get Ceed associated with a CeedBasis 618 619 @param basis CeedBasis --- 262 unchanged lines hidden --- | 627 ierr = basis->Apply(basis, nelem, tmode, emode, u, v); CeedChk(ierr); 628 return 0; 629} 630 631/** 632 @brief Get Ceed associated with a CeedBasis 633 634 @param basis CeedBasis --- 262 unchanged lines hidden --- |