@@ -24,8 +24,6 @@ static int CeedBasisApply_Ref(CeedBasis basis, CeedInt num_elem, CeedTransposeMo
24
24
CeedCallBackend (CeedBasisGetNumComponents (basis , & num_comp ));
25
25
CeedCallBackend (CeedBasisGetNumNodes (basis , & num_nodes ));
26
26
CeedCallBackend (CeedBasisGetNumQuadraturePoints (basis , & num_qpts ));
27
- CeedFESpace fe_space ;
28
- CeedCall (CeedBasisGetFESpace (basis , & fe_space ));
29
27
CeedTensorContract contract ;
30
28
CeedCallBackend (CeedBasisGetTensorContract (basis , & contract ));
31
29
const CeedInt add = (t_mode == CEED_TRANSPOSE );
@@ -195,12 +193,13 @@ static int CeedBasisApply_Ref(CeedBasis basis, CeedInt num_elem, CeedTransposeMo
195
193
switch (eval_mode ) {
196
194
// Interpolate to/from quadrature points
197
195
case CEED_EVAL_INTERP : {
198
- CeedInt qdim = (fe_space == CEED_FE_SPACE_H1 ) ? 1 : dim ;
199
- CeedInt P = num_nodes , Q = qdim * num_qpts ;
196
+ CeedInt q_comp ;
197
+ CeedCallBackend (CeedBasisGetNumQuadratureComponents (basis , & q_comp ));
198
+ CeedInt P = num_nodes , Q = q_comp * num_qpts ;
200
199
const CeedScalar * interp ;
201
200
CeedCallBackend (CeedBasisGetInterp (basis , & interp ));
202
201
if (t_mode == CEED_TRANSPOSE ) {
203
- P = qdim * num_qpts ;
202
+ P = q_comp * num_qpts ;
204
203
Q = num_nodes ;
205
204
}
206
205
CeedCallBackend (CeedTensorContractApply (contract , num_comp , P , num_elem , Q , interp , t_mode , add , u , v ));
@@ -250,12 +249,13 @@ static int CeedBasisApply_Ref(CeedBasis basis, CeedInt num_elem, CeedTransposeMo
250
249
} break ;
251
250
// Evaluate the curl to/from the quadrature points
252
251
case CEED_EVAL_CURL : {
253
- CeedInt cdim = (dim < 3 ) ? 1 : dim ;
254
- CeedInt P = num_nodes , Q = cdim * num_qpts ;
252
+ CeedInt curl_comp ;
253
+ CeedCallBackend (CeedBasisGetNumCurlComponents (basis , & curl_comp ));
254
+ CeedInt P = num_nodes , Q = curl_comp * num_qpts ;
255
255
const CeedScalar * curl ;
256
256
CeedCallBackend (CeedBasisGetCurl (basis , & curl ));
257
257
if (t_mode == CEED_TRANSPOSE ) {
258
- P = cdim * num_qpts ;
258
+ P = curl_comp * num_qpts ;
259
259
Q = num_nodes ;
260
260
}
261
261
CeedCallBackend (CeedTensorContractApply (contract , num_comp , P , num_elem , Q , curl , t_mode , add , u , v ));
0 commit comments