| ceed-elemrestriction.c (4092d0ee9dee1dc94927b92ec4a4f5b5b7bb02dc) | ceed-elemrestriction.c (b9c05c73848caa4a8e85dca1ee63c2e7e70143c4) |
|---|---|
| 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. --- 398 unchanged lines hidden (view full) --- 407 408 return 0; 409} 410 411/** 412 @brief Get the multiplicity of nodes in a CeedElemRestriction 413 414 @param rstr CeedElemRestriction | 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. --- 398 unchanged lines hidden (view full) --- 407 408 return 0; 409} 410 411/** 412 @brief Get the multiplicity of nodes in a CeedElemRestriction 413 414 @param rstr CeedElemRestriction |
| 415 @param[out] mult Vector to store multiplicity (of size nnodes) | 415 @param[out] mult Vector to store multiplicity (of size nnodes*ncomp) |
| 416 417 @return An error code: 0 - success, otherwise - failure 418 419 @ref Advanced 420**/ 421int CeedElemRestrictionGetMultiplicity(CeedElemRestriction rstr, 422 CeedVector mult) { 423 int ierr; 424 CeedVector evec; 425 426 // Create and set evec 427 ierr = CeedElemRestrictionCreateVector(rstr, NULL, &evec); CeedChk(ierr); 428 ierr = CeedVectorSetValue(evec, 1.0); CeedChk(ierr); | 416 417 @return An error code: 0 - success, otherwise - failure 418 419 @ref Advanced 420**/ 421int CeedElemRestrictionGetMultiplicity(CeedElemRestriction rstr, 422 CeedVector mult) { 423 int ierr; 424 CeedVector evec; 425 426 // Create and set evec 427 ierr = CeedElemRestrictionCreateVector(rstr, NULL, &evec); CeedChk(ierr); 428 ierr = CeedVectorSetValue(evec, 1.0); CeedChk(ierr); |
| 429 ierr = CeedVectorSetValue(mult, 0.0); CeedChk(ierr); |
|
| 429 430 // Apply to get multiplicity 431 ierr = CeedElemRestrictionApply(rstr, CEED_TRANSPOSE, evec, mult, 432 CEED_REQUEST_IMMEDIATE); CeedChk(ierr); 433 434 // Cleanup 435 ierr = CeedVectorDestroy(&evec); CeedChk(ierr); 436 --- 202 unchanged lines hidden --- | 430 431 // Apply to get multiplicity 432 ierr = CeedElemRestrictionApply(rstr, CEED_TRANSPOSE, evec, mult, 433 CEED_REQUEST_IMMEDIATE); CeedChk(ierr); 434 435 // Cleanup 436 ierr = CeedVectorDestroy(&evec); CeedChk(ierr); 437 --- 202 unchanged lines hidden --- |