ceed.h (38d0029a08e84b16bbdde77c27446234f5f09cf2) ceed.h (7a982d89c751e293e39d23a7c44a161cef1fcd06)
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.

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

28///
29/// @page FunctionCategories libCEED: Types of Functions
30/// libCEED provides three different header files depending upon the type of
31/// functions a user requires.
32/// @section Utility Utility Functions
33/// These functions are intended general utilities that may be useful to
34/// libCEED developers and users. These functions can generally be found in
35/// "ceed.h".
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.

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

28///
29/// @page FunctionCategories libCEED: Types of Functions
30/// libCEED provides three different header files depending upon the type of
31/// functions a user requires.
32/// @section Utility Utility Functions
33/// These functions are intended general utilities that may be useful to
34/// libCEED developers and users. These functions can generally be found in
35/// "ceed.h".
36/// @section Basic User Functions
37/// These functions are intended to be used by general users of the libCEED
38/// interface. These functions can generally be found in "ceed.h".
39/// @section Advanced Backend Developer Functions
40/// These functions are intended to be used by backend developers of the
41/// libCEED interface. These functions can generally be found in
42/// "ceed-backend.h".
43/// @section Developer Frontend Developer Functions
44/// These functions are intended to be used by frontend developers of the
45/// libCEED interface. These functions can generally be found in "ceed-impl.h".
36/// @section User User Functions
37/// These functions are intended to be used by general users of libCEED
38/// and can generally be found in "ceed.h".
39/// @section Backend Backend Developer Functions
40/// These functions are intended to be used by backend developers of
41/// libCEED and can generally be found in "ceed-backend.h".
42/// @section Developer Library Developer Functions
43/// These functions are intended to be used by library developers of
44/// libCEED and can generally be found in "ceed-impl.h".
46
47/**
48 CEED_EXTERN is used in this header to denote all publicly visible symbols.
49
50 No other file should declare publicly visible symbols, thus it should never be
51 used outside ceed.h.
52 */
53#ifdef __cplusplus

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

76
77#include <assert.h>
78#include <stdint.h>
79#include <stddef.h>
80#include <stdarg.h>
81#include <stdio.h>
82#include <stdbool.h>
83
45
46/**
47 CEED_EXTERN is used in this header to denote all publicly visible symbols.
48
49 No other file should declare publicly visible symbols, thus it should never be
50 used outside ceed.h.
51 */
52#ifdef __cplusplus

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

75
76#include <assert.h>
77#include <stdint.h>
78#include <stddef.h>
79#include <stdarg.h>
80#include <stdio.h>
81#include <stdbool.h>
82
84/// We can discuss ways to avoid forcing these to be compile-time decisions,
85/// but let's leave that for later.
86/// Integer type, used for indexing
87/// @ingroup Ceed
88typedef int32_t CeedInt;
89/// Scalar (floating point) type
90/// @ingroup Ceed
91typedef double CeedScalar;
92
93/// Library context created by CeedInit()
83/// Integer type, used for indexing
84/// @ingroup Ceed
85typedef int32_t CeedInt;
86/// Scalar (floating point) type
87/// @ingroup Ceed
88typedef double CeedScalar;
89
90/// Library context created by CeedInit()
94/// @ingroup Ceed
91/// @ingroup CeedUser
95typedef struct Ceed_private *Ceed;
96/// Non-blocking Ceed interfaces return a CeedRequest.
97/// To perform an operation immediately, pass \ref CEED_REQUEST_IMMEDIATE instead.
92typedef struct Ceed_private *Ceed;
93/// Non-blocking Ceed interfaces return a CeedRequest.
94/// To perform an operation immediately, pass \ref CEED_REQUEST_IMMEDIATE instead.
98/// @ingroup Ceed
95/// @ingroup CeedUser
99typedef struct CeedRequest_private *CeedRequest;
100/// Handle for vectors over the field \ref CeedScalar
96typedef struct CeedRequest_private *CeedRequest;
97/// Handle for vectors over the field \ref CeedScalar
101/// @ingroup CeedVector
98/// @ingroup CeedVectorUser
102typedef struct CeedVector_private *CeedVector;
103/// Handle for object describing restriction to elements
99typedef struct CeedVector_private *CeedVector;
100/// Handle for object describing restriction to elements
104/// @ingroup CeedElemRestriction
101/// @ingroup CeedElemRestrictionUser
105typedef struct CeedElemRestriction_private *CeedElemRestriction;
106/// Handle for object describing discrete finite element evaluations
102typedef struct CeedElemRestriction_private *CeedElemRestriction;
103/// Handle for object describing discrete finite element evaluations
107/// @ingroup CeedBasis
104/// @ingroup CeedBasisUser
108typedef struct CeedBasis_private *CeedBasis;
109/// Handle for object describing functions evaluated independently at quadrature points
105typedef struct CeedBasis_private *CeedBasis;
106/// Handle for object describing functions evaluated independently at quadrature points
110/// @ingroup CeedQFunction
107/// @ingroup CeedQFunctionUser
111typedef struct CeedQFunction_private *CeedQFunction;
112/// Handle for object describing FE-type operators acting on vectors
113///
114/// Given an element restriction \f$E\f$, basis evaluator \f$B\f$, and
115/// quadrature function\f$f\f$, a CeedOperator expresses operations of the form
116/// $$ E^T B^T f(B E u) $$
117/// acting on the vector \f$u\f$.
108typedef struct CeedQFunction_private *CeedQFunction;
109/// Handle for object describing FE-type operators acting on vectors
110///
111/// Given an element restriction \f$E\f$, basis evaluator \f$B\f$, and
112/// quadrature function\f$f\f$, a CeedOperator expresses operations of the form
113/// $$ E^T B^T f(B E u) $$
114/// acting on the vector \f$u\f$.
118/// @ingroup CeedOperator
115/// @ingroup CeedOperatorUser
119typedef struct CeedOperator_private *CeedOperator;
120
121CEED_EXTERN int CeedInit(const char *resource, Ceed *ceed);
122CEED_EXTERN int CeedGetResource(Ceed ceed, const char **resource);
123CEED_EXTERN int CeedDestroy(Ceed *ceed);
124
125CEED_EXTERN int CeedErrorImpl(Ceed, const char *, int, const char *, int,
126 const char *, ...);

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

452 CeedElemRestriction r, CeedBasis b,
453 CeedVector v);
454CEED_EXTERN int CeedCompositeOperatorAddSub(CeedOperator compositeop,
455 CeedOperator subop);
456CEED_EXTERN int CeedOperatorAssembleLinearQFunction(CeedOperator op,
457 CeedVector *assembled, CeedElemRestriction *rstr, CeedRequest *request);
458CEED_EXTERN int CeedOperatorAssembleLinearDiagonal(CeedOperator op,
459 CeedVector *assembled, CeedRequest *request);
116typedef struct CeedOperator_private *CeedOperator;
117
118CEED_EXTERN int CeedInit(const char *resource, Ceed *ceed);
119CEED_EXTERN int CeedGetResource(Ceed ceed, const char **resource);
120CEED_EXTERN int CeedDestroy(Ceed *ceed);
121
122CEED_EXTERN int CeedErrorImpl(Ceed, const char *, int, const char *, int,
123 const char *, ...);

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

449 CeedElemRestriction r, CeedBasis b,
450 CeedVector v);
451CEED_EXTERN int CeedCompositeOperatorAddSub(CeedOperator compositeop,
452 CeedOperator subop);
453CEED_EXTERN int CeedOperatorAssembleLinearQFunction(CeedOperator op,
454 CeedVector *assembled, CeedElemRestriction *rstr, CeedRequest *request);
455CEED_EXTERN int CeedOperatorAssembleLinearDiagonal(CeedOperator op,
456 CeedVector *assembled, CeedRequest *request);
460CEED_EXTERN int CeedOperatorView(CeedOperator op, FILE *stream);
461CEED_EXTERN int CeedOperatorCreateFDMElementInverse(CeedOperator op,
462 CeedOperator *fdminv, CeedRequest *request);
457CEED_EXTERN int CeedOperatorCreateFDMElementInverse(CeedOperator op,
458 CeedOperator *fdminv, CeedRequest *request);
459CEED_EXTERN int CeedOperatorView(CeedOperator op, FILE *stream);
463CEED_EXTERN int CeedOperatorApply(CeedOperator op, CeedVector in,
464 CeedVector out, CeedRequest *request);
465CEED_EXTERN int CeedOperatorApplyAdd(CeedOperator op, CeedVector in,
466 CeedVector out, CeedRequest *request);
467CEED_EXTERN int CeedOperatorDestroy(CeedOperator *op);
468
469/**
470 @brief Return integer power

--- 31 unchanged lines hidden ---
460CEED_EXTERN int CeedOperatorApply(CeedOperator op, CeedVector in,
461 CeedVector out, CeedRequest *request);
462CEED_EXTERN int CeedOperatorApplyAdd(CeedOperator op, CeedVector in,
463 CeedVector out, CeedRequest *request);
464CEED_EXTERN int CeedOperatorDestroy(CeedOperator *op);
465
466/**
467 @brief Return integer power

--- 31 unchanged lines hidden ---