24
24
int CeedInit_CudaInterp (CeedScalar * d_B , CeedInt P_1d , CeedInt Q_1d , CeedScalar * * c_B );
25
25
int CeedInit_CudaGrad (CeedScalar * d_B , CeedScalar * d_G , CeedInt P_1d , CeedInt Q_1d , CeedScalar * * c_B_ptr , CeedScalar * * c_G_ptr );
26
26
int 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 );
27
28
28
29
//------------------------------------------------------------------------------
29
30
// Apply tensor basis
@@ -456,7 +457,7 @@ static int CeedBasisApplyNonTensorCore_Cuda_shared(CeedBasis basis, bool apply_a
456
457
CeedCallBackend (CeedBasisGetNumQuadraturePoints (basis , & Q ));
457
458
CeedInt thread = CeedIntMax (Q , P );
458
459
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 ));
460
461
void * interp_args [] = {(void * )& num_elem , & data -> c_B , & d_u , & d_v };
461
462
462
463
{
@@ -480,7 +481,7 @@ static int CeedBasisApplyNonTensorCore_Cuda_shared(CeedBasis basis, bool apply_a
480
481
CeedCallBackend (CeedBasisGetNumQuadraturePoints (basis , & Q ));
481
482
CeedInt thread = CeedIntMax (Q , P );
482
483
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 ));
484
485
void * grad_args [] = {(void * )& num_elem , & data -> c_G , & d_u , & d_v };
485
486
486
487
{
@@ -641,6 +642,10 @@ int CeedBasisCreateH1_Cuda_shared(CeedElemTopology topo, CeedInt dim, CeedInt nu
641
642
CeedCallBackend (CeedBasisGetCeed (basis , & ceed ));
642
643
CeedCallBackend (CeedCalloc (1 , & data ));
643
644
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
+
644
649
// Copy basis data to GPU
645
650
CeedCallBackend (CeedBasisGetNumQuadratureComponents (basis , CEED_EVAL_INTERP , & q_comp_interp ));
646
651
CeedCallBackend (CeedBasisGetNumQuadratureComponents (basis , CEED_EVAL_GRAD , & q_comp_grad ));
0 commit comments