@@ -333,10 +333,10 @@ static int CeedBasisApplyAtPointsCheckDims(CeedBasis basis, CeedInt num_elem, co
333333
334334 // Check compatibility coordinates vector
335335 for (CeedInt i = 0 ; i < num_elem ; i ++ ) total_num_points += num_points [i ];
336- CeedCheck ((x_length >= total_num_points * dim ) || (eval_mode == CEED_EVAL_WEIGHT ), ceed , CEED_ERROR_DIMENSION ,
336+ CeedCheck ((x_length >= ( CeedSize ) total_num_points * ( CeedSize ) dim ) || (eval_mode == CEED_EVAL_WEIGHT ), ceed , CEED_ERROR_DIMENSION ,
337337 "Length of reference coordinate vector incompatible with basis dimension and number of points."
338338 " Found reference coordinate vector of length %" CeedSize_FMT ", not of length %" CeedSize_FMT "." ,
339- x_length , total_num_points * dim );
339+ x_length , ( CeedSize ) total_num_points * ( CeedSize ) dim );
340340
341341 // Check CEED_EVAL_WEIGHT only on CEED_NOTRANSPOSE
342342 CeedCheck (eval_mode != CEED_EVAL_WEIGHT || t_mode == CEED_NOTRANSPOSE , ceed , CEED_ERROR_UNSUPPORTED ,
@@ -346,13 +346,16 @@ static int CeedBasisApplyAtPointsCheckDims(CeedBasis basis, CeedInt num_elem, co
346346 bool has_good_dims = true;
347347 switch (eval_mode ) {
348348 case CEED_EVAL_INTERP :
349- has_good_dims = ((t_mode == CEED_TRANSPOSE && (u_length >= total_num_points * num_q_comp || v_length >= num_elem * num_nodes * num_comp )) ||
350- (t_mode == CEED_NOTRANSPOSE && (v_length >= total_num_points * num_q_comp || u_length >= num_elem * num_nodes * num_comp )));
349+ has_good_dims = ((t_mode == CEED_TRANSPOSE && (u_length >= (CeedSize )total_num_points * (CeedSize )num_q_comp ||
350+ v_length >= (CeedSize )num_elem * (CeedSize )num_nodes * (CeedSize )num_comp )) ||
351+ (t_mode == CEED_NOTRANSPOSE && (v_length >= (CeedSize )total_num_points * (CeedSize )num_q_comp ||
352+ u_length >= (CeedSize )num_elem * (CeedSize )num_nodes * (CeedSize )num_comp )));
351353 break ;
352354 case CEED_EVAL_GRAD :
353- has_good_dims =
354- ((t_mode == CEED_TRANSPOSE && (u_length >= total_num_points * num_q_comp * dim || v_length >= num_elem * num_nodes * num_comp )) ||
355- (t_mode == CEED_NOTRANSPOSE && (v_length >= total_num_points * num_q_comp * dim || u_length >= num_elem * num_nodes * num_comp )));
355+ has_good_dims = ((t_mode == CEED_TRANSPOSE && (u_length >= (CeedSize )total_num_points * (CeedSize )num_q_comp * (CeedSize )dim ||
356+ v_length >= (CeedSize )num_elem * (CeedSize )num_nodes * (CeedSize )num_comp )) ||
357+ (t_mode == CEED_NOTRANSPOSE && (v_length >= (CeedSize )total_num_points * (CeedSize )num_q_comp * (CeedSize )dim ||
358+ u_length >= (CeedSize )num_elem * (CeedSize )num_nodes * (CeedSize )num_comp )));
356359 break ;
357360 case CEED_EVAL_WEIGHT :
358361 has_good_dims = t_mode == CEED_NOTRANSPOSE && (v_length >= total_num_points );
@@ -1822,12 +1825,13 @@ static int CeedBasisApplyCheckDims(CeedBasis basis, CeedInt num_elem, CeedTransp
18221825 case CEED_EVAL_GRAD :
18231826 case CEED_EVAL_DIV :
18241827 case CEED_EVAL_CURL :
1825- has_good_dims =
1826- ((t_mode == CEED_TRANSPOSE && u_length >= num_elem * num_comp * num_qpts * q_comp && v_length >= num_elem * num_comp * num_nodes ) ||
1827- (t_mode == CEED_NOTRANSPOSE && v_length >= num_elem * num_qpts * num_comp * q_comp && u_length >= num_elem * num_comp * num_nodes ));
1828+ has_good_dims = ((t_mode == CEED_TRANSPOSE && u_length >= (CeedSize )num_elem * (CeedSize )num_comp * (CeedSize )num_qpts * (CeedSize )q_comp &&
1829+ v_length >= (CeedSize )num_elem * (CeedSize )num_comp * (CeedSize )num_nodes ) ||
1830+ (t_mode == CEED_NOTRANSPOSE && v_length >= (CeedSize )num_elem * (CeedSize )num_qpts * (CeedSize )num_comp * (CeedSize )q_comp &&
1831+ u_length >= (CeedSize )num_elem * (CeedSize )num_comp * (CeedSize )num_nodes ));
18281832 break ;
18291833 case CEED_EVAL_WEIGHT :
1830- has_good_dims = v_length >= num_elem * num_qpts ;
1834+ has_good_dims = v_length >= ( CeedSize ) num_elem * ( CeedSize ) num_qpts ;
18311835 break ;
18321836 }
18331837 CeedCheck (has_good_dims , ceed , CEED_ERROR_DIMENSION , "Input/output vectors too short for basis and evaluation mode" );
0 commit comments