| ceed-qfunctioncontext.c (b36f2af8eb4e779074f4d92faffbc034a6db4539) | ceed-qfunctioncontext.c (706efda32ea467a11ddceea40dd85d82235bf3f8) |
|---|---|
| 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. --- 497 unchanged lines hidden (view full) --- 506 507 @return An error code: 0 - success, otherwise - failure 508 509 @ref User 510**/ 511int CeedQFunctionContextRestoreData(CeedQFunctionContext ctx, void *data) { 512 int ierr; 513 | 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. --- 497 unchanged lines hidden (view full) --- 506 507 @return An error code: 0 - success, otherwise - failure 508 509 @ref User 510**/ 511int CeedQFunctionContextRestoreData(CeedQFunctionContext ctx, void *data) { 512 int ierr; 513 |
| 514 if (!ctx->RestoreData) 515 // LCOV_EXCL_START 516 return CeedError(ctx->ceed, CEED_ERROR_UNSUPPORTED, 517 "Backend does not support RestoreData"); 518 // LCOV_EXCL_STOP 519 | |
| 520 if (ctx->state % 2 != 1) 521 // LCOV_EXCL_START 522 return CeedError(ctx->ceed, 1, 523 "Cannot restore CeedQFunctionContext array access, " 524 "access was not granted"); 525 // LCOV_EXCL_STOP 526 | 514 if (ctx->state % 2 != 1) 515 // LCOV_EXCL_START 516 return CeedError(ctx->ceed, 1, 517 "Cannot restore CeedQFunctionContext array access, " 518 "access was not granted"); 519 // LCOV_EXCL_STOP 520 |
| 527 ierr = ctx->RestoreData(ctx); CeedChk(ierr); | 521 if (ctx->RestoreData) { 522 ierr = ctx->RestoreData(ctx); CeedChk(ierr); 523 } |
| 528 *(void **)data = NULL; 529 ctx->state += 1; 530 return CEED_ERROR_SUCCESS; 531} 532 533/** 534 @brief Register QFunctionContext a field holding a double precision value 535 --- 182 unchanged lines hidden --- | 524 *(void **)data = NULL; 525 ctx->state += 1; 526 return CEED_ERROR_SUCCESS; 527} 528 529/** 530 @brief Register QFunctionContext a field holding a double precision value 531 --- 182 unchanged lines hidden --- |