2424int CeedInit_CudaInterp (CeedScalar * d_B , CeedInt P_1d , CeedInt Q_1d , CeedScalar * * c_B );
2525int CeedInit_CudaGrad (CeedScalar * d_B , CeedScalar * d_G , CeedInt P_1d , CeedInt Q_1d , CeedScalar * * c_B_ptr , CeedScalar * * c_G_ptr );
2626int CeedInit_CudaCollocatedGrad (CeedScalar * d_B , CeedScalar * d_G , CeedInt P_1d , CeedInt Q_1d , CeedScalar * * c_B_ptr , CeedScalar * * c_G_ptr );
27+ int CeedInit_CudaNonTensor (CeedScalar * d_B , CeedInt dim , CeedInt P , CeedInt Q , CeedScalar * * c_B );
2728
2829//------------------------------------------------------------------------------
2930// Apply tensor basis
@@ -456,7 +457,7 @@ static int CeedBasisApplyNonTensorCore_Cuda_shared(CeedBasis basis, bool apply_a
456457 CeedCallBackend (CeedBasisGetNumQuadraturePoints (basis , & Q ));
457458 CeedInt thread = CeedIntMax (Q , P );
458459
459- CeedCallBackend (CeedInit_CudaInterp (data -> d_interp_1d , P , Q , & data -> c_B ));
460+ CeedCallBackend (CeedInit_CudaNonTensor (data -> d_interp_1d , 1 , P , Q , & data -> c_B ));
460461 void * interp_args [] = {(void * )& num_elem , & data -> c_B , & d_u , & d_v };
461462
462463 {
@@ -480,7 +481,7 @@ static int CeedBasisApplyNonTensorCore_Cuda_shared(CeedBasis basis, bool apply_a
480481 CeedCallBackend (CeedBasisGetNumQuadraturePoints (basis , & Q ));
481482 CeedInt thread = CeedIntMax (Q , P );
482483
483- CeedCallBackend (CeedInit_CudaInterp (data -> d_grad_1d , P , Q * dim , & data -> c_G ));
484+ CeedCallBackend (CeedInit_CudaNonTensor (data -> d_grad_1d , 3 , P , Q * dim , & data -> c_G ));
484485 void * grad_args [] = {(void * )& num_elem , & data -> c_G , & d_u , & d_v };
485486
486487 {
@@ -641,6 +642,10 @@ int CeedBasisCreateH1_Cuda_shared(CeedElemTopology topo, CeedInt dim, CeedInt nu
641642 CeedCallBackend (CeedBasisGetCeed (basis , & ceed ));
642643 CeedCallBackend (CeedCalloc (1 , & data ));
643644
645+ // Check max sizes
646+ CeedCheck (dim <= 3 , ceed , CEED_ERROR_BACKEND , "Backend does not implement nontensor bases with dim > 3" );
647+ CeedCheck (num_nodes * num_qpts * dim < 52 * 52 * 3 , ceed , CEED_ERROR_BACKEND , "Backend does not implement nontensor bases with P * Q this large" );
648+
644649 // Copy basis data to GPU
645650 CeedCallBackend (CeedBasisGetNumQuadratureComponents (basis , CEED_EVAL_INTERP , & q_comp_interp ));
646651 CeedCallBackend (CeedBasisGetNumQuadratureComponents (basis , CEED_EVAL_GRAD , & q_comp_grad ));
0 commit comments