xref: /libCEED/rust/libceed-sys/c-src/backends/opt/ceed-opt.h (revision 9b2a10adca6d745eeaf97f6468bfab9f8937faaf)
189c6efa4Sjeremylt // Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
289c6efa4Sjeremylt // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
389c6efa4Sjeremylt // All Rights reserved. See files LICENSE and NOTICE for details.
489c6efa4Sjeremylt //
589c6efa4Sjeremylt // This file is part of CEED, a collection of benchmarks, miniapps, software
689c6efa4Sjeremylt // libraries and APIs for efficient high-order finite element and spectral
789c6efa4Sjeremylt // element discretizations for exascale applications. For more information and
889c6efa4Sjeremylt // source code availability see http://github.com/ceed.
989c6efa4Sjeremylt //
1089c6efa4Sjeremylt // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
1189c6efa4Sjeremylt // a collaborative effort of two U.S. Department of Energy organizations (Office
1289c6efa4Sjeremylt // of Science and the National Nuclear Security Administration) responsible for
1389c6efa4Sjeremylt // the planning and preparation of a capable exascale ecosystem, including
1489c6efa4Sjeremylt // software, applications, hardware, advanced system engineering and early
1589c6efa4Sjeremylt // testbed platforms, in support of the nation's exascale computing imperative.
1689c6efa4Sjeremylt 
173d576824SJeremy L Thompson #ifndef _ceed_opt_h
183d576824SJeremy L Thompson #define _ceed_opt_h
193d576824SJeremy L Thompson 
20ec3da8bcSJed Brown #include <ceed/ceed.h>
21ec3da8bcSJed Brown #include <ceed/backend.h>
223d576824SJeremy L Thompson #include <stdbool.h>
233d576824SJeremy L Thompson #include <stdint.h>
2489c6efa4Sjeremylt 
2589c6efa4Sjeremylt typedef struct {
26d1d35e2fSjeremylt   CeedInt blk_size;
2789c6efa4Sjeremylt } Ceed_Opt;
2889c6efa4Sjeremylt 
2989c6efa4Sjeremylt typedef struct {
30d1d35e2fSjeremylt   CeedScalar *colo_grad_1d;
3189c6efa4Sjeremylt } CeedBasis_Opt;
3289c6efa4Sjeremylt 
3389c6efa4Sjeremylt typedef struct {
340b454692Sjeremylt   bool is_identity_qf, is_identity_restr_op;
35d1d35e2fSjeremylt   CeedElemRestriction *blk_restr; /* Blocked versions of restrictions */
3689c6efa4Sjeremylt   CeedVector
37d1d35e2fSjeremylt   *e_vecs;   /* E-vectors needed to apply operator (input followed by outputs) */
38d1d35e2fSjeremylt   CeedScalar **e_data;
39d1d35e2fSjeremylt   uint64_t *input_state;   /* State counter of inputs */
40d1d35e2fSjeremylt   CeedVector *e_vecs_in;   /* Input E-vectors needed to apply operator */
41d1d35e2fSjeremylt   CeedVector *e_vecs_out;  /* Output E-vectors needed to apply operator */
42d1d35e2fSjeremylt   CeedVector *q_vecs_in;   /* Input Q-vectors needed to apply operator */
43d1d35e2fSjeremylt   CeedVector *q_vecs_out;  /* Output Q-vectors needed to apply operator */
44d1d35e2fSjeremylt   CeedInt    num_e_vecs_in;
45d1d35e2fSjeremylt   CeedInt    num_e_vecs_out;
46bb219a0fSJeremy L Thompson   CeedInt    qf_num_active_in, qf_num_active_out;
47bb219a0fSJeremy L Thompson   CeedVector *qf_active_in;
48bb219a0fSJeremy L Thompson   CeedVector qf_lvec;
49bb219a0fSJeremy L Thompson   CeedElemRestriction qf_blk_rstr;
5089c6efa4Sjeremylt } CeedOperator_Opt;
5189c6efa4Sjeremylt 
52*9b2a10adSJeremy L Thompson CEED_INTERN int CeedTensorContractCreate_Opt(CeedBasis basis,
53*9b2a10adSJeremy L Thompson     CeedTensorContract contract);
5489c6efa4Sjeremylt CEED_INTERN int CeedOperatorCreate_Opt(CeedOperator op);
553d576824SJeremy L Thompson 
563d576824SJeremy L Thompson #endif // _ceed_opt_h
57