xref: /libCEED/backends/blocked/ceed-blocked.h (revision d863ab9ba6a0d47c58445a35d35b36efba07fc93)
1 // Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
2 // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
3 // All Rights 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.
9 //
10 // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
11 // a collaborative effort of two U.S. Department of Energy organizations (Office
12 // of Science and the National Nuclear Security Administration) responsible for
13 // the planning and preparation of a capable exascale ecosystem, including
14 // software, applications, hardware, advanced system engineering and early
15 // testbed platforms, in support of the nation's exascale computing imperative.
16 
17 #include <ceed-impl.h>
18 #include <ceed-backend.h>
19 #include <string.h>
20 
21 typedef struct {
22   Ceed ceedref;
23 } Ceed_Blocked;
24 
25 typedef struct {
26   CeedScalar *colograd1d;
27 } CeedBasis_Blocked;
28 
29 typedef struct {
30   CeedElemRestriction *blkrestr; /// Blocked versions of restrictions
31   CeedVector
32   *evecs;   /// E-vectors needed to apply operator (input followed by outputs)
33   CeedScalar **edata;
34   CeedScalar **qdata; /// Inputs followed by outputs
35   CeedScalar
36   **qdata_alloc; /// Allocated quadrature data arrays (to be freed by us)
37   CeedScalar **indata;
38   CeedScalar **outdata;
39   CeedInt    numein;
40   CeedInt    numeout;
41   CeedInt    numqin;
42   CeedInt    numqout;
43 } CeedOperator_Blocked;
44 
45 CEED_INTERN int CeedBasisCreateTensorH1_Blocked(CeedInt dim, CeedInt P1d,
46     CeedInt Q1d, const CeedScalar *interp1d,
47     const CeedScalar *grad1d,
48     const CeedScalar *qref1d,
49     const CeedScalar *qweight1d,
50     CeedBasis basis);
51 
52 CEED_INTERN int CeedBasisCreateH1_Blocked(CeedElemTopology topo, CeedInt dim,
53                                       CeedInt ndof, CeedInt nqpts,
54                                       const CeedScalar *interp,
55                                       const CeedScalar *grad,
56                                       const CeedScalar *qref,
57                                       const CeedScalar *qweight,
58                                       CeedBasis basis);
59 
60 CEED_INTERN int CeedOperatorCreate_Blocked(CeedOperator op);
61