ceed-impl.h (98b6bd5e4d524aa48b8b2ebb24899f57a684f6ac) ceed-impl.h (c4e3f59b2ea5a0c95cc0118aa5026c447cce3092)
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/// @file

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

100 int (*ElemRestrictionCreate)(CeedMemType, CeedCopyMode, const CeedInt *, CeedElemRestriction);
101 int (*ElemRestrictionCreateOriented)(CeedMemType, CeedCopyMode, const CeedInt *, const bool *, CeedElemRestriction);
102 int (*ElemRestrictionCreateBlocked)(CeedMemType, CeedCopyMode, const CeedInt *, CeedElemRestriction);
103 int (*BasisCreateTensorH1)(CeedInt, CeedInt, CeedInt, const CeedScalar *, const CeedScalar *, const CeedScalar *, const CeedScalar *, CeedBasis);
104 int (*BasisCreateH1)(CeedElemTopology, CeedInt, CeedInt, CeedInt, const CeedScalar *, const CeedScalar *, const CeedScalar *, const CeedScalar *,
105 CeedBasis);
106 int (*BasisCreateHdiv)(CeedElemTopology, CeedInt, CeedInt, CeedInt, const CeedScalar *, const CeedScalar *, const CeedScalar *, const CeedScalar *,
107 CeedBasis);
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/// @file

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

100 int (*ElemRestrictionCreate)(CeedMemType, CeedCopyMode, const CeedInt *, CeedElemRestriction);
101 int (*ElemRestrictionCreateOriented)(CeedMemType, CeedCopyMode, const CeedInt *, const bool *, CeedElemRestriction);
102 int (*ElemRestrictionCreateBlocked)(CeedMemType, CeedCopyMode, const CeedInt *, CeedElemRestriction);
103 int (*BasisCreateTensorH1)(CeedInt, CeedInt, CeedInt, const CeedScalar *, const CeedScalar *, const CeedScalar *, const CeedScalar *, CeedBasis);
104 int (*BasisCreateH1)(CeedElemTopology, CeedInt, CeedInt, CeedInt, const CeedScalar *, const CeedScalar *, const CeedScalar *, const CeedScalar *,
105 CeedBasis);
106 int (*BasisCreateHdiv)(CeedElemTopology, CeedInt, CeedInt, CeedInt, const CeedScalar *, const CeedScalar *, const CeedScalar *, const CeedScalar *,
107 CeedBasis);
108 int (*BasisCreateHcurl)(CeedElemTopology, CeedInt, CeedInt, CeedInt, const CeedScalar *, const CeedScalar *, const CeedScalar *, const CeedScalar *,
109 CeedBasis);
108 int (*TensorContractCreate)(CeedBasis, CeedTensorContract);
109 int (*QFunctionCreate)(CeedQFunction);
110 int (*QFunctionContextCreate)(CeedQFunctionContext);
111 int (*OperatorCreate)(CeedOperator);
112 int (*CompositeOperatorCreate)(CeedOperator);
113 int ref_count;
114 void *data;
115 bool is_debug;

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

166 bool is_oriented; /* flag for oriented restriction */
167 void *data; /* place for the backend to store any data */
168};
169
170struct CeedBasis_private {
171 Ceed ceed;
172 int (*Apply)(CeedBasis, CeedInt, CeedTransposeMode, CeedEvalMode, CeedVector, CeedVector);
173 int (*Destroy)(CeedBasis);
110 int (*TensorContractCreate)(CeedBasis, CeedTensorContract);
111 int (*QFunctionCreate)(CeedQFunction);
112 int (*QFunctionContextCreate)(CeedQFunctionContext);
113 int (*OperatorCreate)(CeedOperator);
114 int (*CompositeOperatorCreate)(CeedOperator);
115 int ref_count;
116 void *data;
117 bool is_debug;

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

168 bool is_oriented; /* flag for oriented restriction */
169 void *data; /* place for the backend to store any data */
170};
171
172struct CeedBasis_private {
173 Ceed ceed;
174 int (*Apply)(CeedBasis, CeedInt, CeedTransposeMode, CeedEvalMode, CeedVector, CeedVector);
175 int (*Destroy)(CeedBasis);
174 int ref_count;
175 bool tensor_basis; /* flag for tensor basis */
176 CeedInt dim; /* topological dimension */
177 CeedElemTopology topo; /* element topology */
178 CeedInt num_comp; /* number of field components (1 for scalar fields) */
179 CeedInt Q_comp; /* number of Q-vector components (1 for H^1, dim for H(div)) */
180 CeedInt P_1d; /* number of nodes in one dimension */
181 CeedInt Q_1d; /* number of quadrature points in one dimension */
182 CeedInt P; /* total number of nodes */
183 CeedInt Q; /* total number of quadrature points */
184 CeedScalar *q_ref_1d; /* Array of length Q1d holding the locations of quadrature points on the 1D reference element [-1, 1] */
185 CeedScalar *q_weight_1d; /* array of length Q1d holding the quadrature weights on the reference element */
186 CeedScalar *interp; /* row-major matrix of shape [Q_comp*Q, P] expressing the values of nodal basis functions at quadrature points */
187 CeedScalar *interp_1d; /* row-major matrix of shape [Q1d, P1d] expressing the values of nodal basis functions at quadrature points */
188 CeedScalar *grad; /* row-major matrix of shape [dim*Q_comp*Q, P] matrix expressing derivatives of nodal basis functions at quadrature points */
189 CeedScalar *grad_1d; /* row-major matrix of shape [Q1d, P1d] matrix expressing derivatives of nodal basis functions at quadrature points */
190 CeedTensorContract contract; /* tensor contraction object */
191 CeedFESpace basis_space; /* Initialize in basis constructor with 1,2 for H^1, H(div) FE space */
192 CeedScalar
193 *div; /* row-major matrix of shape [Q, P] expressing the divergence of nodal basis functions at quadrature points for H(div) discretizations */
194 void *data; /* place for the backend to store any data */
176 int ref_count;
177 bool tensor_basis; /* flag for tensor basis */
178 CeedInt dim; /* topological dimension */
179 CeedElemTopology topo; /* element topology */
180 CeedInt num_comp; /* number of field components (1 for scalar fields) */
181 CeedInt P_1d; /* number of nodes in one dimension */
182 CeedInt Q_1d; /* number of quadrature points in one dimension */
183 CeedInt P; /* total number of nodes */
184 CeedInt Q; /* total number of quadrature points */
185 CeedFESpace fe_space; /* initialized in basis constructor with 1, 2, 3 for H^1, H(div), and H(curl) FE space */
186 CeedTensorContract contract; /* tensor contraction object */
187 CeedScalar *q_ref_1d; /* array of length Q1d holding the locations of quadrature points on the 1D reference element [-1, 1] */
188 CeedScalar *q_weight_1d; /* array of length Q1d holding the quadrature weights on the reference element */
189 CeedScalar *interp; /* row-major matrix of shape [Q, P] or [dim * Q, P] expressing the values of nodal basis functions or vector basis functions at
190 quadrature points */
191 CeedScalar *interp_1d; /* row-major matrix of shape [Q1d, P1d] expressing the values of nodal basis functions at quadrature points */
192 CeedScalar *grad; /* row-major matrix of shape [dim * Q, P] matrix expressing derivatives of nodal basis functions at quadrature points */
193 CeedScalar *grad_1d; /* row-major matrix of shape [Q1d, P1d] matrix expressing derivatives of nodal basis functions at quadrature points */
194 CeedScalar *div; /* row-major matrix of shape [Q, P] expressing the divergence of basis functions at quadrature points for H(div) discretizations */
195 CeedScalar *curl; /* row-major matrix of shape [curl_dim * Q, P], curl_dim = 1 if dim < 3 else dim, expressing the curl of basis functions at
196 quadrature points for H(curl) discretizations */
197 void *data; /* place for the backend to store any data */
195};
196
197struct CeedTensorContract_private {
198 Ceed ceed;
199 int (*Apply)(CeedTensorContract, CeedInt, CeedInt, CeedInt, CeedInt, const CeedScalar *restrict, CeedTransposeMode, const CeedInt,
200 const CeedScalar *restrict, CeedScalar *restrict);
201 int (*Destroy)(CeedTensorContract);
202 int ref_count;

--- 159 unchanged lines hidden ---
198};
199
200struct CeedTensorContract_private {
201 Ceed ceed;
202 int (*Apply)(CeedTensorContract, CeedInt, CeedInt, CeedInt, CeedInt, const CeedScalar *restrict, CeedTransposeMode, const CeedInt,
203 const CeedScalar *restrict, CeedScalar *restrict);
204 int (*Destroy)(CeedTensorContract);
205 int ref_count;

--- 159 unchanged lines hidden ---