ceed-qfunction.c (418fb8c26cd03fc44256773f44bb9ece8ec63e5f) ceed-qfunction.c (069aeaba34b4b3cfb8ce3ee7622d1de203dfbf5c)
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.

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

252 @param[out] ctxsize Variable to store size of context data values
253
254 @return An error code: 0 - success, otherwise - failure
255
256 @ref Advanced
257**/
258
259int CeedQFunctionGetContextSize(CeedQFunction qf, size_t *ctxsize) {
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.

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

252 @param[out] ctxsize Variable to store size of context data values
253
254 @return An error code: 0 - success, otherwise - failure
255
256 @ref Advanced
257**/
258
259int CeedQFunctionGetContextSize(CeedQFunction qf, size_t *ctxsize) {
260 *ctxsize = qf->ctxsize;
260 if (qf->fortranstatus) {
261 fContext *fctx = qf->ctx;
262 *ctxsize = fctx->innerctxsize;
263 } else {
264 *ctxsize = qf->ctxsize;
265 }
261 return 0;
262}
263
264/**
265 @brief Get global context for a CeedQFunction
266
267 @param qf CeedQFunction
268 @param[out] ctx Variable to store context data values

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

289**/
290
291int CeedQFunctionGetFortranStatus(CeedQFunction qf, bool *fortranstatus) {
292 *fortranstatus = qf->fortranstatus;
293 return 0;
294}
295
296/**
266 return 0;
267}
268
269/**
270 @brief Get global context for a CeedQFunction
271
272 @param qf CeedQFunction
273 @param[out] ctx Variable to store context data values

--- 20 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
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");
316
317 fContext *fctx = qf->ctx;
318 *ctx = fctx->innerctx;
319 return 0;
320}
321
322/**
297 @brief Get backend data of a CeedQFunction
298
299 @param qf CeedQFunction
300 @param[out] data Variable to store data
301
302 @return An error code: 0 - success, otherwise - failure
303
304 @ref Advanced

--- 172 unchanged lines hidden ---
323 @brief Get backend data of a CeedQFunction
324
325 @param qf CeedQFunction
326 @param[out] data Variable to store data
327
328 @return An error code: 0 - success, otherwise - failure
329
330 @ref Advanced

--- 172 unchanged lines hidden ---