@@ -848,13 +848,19 @@ static int CeedOperatorApplyAddAtPoints_Cuda(CeedOperator op, CeedVector in_vec,
848848 CeedCallBackend (CeedGetWorkVector (ceed , impl -> max_active_e_vec_len , & active_e_vec ));
849849
850850 // Get point coordinates
851- if (! impl -> point_coords_elem ) {
851+ {
852852 CeedVector point_coords = NULL ;
853853 CeedElemRestriction rstr_points = NULL ;
854854
855855 CeedCallBackend (CeedOperatorAtPointsGetPoints (op , & rstr_points , & point_coords ));
856- CeedCallBackend (CeedElemRestrictionCreateVector (rstr_points , NULL , & impl -> point_coords_elem ));
857- CeedCallBackend (CeedElemRestrictionApply (rstr_points , CEED_NOTRANSPOSE , point_coords , impl -> point_coords_elem , request ));
856+ if (!impl -> point_coords_elem ) CeedCallBackend (CeedElemRestrictionCreateVector (rstr_points , NULL , & impl -> point_coords_elem ));
857+ {
858+ uint64_t state ;
859+ CeedCallBackend (CeedVectorGetState (point_coords , & state ));
860+ if (impl -> points_state != state ) {
861+ CeedCallBackend (CeedElemRestrictionApply (rstr_points , CEED_NOTRANSPOSE , point_coords , impl -> point_coords_elem , request ));
862+ }
863+ }
858864 CeedCallBackend (CeedVectorDestroy (& point_coords ));
859865 CeedCallBackend (CeedElemRestrictionDestroy (& rstr_points ));
860866 }
@@ -1855,13 +1861,19 @@ static int CeedOperatorLinearAssembleAddDiagonalAtPoints_Cuda(CeedOperator op, C
18551861 }
18561862
18571863 // Get point coordinates
1858- if (! impl -> point_coords_elem ) {
1864+ {
18591865 CeedVector point_coords = NULL ;
18601866 CeedElemRestriction rstr_points = NULL ;
18611867
18621868 CeedCallBackend (CeedOperatorAtPointsGetPoints (op , & rstr_points , & point_coords ));
1863- CeedCallBackend (CeedElemRestrictionCreateVector (rstr_points , NULL , & impl -> point_coords_elem ));
1864- CeedCallBackend (CeedElemRestrictionApply (rstr_points , CEED_NOTRANSPOSE , point_coords , impl -> point_coords_elem , request ));
1869+ if (!impl -> point_coords_elem ) CeedCallBackend (CeedElemRestrictionCreateVector (rstr_points , NULL , & impl -> point_coords_elem ));
1870+ {
1871+ uint64_t state ;
1872+ CeedCallBackend (CeedVectorGetState (point_coords , & state ));
1873+ if (impl -> points_state != state ) {
1874+ CeedCallBackend (CeedElemRestrictionApply (rstr_points , CEED_NOTRANSPOSE , point_coords , impl -> point_coords_elem , request ));
1875+ }
1876+ }
18651877 CeedCallBackend (CeedVectorDestroy (& point_coords ));
18661878 CeedCallBackend (CeedElemRestrictionDestroy (& rstr_points ));
18671879 }
0 commit comments