xref: /libCEED/backends/opt/ceed-opt.h (revision a9e65696a8c8214eb82d2dcf9ed1f28a32d2c94e)
1 // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3 //
4 // SPDX-License-Identifier: BSD-2-Clause
5 //
6 // This file is part of CEED:  http://github.com/ceed
7 
8 #ifndef _ceed_opt_h
9 #define _ceed_opt_h
10 
11 #include <ceed/backend.h>
12 #include <ceed/ceed.h>
13 #include <stdbool.h>
14 #include <stdint.h>
15 
16 typedef struct {
17   CeedInt blk_size;
18 } Ceed_Opt;
19 
20 typedef struct {
21   CeedScalar *colo_grad_1d;
22 } CeedBasis_Opt;
23 
24 typedef struct {
25   bool                 is_identity_qf, is_identity_restr_op;
26   CeedElemRestriction *blk_restr;    /* Blocked versions of restrictions */
27   CeedVector          *e_vecs_full;  /* Full E-vectors, inputs followed by outputs */
28   uint64_t            *input_states; /* State counter of inputs */
29   CeedVector          *e_vecs_in;    /* Element block input E-vectors  */
30   CeedVector          *e_vecs_out;   /* Element block output E-vectors */
31   CeedVector          *q_vecs_in;    /* Element block input Q-vectors  */
32   CeedVector          *q_vecs_out;   /* Element block output Q-vectors */
33   CeedInt              num_inputs, num_outputs;
34   CeedInt              num_active_in, num_active_out;
35   CeedVector          *qf_active_in;
36   CeedVector           qf_l_vec;
37   CeedElemRestriction  qf_blk_rstr;
38 } CeedOperator_Opt;
39 
40 CEED_INTERN int CeedTensorContractCreate_Opt(CeedBasis basis, CeedTensorContract contract);
41 CEED_INTERN int CeedOperatorCreate_Opt(CeedOperator op);
42 
43 #endif  // _ceed_opt_h
44