ceed-qfunction.c (1b435e3e1693e8fff7833242fcaf0c0eb0e7b47d) ceed-qfunction.c (14922b2aa5b06c5d10198c874ef2e7680888d59b)
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.

--- 285 unchanged lines hidden (view full) ---

294**/
295
296int CeedQFunctionGetFortranStatus(CeedQFunction qf, bool *fortranstatus) {
297 *fortranstatus = qf->fortranstatus;
298 return 0;
299}
300
301/**
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.

--- 285 unchanged lines hidden (view full) ---

294**/
295
296int CeedQFunctionGetFortranStatus(CeedQFunction qf, bool *fortranstatus) {
297 *fortranstatus = qf->fortranstatus;
298 return 0;
299}
300
301/**
302 @brief Get Fortran global context for a CeedQFunction
302 @brief Get true user context for a CeedQFunction
303
304 @param qf CeedQFunction
305 @param[out] ctx Variable to store context data values
306
307 @return An error code: 0 - success, otherwise - failure
308
309 @ref Advanced
310**/
311
303
304 @param qf CeedQFunction
305 @param[out] ctx Variable to store context data values
306
307 @return An error code: 0 - success, otherwise - failure
308
309 @ref Advanced
310**/
311
312int CeedQFunctionGetFortranContext(CeedQFunction qf, void* *ctx) {
313 if (!qf->fortranstatus)
314 return CeedError(qf->ceed, 1,
315 "QFunction was not set using Fortran");
312int CeedQFunctionGetInnerContext(CeedQFunction qf, void* *ctx) {
313 if (qf->fortranstatus) {
314 fContext *fctx = qf->ctx;
315 *ctx = fctx->innerctx;
316 } else {
317 *ctx = qf->ctx;
318 }
316
319
317 fContext *fctx = qf->ctx;
318 *ctx = fctx->innerctx;
319 return 0;
320}
321
322/**
323 @brief Get backend data of a CeedQFunction
324
325 @param qf CeedQFunction
326 @param[out] data Variable to store data

--- 176 unchanged lines hidden ---
320 return 0;
321}
322
323/**
324 @brief Get backend data of a CeedQFunction
325
326 @param qf CeedQFunction
327 @param[out] data Variable to store data

--- 176 unchanged lines hidden ---