43 #include "PanzerDiscFE_config.hpp"
47 #include "Kokkos_ViewFactory.hpp"
49 #include "Intrepid2_Utils.hpp"
50 #include "Intrepid2_FunctionSpaceTools.hpp"
51 #include "Intrepid2_Orientation.hpp"
52 #include "Intrepid2_OrientationTools.hpp"
57 template <
typename Scalar>
59 evaluateValues(
const PHX::MDField<Scalar,IP,Dim,void,void,void,void,void,void> & cub_points,
60 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> &
jac,
61 const PHX::MDField<Scalar,Cell,IP,void,void,void,void,void,void> & jac_det,
62 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> & jac_inv,
63 const int in_num_cells)
65 PHX::MDField<Scalar,Cell,IP> weighted_measure;
66 PHX::MDField<Scalar,Cell,NODE,Dim> vertex_coordinates;
67 build_weighted =
false;
68 evaluateValues(cub_points,jac,jac_det,jac_inv,weighted_measure,vertex_coordinates,
false,in_num_cells);
71 template <
typename Scalar>
73 evaluateValues(
const PHX::MDField<Scalar,IP,Dim,void,void,void,void,void,void> & cub_points,
74 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> &
jac,
75 const PHX::MDField<Scalar,Cell,IP,void,void,void,void,void,void> & jac_det,
76 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> & jac_inv,
77 const PHX::MDField<Scalar,Cell,IP> & weighted_measure,
78 const PHX::MDField<Scalar,Cell,NODE,Dim> & vertex_coordinates,
79 bool use_vertex_coordinates,
80 const int in_num_cells)
84 int num_dim = basis_layout->dimension();
88 evaluateReferenceValues(cub_points,compute_derivatives,use_vertex_coordinates);
90 const int num_cells = in_num_cells < 0 ? jac.extent(0) : in_num_cells;
91 const std::pair<int,int> cell_range(0,num_cells);
96 auto s_basis_scalar = Kokkos::subview(basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
97 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
98 HGRADtransformVALUE(s_basis_scalar,
99 basis_ref_scalar.get_view());
102 auto s_weighted_basis_scalar = Kokkos::subview(weighted_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
103 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
104 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
105 multiplyMeasure(s_weighted_basis_scalar,
111 auto s_basis_vector = Kokkos::subview(basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
112 auto s_jac_inv = Kokkos::subview(jac_inv.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
113 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
114 HCURLtransformVALUE(s_basis_vector,
116 basis_ref_vector.get_view());
119 auto s_weighted_basis_vector = Kokkos::subview(weighted_basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
120 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
121 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
122 multiplyMeasure(s_weighted_basis_vector,
129 auto s_basis_vector = Kokkos::subview(basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
130 auto s_jac = Kokkos::subview(jac.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
131 auto s_jac_det = Kokkos::subview(jac_det.get_view(),cell_range,Kokkos::ALL());
132 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
133 HDIVtransformVALUE(s_basis_vector,
136 basis_ref_vector.get_view());
139 auto s_weighted_basis_vector = Kokkos::subview(weighted_basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
140 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
141 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
142 multiplyMeasure(s_weighted_basis_vector,
149 auto s_basis_scalar = Kokkos::subview(basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
150 auto s_jac_det = Kokkos::subview(jac_det.get_view(),cell_range,Kokkos::ALL());
151 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
152 HVOLtransformVALUE(s_basis_scalar,
154 basis_ref_scalar.get_view());
157 auto s_weighted_basis_scalar = Kokkos::subview(weighted_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
158 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
159 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
160 multiplyMeasure(s_weighted_basis_scalar,
168 auto s_grad_basis = Kokkos::subview(grad_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
169 auto s_jac_inv = Kokkos::subview(jac_inv.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
170 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
171 HGRADtransformGRAD(s_grad_basis,
173 grad_basis_ref.get_view());
176 auto s_weighted_grad_basis = Kokkos::subview(weighted_grad_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
177 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
178 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
179 multiplyMeasure(s_weighted_grad_basis,
185 auto s_curl_basis_scalar = Kokkos::subview(curl_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
186 auto s_jac_det = Kokkos::subview(jac_det.get_view(),cell_range,Kokkos::ALL());
187 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
188 HDIVtransformDIV(s_curl_basis_scalar,
192 curl_basis_ref_scalar.get_view());
195 auto s_weighted_curl_basis_scalar = Kokkos::subview(weighted_curl_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
196 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
197 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
198 multiplyMeasure(s_weighted_curl_basis_scalar,
200 s_curl_basis_scalar);
204 auto s_curl_basis_vector = Kokkos::subview(curl_basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
205 auto s_jac = Kokkos::subview(jac.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
206 auto s_jac_det = Kokkos::subview(jac_det.get_view(),cell_range,Kokkos::ALL());
207 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
208 HCURLtransformCURL(s_curl_basis_vector,
211 curl_basis_ref_vector.get_view());
214 auto s_weighted_curl_basis_vector = Kokkos::subview(weighted_curl_basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
215 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
216 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
217 multiplyMeasure(s_weighted_curl_basis_vector,
219 s_curl_basis_vector);
223 auto s_div_basis = Kokkos::subview(div_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
224 auto s_jac_det = Kokkos::subview(jac_det.get_view(),cell_range,Kokkos::ALL());
225 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
226 HDIVtransformDIV(s_div_basis,
228 div_basis_ref.get_view());
231 auto s_weighted_div_basis = Kokkos::subview(weighted_div_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
232 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
233 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::
234 multiplyMeasure(s_weighted_div_basis,
242 if(use_vertex_coordinates) {
256 auto s_basis_coordinates = Kokkos::subview(basis_coordinates.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
257 auto s_vertex_coordinates = Kokkos::subview(vertex_coordinates.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
258 Intrepid2::CellTools<PHX::Device::execution_space> cell_tools;
259 cell_tools.mapToPhysicalFrame(s_basis_coordinates,
260 basis_coordinates_ref.get_view(),
261 s_vertex_coordinates,
262 intrepid_basis->getBaseCellTopology());
272 template <
typename Scalar>
275 const int in_num_cells)
281 using coordsScalarType =
typename Intrepid2::Basis<PHX::Device::execution_space,Scalar,Scalar>::scalarType;
282 auto dyn_basis_coordinates_ref = af.
buildArray<coordsScalarType,BASIS,Dim>(
"basis_coordinates_ref",
283 basis_coordinates_ref.extent(0),
284 basis_coordinates_ref.extent(1));
285 intrepid_basis->getDofCoords(dyn_basis_coordinates_ref.get_view());
288 for (
int i = 0; i < basis_coordinates_ref.extent_int(0); ++i)
289 for (
int j = 0; j < basis_coordinates_ref.extent_int(1); ++j)
290 basis_coordinates_ref(i,j) = dyn_basis_coordinates_ref(i,j);
292 const int num_cells = in_num_cells < 0 ? vertex_coordinates.extent(0) : in_num_cells;
293 const std::pair<int,int> cell_range(0,num_cells);
294 const auto s_basis_coordinates = Kokkos::subview(basis_coordinates.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
295 const auto s_vertex_coordinates = Kokkos::subview(vertex_coordinates.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
297 Intrepid2::CellTools<PHX::Device::execution_space> cell_tools;
298 cell_tools.mapToPhysicalFrame(s_basis_coordinates,
299 basis_coordinates_ref.get_view(),
300 s_vertex_coordinates,
301 intrepid_basis->getBaseCellTopology());
308 template <
typename Scalar>
310 evaluateValues(
const PHX::MDField<Scalar,Cell,IP,Dim,void,void,void,void,void> & cub_points,
311 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> &
jac,
312 const PHX::MDField<Scalar,Cell,IP,void,void,void,void,void,void> & jac_det,
313 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> & jac_inv,
314 const PHX::MDField<Scalar,Cell,IP> & weighted_measure,
315 const PHX::MDField<Scalar,Cell,NODE,Dim> & vertex_coordinates,
316 bool use_vertex_coordinates,
317 const int in_num_cells)
323 evaluateValues_Const(cub_points,jac_inv,weighted_measure,in_num_cells);
325 evaluateValues_HVol(cub_points,jac_det,jac_inv,weighted_measure,in_num_cells);
327 evaluateValues_HGrad(cub_points,jac_inv,weighted_measure,in_num_cells);
329 evaluateValues_HCurl(cub_points,jac,jac_det,jac_inv,weighted_measure,in_num_cells);
331 evaluateValues_HDiv(cub_points,jac,jac_det,weighted_measure,in_num_cells);
336 if(use_vertex_coordinates) {
338 evaluateBasisCoordinates(vertex_coordinates);
343 template <
typename Scalar>
346 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> & jac_inv,
347 const PHX::MDField<Scalar,Cell,IP> & weighted_measure,
348 const int in_num_cells)
353 typedef Intrepid2::FunctionSpaceTools<PHX::Device::execution_space> fst;
358 const int num_points = basis_layout->numPoints();
360 const int num_dim = basis_layout->dimension();
361 const int num_cells = in_num_cells < 0 ? basis_layout->numCells() : in_num_cells;
363 auto cell_basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"cell_basis_scalar",1,num_basis,num_points);
364 auto cell_cub_points = af.
buildStaticArray<Scalar,IP,Dim>(
"cell_cub_points",num_points,num_dim);
365 auto cell_grad_basis = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"cell_grad_basis",1,num_basis,num_points,num_dim);
366 auto cell_jac_inv = af.
buildStaticArray<Scalar,Cell,IP,Dim,Dim>(
"cell_jac_inv",1,num_points,num_dim,num_dim);
368 auto cell_basis_ref_scalar = af.
buildStaticArray<Scalar,BASIS,IP>(
"cell_basis_ref_scalar",num_basis,num_points);
369 auto cell_grad_basis_ref = af.
buildStaticArray<Scalar,BASIS,IP,Dim>(
"cell_grad_basis_ref",num_basis,num_points,num_dim);
371 for(
int cell=0;cell<num_cells;++cell){
376 for(
int p=0;p<num_points;++p)
377 for(
int d=0;d<num_dim;++d)
378 for(
int d2=0;d2<num_dim;++d2)
379 cell_jac_inv(0,p,d,d2)=jac_inv(cell,p,d,d2);
380 for(
int p=0;p<num_points;++p)
381 for(
int d=0;d<num_dim;++d)
382 cell_cub_points(p,d)=cub_points(cell,p,d);
387 intrepid_basis->getValues(cell_basis_ref_scalar.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_VALUE);
389 if(compute_derivatives){
390 Kokkos::deep_copy(cell_grad_basis_ref.get_view(),0.0);
396 fst::HGRADtransformVALUE(cell_basis_scalar.get_view(),cell_basis_ref_scalar.get_view());
397 for(
int b=0;b<num_basis;++b)
398 for(
int p=0;p<num_points;++p)
399 basis_scalar(cell,b,p)=cell_basis_scalar(0,b,p);
401 if(compute_derivatives){
402 fst::HGRADtransformGRAD(cell_grad_basis.get_view(),cell_jac_inv.get_view(),cell_grad_basis_ref.get_view());
403 for(
int b=0;b<num_basis;++b)
404 for(
int p=0;p<num_points;++p)
405 for(
int d=0;d<num_dim;++d)
406 grad_basis(cell,b,p,d)=cell_grad_basis(0,b,p,d);
413 const std::pair<int,int> cell_range(0,num_cells);
414 auto s_weighted_basis_scalar = Kokkos::subview(weighted_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
415 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
416 auto s_basis_scalar = Kokkos::subview(basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
417 fst::multiplyMeasure(s_weighted_basis_scalar,s_weighted_measure,s_basis_scalar);
418 if(compute_derivatives){
419 auto s_weighted_grad_basis = Kokkos::subview(weighted_grad_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
420 auto s_grad_basis = Kokkos::subview(grad_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
421 fst::multiplyMeasure(s_weighted_grad_basis,s_weighted_measure,s_grad_basis);
428 template <
typename Scalar>
431 const PHX::MDField<Scalar,Cell,IP,void,void,void,void,void,void> & jac_det,
432 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> & ,
433 const PHX::MDField<Scalar,Cell,IP> & weighted_measure,
434 const int in_num_cells)
439 typedef Intrepid2::FunctionSpaceTools<PHX::Device::execution_space> fst;
444 const int num_points = basis_layout->numPoints();
446 const int num_dim = basis_layout->dimension();
447 const int num_cells = in_num_cells < 0 ? basis_layout->numCells() : in_num_cells;
449 auto cell_basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"cell_basis_scalar",1,num_basis,num_points);
450 auto cell_cub_points = af.
buildStaticArray<Scalar,IP,Dim>(
"cell_cub_points",num_points,num_dim);
451 auto cell_jac_det = af.
buildStaticArray<Scalar,Cell,IP>(
"cell_jac_det",1,num_points);
453 auto cell_basis_ref_scalar = af.
buildStaticArray<Scalar,BASIS,IP>(
"cell_basis_ref_scalar",num_basis,num_points);
455 for(
int cell=0;cell<num_cells;++cell){
460 for(
int p=0;p<num_points;++p)
461 cell_jac_det(0,p)=jac_det(cell,p);
462 for(
int p=0;p<num_points;++p)
463 for(
int d=0;d<num_dim;++d)
464 cell_cub_points(p,d)=cub_points(cell,p,d);
469 intrepid_basis->getValues(cell_basis_ref_scalar.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_VALUE);
474 fst::HVOLtransformVALUE(cell_basis_scalar.get_view(),cell_jac_det.get_view(),cell_basis_ref_scalar.get_view());
475 for(
int b=0;b<num_basis;++b)
476 for(
int p=0;p<num_points;++p)
477 basis_scalar(cell,b,p)=cell_basis_scalar(0,b,p);
484 const std::pair<int,int> cell_range(0,num_cells);
485 auto s_weighted_basis_scalar = Kokkos::subview(weighted_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
486 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
487 auto s_basis_scalar = Kokkos::subview(basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
488 fst::multiplyMeasure(s_weighted_basis_scalar,s_weighted_measure,s_basis_scalar);
493 template <
typename Scalar>
496 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> & jac_inv,
497 const PHX::MDField<Scalar,Cell,IP> & weighted_measure,
498 const int in_num_cells)
503 typedef Intrepid2::FunctionSpaceTools<PHX::Device::execution_space> fst;
508 const int num_points = basis_layout->numPoints();
510 const int num_dim = basis_layout->dimension();
511 const int num_cells = in_num_cells < 0 ? cub_points.extent(0) : in_num_cells;
513 auto cell_basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"cell_basis_scalar",1,num_basis,num_points);
514 auto cell_cub_points = af.
buildStaticArray<Scalar,IP,Dim>(
"cell_cub_points",num_points,num_dim);
515 auto cell_grad_basis = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"cell_grad_basis",1,num_basis,num_points,num_dim);
516 auto cell_jac_inv = af.
buildStaticArray<Scalar,Cell,IP,Dim,Dim>(
"cell_jac_inv",1,num_points,num_dim,num_dim);
518 auto cell_basis_ref_scalar = af.
buildStaticArray<Scalar,BASIS,IP>(
"cell_basis_ref_scalar",num_basis,num_points);
519 auto cell_grad_basis_ref = af.
buildStaticArray<Scalar,BASIS,IP,Dim>(
"cell_grad_basis_ref",num_basis,num_points,num_dim);
521 for(
int cell=0;cell<num_cells;++cell){
526 for(
int p=0;p<num_points;++p)
527 for(
int d=0;d<num_dim;++d)
528 for(
int d2=0;d2<num_dim;++d2)
529 cell_jac_inv(0,p,d,d2)=jac_inv(cell,p,d,d2);
530 for(
int p=0;p<num_points;++p)
531 for(
int d=0;d<num_dim;++d)
532 cell_cub_points(p,d)=cub_points(cell,p,d);
537 intrepid_basis->getValues(cell_basis_ref_scalar.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_VALUE);
539 if(compute_derivatives){
540 intrepid_basis->getValues(cell_grad_basis_ref.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_GRAD);
546 fst::HGRADtransformVALUE(cell_basis_scalar.get_view(),cell_basis_ref_scalar.get_view());
547 for(
int b=0;b<num_basis;++b)
548 for(
int p=0;p<num_points;++p)
549 basis_scalar(cell,b,p)=cell_basis_scalar(0,b,p);
551 if(compute_derivatives){
552 fst::HGRADtransformGRAD(cell_grad_basis.get_view(),cell_jac_inv.get_view(),cell_grad_basis_ref.get_view());
553 for(
int b=0;b<num_basis;++b)
554 for(
int p=0;p<num_points;++p)
555 for(
int d=0;d<num_dim;++d)
556 grad_basis(cell,b,p,d)=cell_grad_basis(0,b,p,d);
562 const std::pair<int,int> cell_range(0,num_cells);
563 auto s_weighted_basis_scalar = Kokkos::subview(weighted_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
564 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
565 auto s_basis_scalar = Kokkos::subview(basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
566 fst::multiplyMeasure(s_weighted_basis_scalar,s_weighted_measure,s_basis_scalar);
567 if(compute_derivatives){
568 auto s_weighted_grad_basis = Kokkos::subview(weighted_grad_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
569 auto s_grad_basis = Kokkos::subview(grad_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
570 fst::multiplyMeasure(s_weighted_grad_basis,s_weighted_measure,s_grad_basis);
577 template <
typename Scalar>
580 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> &
jac,
581 const PHX::MDField<Scalar,Cell,IP,void,void,void,void,void,void> & jac_det,
582 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> & jac_inv,
583 const PHX::MDField<Scalar,Cell,IP> & weighted_measure,
584 const int in_num_cells)
590 typedef Intrepid2::FunctionSpaceTools<PHX::Device::execution_space> fst;
595 const int num_points = basis_layout->numPoints();
597 const int num_dim = basis_layout->dimension();
598 const int num_cells = in_num_cells < 0 ? basis_layout->numCells() : in_num_cells;
600 auto cell_cub_points = af.
buildStaticArray<Scalar,IP,Dim>(
"cell_cub_points",num_points,num_dim);
601 auto cell_jac = af.
buildStaticArray<Scalar,Cell,IP,Dim,Dim>(
"cell_jac",1,num_points,num_dim,num_dim);
602 auto cell_jac_inv = af.
buildStaticArray<Scalar,Cell,IP,Dim,Dim>(
"cell_jac_inv",1,num_points,num_dim,num_dim);
603 auto cell_jac_det = af.
buildStaticArray<Scalar,Cell,IP>(
"cell_jac_det",1,num_points);
605 auto cell_basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"cell_basis_vector",1,num_basis,num_points,num_dim);
606 auto cell_curl_basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"cell_curl_basis_scalar",1,num_basis,num_points);
607 auto cell_curl_basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"cell_curl_basis_vector",1,num_basis,num_points,num_dim);
609 auto cell_curl_basis_ref = af.
buildArray<Scalar,BASIS,IP,Dim>(
"cell_curl_basis_ref",num_basis,num_points,num_dim);
610 auto cell_curl_basis_ref_scalar = af.
buildStaticArray<Scalar,BASIS,IP>(
"cell_curl_basis_ref_scalar",num_basis,num_points);
611 auto cell_basis_ref_vector = af.
buildArray<Scalar,BASIS,IP,Dim>(
"cell_basis_ref_vector",num_basis,num_points,num_dim);
613 for(
int cell=0;cell<num_cells;++cell){
618 for(
int p=0;p<num_points;++p)
619 for(
int d=0;d<num_dim;++d)
620 for(
int d2=0;d2<num_dim;++d2)
621 cell_jac(0,p,d,d2)=
jac(cell,p,d,d2);
622 for(
int p=0;p<num_points;++p)
623 for(
int d=0;d<num_dim;++d)
624 for(
int d2=0;d2<num_dim;++d2)
625 cell_jac_inv(0,p,d,d2)=jac_inv(cell,p,d,d2);
626 for(
int p=0;p<num_points;++p)
627 cell_jac_det(0,p)=jac_det(cell,p);
628 for(
int p=0;p<num_points;++p)
629 for(
int d=0;d<num_dim;++d)
630 cell_cub_points(p,d)=cub_points(cell,p,d);
635 intrepid_basis->getValues(cell_basis_ref_vector.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_VALUE);
637 if(compute_derivatives){
639 intrepid_basis->getValues(cell_curl_basis_ref_scalar.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_CURL);
640 }
else if(num_dim==3){
641 intrepid_basis->getValues(cell_curl_basis_ref.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_CURL);
648 fst::HCURLtransformVALUE(cell_basis_vector.get_view(),cell_jac_inv.get_view(),cell_basis_ref_vector.get_view());
649 for(
int b=0;b<num_basis;++b)
650 for(
int p=0;p<num_points;++p)
651 for(
int d=0;d<num_dim;++d)
652 basis_vector(cell,b,p,d)=cell_basis_vector(0,b,p,d);
654 if(compute_derivatives){
659 fst::HDIVtransformDIV(cell_curl_basis_scalar.get_view(),cell_jac_det.get_view(),cell_curl_basis_ref_scalar.get_view());
660 for(
int b=0;b<num_basis;++b)
661 for(
int p=0;p<num_points;++p)
662 curl_basis_scalar(cell,b,p)=cell_curl_basis_scalar(0,b,p);
663 }
else if(num_dim==3) {
664 fst::HCURLtransformCURL(cell_curl_basis_vector.get_view(),cell_jac.get_view(),cell_jac_det.get_view(),cell_curl_basis_ref.get_view());
665 for(
int b=0;b<num_basis;++b)
666 for(
int p=0;p<num_points;++p)
667 for(
int d=0;d<num_dim;++d)
668 curl_basis_vector(cell,b,p,d)=cell_curl_basis_vector(0,b,p,d);
676 const std::pair<int,int> cell_range(0,num_cells);
677 auto s_weighted_basis_vector = Kokkos::subview(weighted_basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
678 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
679 auto s_basis_vector = Kokkos::subview(basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
680 fst::multiplyMeasure(s_weighted_basis_vector,s_weighted_measure,s_basis_vector);
681 if(compute_derivatives){
683 auto s_weighted_curl_basis_scalar = Kokkos::subview(weighted_curl_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
684 auto s_curl_basis_scalar = Kokkos::subview(curl_basis_scalar.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
685 fst::multiplyMeasure(s_weighted_curl_basis_scalar,s_weighted_measure,s_curl_basis_scalar);
686 }
else if(num_dim==3){
687 auto s_weighted_curl_basis_vector = Kokkos::subview(weighted_curl_basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
688 auto s_curl_basis_vector = Kokkos::subview(curl_basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
689 fst::multiplyMeasure(s_weighted_curl_basis_vector,s_weighted_measure,s_curl_basis_vector);
696 template <
typename Scalar>
699 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> &
jac,
700 const PHX::MDField<Scalar,Cell,IP,void,void,void,void,void,void> & jac_det,
701 const PHX::MDField<Scalar,Cell,IP> & weighted_measure,
702 const int in_num_cells)
707 typedef Intrepid2::FunctionSpaceTools<PHX::Device::execution_space> fst;
712 const int num_points = basis_layout->numPoints();
714 const int num_dim = basis_layout->dimension();
715 const int num_cells = in_num_cells < 0 ? basis_layout->numCells() : in_num_cells;
717 auto cell_cub_points = af.
buildStaticArray<Scalar,IP,Dim>(
"cell_cub_points",num_points,num_dim);
718 auto cell_jac = af.
buildStaticArray<Scalar,Cell,IP,Dim,Dim>(
"cell_jac",1,num_points,num_dim,num_dim);
719 auto cell_jac_det = af.
buildStaticArray<Scalar,Cell,IP>(
"cell_jac_det",1,num_points);
721 auto cell_basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"cell_basis_vector",1,num_basis,num_points,num_dim);
722 auto cell_div_basis = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"cell_div_basis",1,num_basis,num_points);
724 auto cell_basis_ref_vector = af.
buildArray<Scalar,BASIS,IP,Dim>(
"cell_basis_ref_vector",num_basis,num_points,num_dim);
725 auto cell_div_basis_ref = af.
buildStaticArray<Scalar,BASIS,IP>(
"cell_div_basis_ref",num_basis,num_points);
727 for(
int cell=0;cell<num_cells;++cell){
732 for(
int p=0;p<num_points;++p)
733 for(
int d=0;d<num_dim;++d)
734 for(
int d2=0;d2<num_dim;++d2)
735 cell_jac(0,p,d,d2)=
jac(cell,p,d,d2);
736 for(
int p=0;p<num_points;++p)
737 cell_jac_det(0,p)=jac_det(cell,p);
738 for(
int p=0;p<num_points;++p)
739 for(
int d=0;d<num_dim;++d)
740 cell_cub_points(p,d)=cub_points(cell,p,d);
744 intrepid_basis->getValues(cell_basis_ref_vector.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_VALUE);
746 if(compute_derivatives){
747 intrepid_basis->getValues(cell_div_basis_ref.get_view(),cell_cub_points.get_view(),Intrepid2::OPERATOR_DIV);
753 fst::HDIVtransformVALUE(cell_basis_vector.get_view(),cell_jac.get_view(),cell_jac_det.get_view(),cell_basis_ref_vector.get_view());
754 for(
int b=0;b<num_basis;++b)
755 for(
int p=0;p<num_points;++p)
756 for(
int d=0;d<num_dim;++d)
757 basis_vector(cell,b,p,d)=cell_basis_vector(0,b,p,d);
759 if(compute_derivatives){
760 fst::HDIVtransformDIV(cell_div_basis.get_view(),cell_jac_det.get_view(),cell_div_basis_ref.get_view());
761 for(
int b=0;b<num_basis;++b)
762 for(
int p=0;p<num_points;++p)
763 div_basis(cell,b,p)=cell_div_basis(0,b,p);
768 const std::pair<int,int> cell_range(0,num_cells);
769 auto s_weighted_basis_vector = Kokkos::subview(weighted_basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
770 auto s_weighted_measure = Kokkos::subview(weighted_measure.get_view(),cell_range,Kokkos::ALL());
771 auto s_basis_vector = Kokkos::subview(basis_vector.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL());
772 fst::multiplyMeasure(s_weighted_basis_vector,s_weighted_measure,s_basis_vector);
773 if(compute_derivatives){
774 auto s_weighted_div_basis = Kokkos::subview(weighted_div_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
775 auto s_div_basis = Kokkos::subview(div_basis.get_view(),cell_range,Kokkos::ALL(),Kokkos::ALL());
776 fst::multiplyMeasure(s_weighted_div_basis,s_weighted_measure,s_div_basis);
824 template <
typename Scalar>
826 evaluateValuesCV(
const PHX::MDField<Scalar,Cell,IP,Dim,void,void,void,void,void> & cell_cub_points,
827 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> &
jac,
828 const PHX::MDField<Scalar,Cell,IP,void,void,void,void,void,void> & jac_det,
829 const PHX::MDField<Scalar,Cell,IP,Dim,Dim,void,void,void,void> & jac_inv)
833 int num_ip = basis_layout->numPoints();
834 int num_card = basis_layout->cardinality();
835 int num_dim = basis_layout->dimension();
844 for (
size_type icell = 0; icell < num_cells; ++icell)
846 for (
int ip = 0; ip < num_ip; ++ip)
847 for (
int d = 0; d < num_dim; ++d)
848 dyn_cub_points(ip,d) = cell_cub_points(icell,ip,d);
851 ArrayDynamic dyn_basis_ref_scalar = af.
buildArray<Scalar,BASIS,IP>(
"dyn_basis_ref_scalar",num_card,num_ip);
853 intrepid_basis->getValues(dyn_basis_ref_scalar.get_view(),
854 dyn_cub_points.get_view(),
855 Intrepid2::OPERATOR_VALUE);
858 for (
int b = 0; b < num_card; ++b)
859 for (
int ip = 0; ip < num_ip; ++ip)
860 basis_scalar(icell,b,ip) = dyn_basis_ref_scalar(b,ip);
864 ArrayDynamic dyn_basis_ref_scalar = af.
buildArray<Scalar,BASIS,IP>(
"dyn_basis_ref_scalar",num_card,num_ip);
866 intrepid_basis->getValues(dyn_basis_ref_scalar.get_view(),
867 dyn_cub_points.get_view(),
868 Intrepid2::OPERATOR_VALUE);
871 ArrayDynamic dyn_basis_scalar = af.
buildArray<Scalar,Cell,BASIS,IP>(
"dyn_basis_vector",one_cell,num_card,num_ip);
876 for (
int ip = 0; ip < num_ip; ++ip)
877 dyn_jac_det(cellInd,ip) = jac_det(icell,ip);
879 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::HVOLtransformVALUE(dyn_basis_scalar.get_view(),
880 dyn_jac_det.get_view(),
881 dyn_basis_ref_scalar.get_view());
883 for (
int b = 0; b < num_card; ++b)
884 for (
int ip = 0; ip < num_ip; ++ip)
885 basis_scalar(icell,b,ip) = dyn_basis_scalar(0,b,ip);
889 ArrayDynamic dyn_basis_ref_scalar = af.
buildArray<Scalar,BASIS,IP>(
"dyn_basis_ref_scalar",num_card,num_ip);
891 intrepid_basis->getValues(dyn_basis_ref_scalar.get_view(),
892 dyn_cub_points.get_view(),
893 Intrepid2::OPERATOR_VALUE);
896 for (
int b = 0; b < num_card; ++b)
897 for (
int ip = 0; ip < num_ip; ++ip)
898 basis_scalar(icell,b,ip) = dyn_basis_ref_scalar(b,ip);
900 if(compute_derivatives) {
903 ArrayDynamic dyn_grad_basis_ref = af.
buildArray<Scalar,BASIS,IP,Dim>(
"dyn_grad_basis_ref",num_card,num_ip,num_dim);
904 ArrayDynamic dyn_grad_basis = af.
buildArray<Scalar,Cell,BASIS,IP,Dim>(
"dyn_grad_basis",one_cell,num_card,num_ip,num_dim);
905 ArrayDynamic dyn_jac_inv = af.
buildArray<Scalar,Cell,IP,Dim,Dim>(
"dyn_jac_inv",one_cell,num_ip,num_dim,num_dim);
907 intrepid_basis->getValues(dyn_grad_basis_ref.get_view(),
908 dyn_cub_points.get_view(),
909 Intrepid2::OPERATOR_GRAD);
912 for (
int ip = 0; ip < num_ip; ++ip)
913 for (
int d1 = 0; d1 < num_dim; ++d1)
914 for (
int d2 = 0; d2 < num_dim; ++d2)
915 dyn_jac_inv(cellInd,ip,d1,d2) = jac_inv(icell,ip,d1,d2);
917 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::HGRADtransformGRAD<Scalar>(dyn_grad_basis.get_view(),
918 dyn_jac_inv.get_view(),
919 dyn_grad_basis_ref.get_view());
921 for (
int b = 0; b < num_card; ++b)
922 for (
int ip = 0; ip < num_ip; ++ip)
923 for (
int d = 0; d < num_dim; ++d)
924 grad_basis(icell,b,ip,d) = dyn_grad_basis(0,b,ip,d);
929 ArrayDynamic dyn_basis_ref_vector = af.
buildArray<Scalar,BASIS,IP,Dim>(
"dyn_basis_ref_vector",num_card,num_ip,num_dim);
931 intrepid_basis->getValues(dyn_basis_ref_vector.get_view(),
932 dyn_cub_points.get_view(),
933 Intrepid2::OPERATOR_VALUE);
935 const int one_cell = 1;
936 ArrayDynamic dyn_basis_vector = af.
buildArray<Scalar,Cell,BASIS,IP,Dim>(
"dyn_basis_vector",one_cell,num_card,num_ip,num_dim);
937 ArrayDynamic dyn_jac_inv = af.
buildArray<Scalar,Cell,IP,Dim,Dim>(
"dyn_jac_inv",one_cell,num_ip,num_dim,num_dim);
939 const int cellInd = 0;
940 for (
int ip = 0; ip < num_ip; ++ip)
941 for (
int d1 = 0; d1 < num_dim; ++d1)
942 for (
int d2 = 0; d2 < num_dim; ++d2)
943 dyn_jac_inv(cellInd,ip,d1,d2) = jac_inv(icell,ip,d1,d2);
945 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::HCURLtransformVALUE(dyn_basis_vector.get_view(),
946 dyn_jac_inv.get_view(),
947 dyn_basis_ref_vector.get_view());
949 for (
int b = 0; b < num_card; ++b)
950 for (
int ip = 0; ip < num_ip; ++ip)
951 for (
int d = 0; d < num_dim; ++d)
952 basis_vector(icell,b,ip,d) = dyn_basis_vector(0,b,ip,d);
954 if(compute_derivatives && num_dim ==2) {
956 ArrayDynamic dyn_curl_basis_ref_scalar = af.
buildArray<Scalar,BASIS,IP>(
"dyn_curl_basis_ref_scalar",num_card,num_ip);
957 ArrayDynamic dyn_curl_basis_scalar = af.
buildArray<Scalar,Cell,BASIS,IP>(
"dyn_curl_basis_scalar",one_cell,num_card,num_ip);
960 intrepid_basis->getValues(dyn_curl_basis_ref_scalar.get_view(),
961 dyn_cub_points.get_view(),
962 Intrepid2::OPERATOR_CURL);
964 for (
int ip = 0; ip < num_ip; ++ip)
965 dyn_jac_det(cellInd,ip) = jac_det(icell,ip);
967 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::HDIVtransformDIV(dyn_curl_basis_scalar.get_view(),
968 dyn_jac_det.get_view(),
969 dyn_curl_basis_ref_scalar.get_view());
971 for (
int b = 0; b < num_card; ++b)
972 for (
int ip = 0; ip < num_ip; ++ip)
973 curl_basis_scalar(icell,b,ip) = dyn_curl_basis_scalar(0,b,ip);
976 if(compute_derivatives && num_dim ==3) {
978 ArrayDynamic dyn_curl_basis_ref = af.
buildArray<Scalar,BASIS,IP,Dim>(
"dyn_curl_basis_ref_vector",num_card,num_ip,num_dim);
979 ArrayDynamic dyn_curl_basis = af.
buildArray<Scalar,Cell,BASIS,IP,Dim>(
"dyn_curl_basis_vector",one_cell,num_card,num_ip,num_dim);
983 intrepid_basis->getValues(dyn_curl_basis_ref.get_view(),
984 dyn_cub_points.get_view(),
985 Intrepid2::OPERATOR_CURL);
987 for (
int ip = 0; ip < num_ip; ++ip)
989 dyn_jac_det(cellInd,ip) = jac_det(icell,ip);
990 for (
int d1 = 0; d1 < num_dim; ++d1)
991 for (
int d2 = 0; d2 < num_dim; ++d2)
992 dyn_jac(cellInd,ip,d1,d2) =
jac(icell,ip,d1,d2);
995 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::HCURLtransformCURL(dyn_curl_basis.get_view(),
997 dyn_jac_det.get_view(),
998 dyn_curl_basis_ref.get_view());
1000 for (
int b = 0; b < num_card; ++b)
1001 for (
int ip = 0; ip < num_ip; ++ip)
1002 for (
int d = 0; d < num_dim; ++d)
1003 curl_basis_vector(icell,b,ip,d) = dyn_curl_basis(0,b,ip,d);
1010 ArrayDynamic dyn_basis_ref_vector = af.
buildArray<Scalar,BASIS,IP,Dim>(
"dyn_basis_ref_vector",num_card,num_ip,num_dim);
1012 intrepid_basis->getValues(dyn_basis_ref_vector.get_view(),
1013 dyn_cub_points.get_view(),
1014 Intrepid2::OPERATOR_VALUE);
1017 ArrayDynamic dyn_basis_vector = af.
buildArray<Scalar,Cell,BASIS,IP,Dim>(
"dyn_basis_vector",one_cell,num_card,num_ip,num_dim);
1022 for (
int ip = 0; ip < num_ip; ++ip)
1024 dyn_jac_det(cellInd,ip) = jac_det(icell,ip);
1025 for (
int d1 = 0; d1 < num_dim; ++d1)
1026 for (
int d2 = 0; d2 < num_dim; ++d2)
1027 dyn_jac(cellInd,ip,d1,d2) =
jac(icell,ip,d1,d2);
1030 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::HDIVtransformVALUE(dyn_basis_vector.get_view(),
1032 dyn_jac_det.get_view(),
1033 dyn_basis_ref_vector.get_view());
1035 for (
int b = 0; b < num_card; ++b)
1036 for (
int ip = 0; ip < num_ip; ++ip)
1037 for (
int d = 0; d < num_dim; ++d)
1038 basis_vector(icell,b,ip,d) = dyn_basis_vector(0,b,ip,d);
1040 if(compute_derivatives) {
1042 ArrayDynamic dyn_div_basis_ref = af.
buildArray<Scalar,BASIS,IP>(
"dyn_div_basis_ref_scalar",num_card,num_ip);
1043 ArrayDynamic dyn_div_basis = af.
buildArray<Scalar,Cell,BASIS,IP>(
"dyn_div_basis_scalar",one_cell,num_card,num_ip);
1045 intrepid_basis->getValues(dyn_div_basis_ref.get_view(),
1046 dyn_cub_points.get_view(),
1047 Intrepid2::OPERATOR_DIV);
1049 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::HDIVtransformDIV<Scalar>(dyn_div_basis.get_view(),
1050 dyn_jac_det.get_view(),
1051 dyn_div_basis_ref.get_view());
1053 for (
int b = 0; b < num_card; ++b)
1054 for (
int ip = 0; ip < num_ip; ++ip)
1055 div_basis(icell,b,ip) = dyn_div_basis(0,b,ip);
1066 template <
typename Scalar>
1072 int num_quad = basis_layout->numPoints();
1073 int num_dim = basis_layout->dimension();
1074 int num_card = basis_layout->cardinality();
1078 for (
int ip = 0; ip < num_quad; ++ip)
1079 for (
int d = 0; d < num_dim; ++d)
1080 dyn_cub_points(ip,d) = cub_points(ip,d);
1084 ArrayDynamic dyn_basis_ref_scalar = af.
buildArray<Scalar,BASIS,IP>(
"dyn_basis_ref_scalar",num_card,num_quad);
1086 intrepid_basis->getValues(dyn_basis_ref_scalar.get_view(),
1087 dyn_cub_points.get_view(),
1088 Intrepid2::OPERATOR_VALUE);
1090 for (
int b = 0; b < num_card; ++b)
1091 for (
int ip = 0; ip < num_quad; ++ip)
1092 basis_ref_scalar(b,ip) = dyn_basis_ref_scalar(b,ip);
1095 ArrayDynamic dyn_basis_ref_vector = af.
buildArray<Scalar,BASIS,IP,Dim>(
"dyn_basis_ref_vector",num_card,num_quad,num_dim);
1097 intrepid_basis->getValues(dyn_basis_ref_vector.get_view(),
1098 dyn_cub_points.get_view(),
1099 Intrepid2::OPERATOR_VALUE);
1101 for (
int b = 0; b < num_card; ++b)
1102 for (
int ip = 0; ip < num_quad; ++ip)
1103 for (
int d = 0; d < num_dim; ++d)
1104 basis_ref_vector(b,ip,d) = dyn_basis_ref_vector(b,ip,d);
1109 ArrayDynamic dyn_grad_basis_ref = af.
buildArray<Scalar,BASIS,IP,Dim>(
"dyn_basis_ref_vector",num_card,num_quad,num_dim);
1111 intrepid_basis->getValues(dyn_grad_basis_ref.get_view(),
1112 dyn_cub_points.get_view(),
1113 Intrepid2::OPERATOR_GRAD);
1115 for (
int b = 0; b < num_card; ++b)
1116 for (
int ip = 0; ip < num_quad; ++ip)
1117 for (
int d = 0; d < num_dim; ++d)
1118 grad_basis_ref(b,ip,d) = dyn_grad_basis_ref(b,ip,d);
1120 else if(elmtspace==
PureBasis::HCURL && in_compute_derivatives && num_dim==2) {
1121 ArrayDynamic dyn_curl_basis_ref = af.
buildArray<Scalar,BASIS,IP>(
"dyn_curl_basis_ref_scalar",num_card,num_quad);
1123 intrepid_basis->getValues(dyn_curl_basis_ref.get_view(),
1124 dyn_cub_points.get_view(),
1125 Intrepid2::OPERATOR_CURL);
1127 for (
int b = 0; b < num_card; ++b)
1128 for (
int ip = 0; ip < num_quad; ++ip)
1129 curl_basis_ref_scalar(b,ip) = dyn_curl_basis_ref(b,ip);
1131 else if(elmtspace==
PureBasis::HCURL && in_compute_derivatives && num_dim==3) {
1132 ArrayDynamic dyn_curl_basis_ref = af.
buildArray<Scalar,BASIS,IP,Dim>(
"dyn_curl_basis_ref_vector",num_card,num_quad,num_dim);
1134 intrepid_basis->getValues(dyn_curl_basis_ref.get_view(),
1135 dyn_cub_points.get_view(),
1136 Intrepid2::OPERATOR_CURL);
1138 for (
int b = 0; b < num_card; ++b)
1139 for (
int ip = 0; ip < num_quad; ++ip)
1140 for (
int d = 0; d < num_dim; ++d)
1141 curl_basis_ref_vector(b,ip,d) = dyn_curl_basis_ref(b,ip,d);
1144 ArrayDynamic dyn_div_basis_ref = af.
buildArray<Scalar,BASIS,IP>(
"dyn_div_basis_ref_scalar",num_card,num_quad);
1146 intrepid_basis->getValues(dyn_div_basis_ref.get_view(),
1147 dyn_cub_points.get_view(),
1148 Intrepid2::OPERATOR_DIV);
1150 for (
int b = 0; b < num_card; ++b)
1151 for (
int ip = 0; ip < num_quad; ++ip)
1152 div_basis_ref(b,ip) = dyn_div_basis_ref(b,ip);
1156 if(use_vertex_coordinates) {
1161 using coordsScalarType =
typename Intrepid2::Basis<PHX::Device::execution_space,Scalar,Scalar>::scalarType;
1162 auto dyn_basis_coordinates_ref = af.
buildArray<coordsScalarType,BASIS,Dim>(
"basis_coordinates_ref",
1163 basis_coordinates_ref.extent(0),
1164 basis_coordinates_ref.extent(1));
1165 intrepid_basis->getDofCoords(dyn_basis_coordinates_ref.get_view());
1168 for (
int i = 0; i < basis_coordinates_ref.extent_int(0); ++i)
1169 for (
int j = 0; j < basis_coordinates_ref.extent_int(1); ++j)
1170 basis_coordinates_ref(i,j) = dyn_basis_coordinates_ref(i,j);
1174 references_evaluated =
true;
1178 template <
typename Scalar>
1181 const int in_num_cells)
1183 if (!intrepid_basis->requireOrientation())
1186 typedef Intrepid2::OrientationTools<PHX::Device> ots;
1193 const int num_cell_basis_layout = in_num_cells < 0 ? basis_layout->numCells() : in_num_cells;
1194 const int num_cell_orientation = orientations.size();
1195 const int num_cell = num_cell_basis_layout < num_cell_orientation ? num_cell_basis_layout : num_cell_orientation;
1196 const int num_dim = basis_layout->dimension();
1197 const Kokkos::pair<int,int> range_cell(0, num_cell);
1201 Kokkos::DynRankView<Intrepid2::Orientation,PHX::Device> drv_orts(
"drv_orts", num_cell);
1202 auto host_drv_orts = Kokkos::create_mirror_view(drv_orts);
1203 for (
size_t i=0; i < drv_orts.size(); ++i)
1204 host_drv_orts(i) = orientations[i];
1205 Kokkos::deep_copy(drv_orts,host_drv_orts);
1206 PHX::Device::fence();
1214 auto drv_basis_scalar = Kokkos::subview(basis_scalar.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL());
1216 "drv_basis_scalar_tmp",
1217 drv_basis_scalar.extent(0),
1218 drv_basis_scalar.extent(1),
1219 drv_basis_scalar.extent(2));
1220 Kokkos::deep_copy(drv_basis_scalar_tmp, drv_basis_scalar);
1221 ots::modifyBasisByOrientation(drv_basis_scalar,
1222 drv_basis_scalar_tmp,
1226 if(build_weighted) {
1227 auto drv_basis_scalar = Kokkos::subview(weighted_basis_scalar.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL());
1229 "drv_basis_scalar_tmp",
1230 drv_basis_scalar.extent(0),
1231 drv_basis_scalar.extent(1),
1232 drv_basis_scalar.extent(2));
1233 Kokkos::deep_copy(drv_basis_scalar_tmp, drv_basis_scalar);
1234 ots::modifyBasisByOrientation(drv_basis_scalar,
1235 drv_basis_scalar_tmp,
1242 if (compute_derivatives) {
1244 auto drv_grad_basis = Kokkos::subview(grad_basis.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1246 "drv_grad_basis_tmp",
1247 drv_grad_basis.extent(0),
1248 drv_grad_basis.extent(1),
1249 drv_grad_basis.extent(2),
1250 drv_grad_basis.extent(3));
1251 Kokkos::deep_copy(drv_grad_basis_tmp, drv_grad_basis);
1252 ots::modifyBasisByOrientation(drv_grad_basis,
1257 if(build_weighted) {
1258 auto drv_grad_basis = Kokkos::subview(weighted_grad_basis.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1260 "drv_grad_basis_tmp",
1261 drv_grad_basis.extent(0),
1262 drv_grad_basis.extent(1),
1263 drv_grad_basis.extent(2),
1264 drv_grad_basis.extent(3));
1265 Kokkos::deep_copy(drv_grad_basis_tmp, drv_grad_basis);
1266 ots::modifyBasisByOrientation(drv_grad_basis,
1280 auto drv_basis_vector = Kokkos::subview(basis_vector.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1282 "drv_basis_vector_tmp",
1283 drv_basis_vector.extent(0),
1284 drv_basis_vector.extent(1),
1285 drv_basis_vector.extent(2),
1286 drv_basis_vector.extent(3));
1287 Kokkos::deep_copy(drv_basis_vector_tmp, drv_basis_vector);
1288 ots::modifyBasisByOrientation(drv_basis_vector,
1289 drv_basis_vector_tmp,
1293 if(build_weighted) {
1294 auto drv_basis_vector = Kokkos::subview(weighted_basis_vector.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1296 "drv_basis_vector_tmp",
1297 drv_basis_vector.extent(0),
1298 drv_basis_vector.extent(1),
1299 drv_basis_vector.extent(2),
1300 drv_basis_vector.extent(3));
1301 Kokkos::deep_copy(drv_basis_vector_tmp, drv_basis_vector);
1302 ots::modifyBasisByOrientation(drv_basis_vector,
1303 drv_basis_vector_tmp,
1309 if (compute_derivatives) {
1311 auto drv_curl_basis_scalar = Kokkos::subview(curl_basis_scalar.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL());
1313 "drv_curl_basis_scalar_tmp",
1314 drv_curl_basis_scalar.extent(0),
1315 drv_curl_basis_scalar.extent(1),
1316 drv_curl_basis_scalar.extent(2));
1317 Kokkos::deep_copy(drv_curl_basis_scalar_tmp, drv_curl_basis_scalar);
1318 ots::modifyBasisByOrientation(drv_curl_basis_scalar,
1319 drv_curl_basis_scalar_tmp,
1324 if(build_weighted) {
1325 auto drv_curl_basis_scalar = Kokkos::subview(weighted_curl_basis_scalar.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL());
1327 "drv_curl_basis_scalar_tmp",
1328 drv_curl_basis_scalar.extent(0),
1329 drv_curl_basis_scalar.extent(1),
1330 drv_curl_basis_scalar.extent(2));
1331 Kokkos::deep_copy(drv_curl_basis_scalar_tmp, drv_curl_basis_scalar);
1332 ots::modifyBasisByOrientation(drv_curl_basis_scalar,
1333 drv_curl_basis_scalar_tmp,
1346 auto drv_basis_vector = Kokkos::subview(basis_vector.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1348 "drv_basis_vector_tmp",
1349 drv_basis_vector.extent(0),
1350 drv_basis_vector.extent(1),
1351 drv_basis_vector.extent(2),
1352 drv_basis_vector.extent(3));
1353 Kokkos::deep_copy(drv_basis_vector_tmp, drv_basis_vector);
1354 ots::modifyBasisByOrientation(drv_basis_vector,
1355 drv_basis_vector_tmp,
1359 if(build_weighted) {
1360 auto drv_basis_vector = Kokkos::subview(weighted_basis_vector.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1362 "drv_basis_vector_tmp",
1363 drv_basis_vector.extent(0),
1364 drv_basis_vector.extent(1),
1365 drv_basis_vector.extent(2),
1366 drv_basis_vector.extent(3));
1367 Kokkos::deep_copy(drv_basis_vector_tmp, drv_basis_vector);
1368 ots::modifyBasisByOrientation(drv_basis_vector,
1369 drv_basis_vector_tmp,
1375 if (compute_derivatives) {
1377 auto drv_curl_basis_vector = Kokkos::subview(curl_basis_vector.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1379 "drv_curl_basis_vector_tmp",
1380 drv_curl_basis_vector.extent(0),
1381 drv_curl_basis_vector.extent(1),
1382 drv_curl_basis_vector.extent(2),
1383 drv_curl_basis_vector.extent(3));
1384 Kokkos::deep_copy(drv_curl_basis_vector_tmp, drv_curl_basis_vector);
1385 ots::modifyBasisByOrientation(drv_curl_basis_vector,
1386 drv_curl_basis_vector_tmp,
1390 if(build_weighted) {
1391 auto drv_curl_basis_vector = Kokkos::subview(weighted_curl_basis_vector.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1393 "drv_curl_basis_vector_tmp",
1394 drv_curl_basis_vector.extent(0),
1395 drv_curl_basis_vector.extent(1),
1396 drv_curl_basis_vector.extent(2),
1397 drv_curl_basis_vector.extent(3));
1398 Kokkos::deep_copy(drv_curl_basis_vector_tmp, drv_curl_basis_vector);
1399 ots::modifyBasisByOrientation(drv_curl_basis_vector,
1400 drv_curl_basis_vector_tmp,
1412 auto drv_basis_vector = Kokkos::subview(basis_vector.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1414 "drv_basis_vector_tmp",
1415 drv_basis_vector.extent(0),
1416 drv_basis_vector.extent(1),
1417 drv_basis_vector.extent(2),
1418 drv_basis_vector.extent(3));
1419 Kokkos::deep_copy(drv_basis_vector_tmp, drv_basis_vector);
1420 ots::modifyBasisByOrientation(drv_basis_vector,
1421 drv_basis_vector_tmp,
1425 if(build_weighted) {
1426 auto drv_basis_vector = Kokkos::subview(weighted_basis_vector.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
1428 "drv_basis_vector_tmp",
1429 drv_basis_vector.extent(0),
1430 drv_basis_vector.extent(1),
1431 drv_basis_vector.extent(2),
1432 drv_basis_vector.extent(3));
1433 Kokkos::deep_copy(drv_basis_vector_tmp, drv_basis_vector);
1434 ots::modifyBasisByOrientation(drv_basis_vector,
1435 drv_basis_vector_tmp,
1440 if (compute_derivatives) {
1442 auto drv_div_basis = Kokkos::subview(div_basis.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL());
1444 "drv_div_basis_tmp",
1445 drv_div_basis.extent(0),
1446 drv_div_basis.extent(1),
1447 drv_div_basis.extent(2));
1448 Kokkos::deep_copy(drv_div_basis_tmp, drv_div_basis);
1449 ots::modifyBasisByOrientation(drv_div_basis,
1454 if(build_weighted) {
1455 auto drv_div_basis = Kokkos::subview(weighted_div_basis.get_view(), range_cell, Kokkos::ALL(), Kokkos::ALL());
1457 "drv_div_basis_tmp",
1458 drv_div_basis.extent(0),
1459 drv_div_basis.extent(1),
1460 drv_div_basis.extent(2));
1461 Kokkos::deep_copy(drv_div_basis_tmp, drv_div_basis);
1462 ots::modifyBasisByOrientation(drv_div_basis,
1472 template <
typename Scalar>
1479 int num_cell = orientations.extent(0);
1480 int num_basis = orientations.extent(1);
1481 int num_dim = basis_layout->dimension();
1482 int num_ip = basis_layout->numPoints();
1490 for (
int c=0; c<num_cell; c++)
1491 for (
int b=0; b<num_basis; b++)
1492 for (
int p=0; p<num_ip; p++)
1493 for (
int d=0; d<num_dim; d++)
1494 basis_vector(c, b, p, d) *= orientations(c, b);
1496 if(compute_derivatives) {
1498 for (
int c=0; c<num_cell; c++)
1499 for (
int b=0; b<num_basis; b++)
1500 for (
int p=0; p<num_ip; p++)
1501 curl_basis_scalar(c, b, p) *= orientations(c, b);
1505 if(build_weighted) {
1506 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::applyFieldSigns(weighted_basis_vector.get_view(),orientations.get_view());
1508 if(compute_derivatives)
1509 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::applyFieldSigns(weighted_curl_basis_scalar.get_view(),orientations.get_view());
1517 for (
int c=0; c<num_cell; c++)
1518 for (
int b=0; b<num_basis; b++)
1519 for (
int p=0; p<num_ip; p++)
1520 for (
int d=0; d<num_dim; d++)
1521 basis_vector(c, b, p, d) *= orientations(c, b);
1523 if(compute_derivatives) {
1525 for (
int c=0; c<num_cell; c++)
1526 for (
int b=0; b<num_basis; b++)
1527 for (
int p=0; p<num_ip; p++)
1528 for (
int d=0; d<num_dim; d++)
1529 curl_basis_vector(c, b, p,d) *= orientations(c, b);
1533 if(build_weighted) {
1534 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::applyFieldSigns(weighted_basis_vector.get_view(),orientations.get_view());
1536 if(compute_derivatives)
1537 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::applyFieldSigns(weighted_curl_basis_vector.get_view(),orientations.get_view());
1544 for (
int c=0; c<num_cell; c++)
1545 for (
int b=0; b<num_basis; b++)
1546 for (
int p=0; p<num_ip; p++)
1547 for (
int d=0; d<num_dim; d++)
1548 basis_vector(c, b, p, d) *= orientations(c, b);
1550 if(compute_derivatives) {
1553 for (
int c=0; c<num_cell; c++)
1554 for (
int b=0; b<num_basis; b++)
1555 for (
int p=0; p<num_ip; p++)
1556 div_basis(c, b, p) *= orientations(c, b);
1560 if(build_weighted) {
1561 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::applyFieldSigns(weighted_basis_vector.get_view(),orientations.get_view());
1563 if(compute_derivatives)
1564 Intrepid2::FunctionSpaceTools<PHX::Device::execution_space>::applyFieldSigns(weighted_div_basis.get_view(),orientations.get_view());
1569 template <
typename Scalar>
1571 {
return basis_layout->getBasis()->getElementSpace(); }
1573 template <
typename Scalar>
1576 bool computeDerivatives)
1580 compute_derivatives = computeDerivatives;
1581 basis_layout = layout;
1588 int numcells = basisDesc->
numCells();
1592 intrepid_basis = basisDesc->
getIntrepid2Basis<PHX::Device::execution_space,Scalar,Scalar>();
1603 basis_ref_scalar = af.
buildStaticArray<Scalar,BASIS,IP>(
"basis_ref",card,num_quad);
1604 basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"basis",numcells,card,num_quad);
1607 weighted_basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"weighted_basis",numcells,card,num_quad);
1612 if(compute_derivatives) {
1613 grad_basis_ref = af.
buildStaticArray<Scalar,BASIS,IP,Dim>(
"grad_basis_ref",card,num_quad,dim);
1614 grad_basis = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"grad_basis",numcells,card,num_quad,dim);
1617 weighted_grad_basis = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"weighted_grad_basis",numcells,card,num_quad,dim);
1631 basis_ref_vector = af.
buildStaticArray<Scalar,BASIS,IP,Dim>(
"basis_ref",card,num_quad,dim);
1632 basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"basis",numcells,card,num_quad,dim);
1635 weighted_basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"weighted_basis",numcells,card,num_quad,dim);
1645 if(compute_derivatives) {
1648 curl_basis_ref_scalar = af.
buildStaticArray<Scalar,BASIS,IP>(
"curl_basis_ref",card,num_quad);
1649 curl_basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"curl_basis",numcells,card,num_quad);
1652 weighted_curl_basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"weighted_curl_basis",numcells,card,num_quad);
1655 curl_basis_ref_vector = af.
buildStaticArray<Scalar,BASIS,IP,Dim>(
"curl_basis_ref",card,num_quad,dim);
1656 curl_basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"curl_basis",numcells,card,num_quad,dim);
1659 weighted_curl_basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"weighted_curl_basis",numcells,card,num_quad,dim);
1670 basis_ref_vector = af.
buildStaticArray<Scalar,BASIS,IP,Dim>(
"basis_ref",card,num_quad,dim);
1671 basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"basis",numcells,card,num_quad,dim);
1674 weighted_basis_vector = af.
buildStaticArray<Scalar,Cell,BASIS,IP,Dim>(
"weighted_basis",numcells,card,num_quad,dim);
1689 if(compute_derivatives) {
1690 div_basis_ref = af.
buildStaticArray<Scalar,BASIS,IP>(
"div_basis_ref",card,num_quad);
1691 div_basis = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"div_basis",numcells,card,num_quad);
1694 weighted_div_basis = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"weighted_div_basis",numcells,card,num_quad);
1702 basis_ref_scalar = af.
buildStaticArray<Scalar,BASIS,IP>(
"basis_ref",card,num_quad);
1703 basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"basis",numcells,card,num_quad);
1706 weighted_basis_scalar = af.
buildStaticArray<Scalar,Cell,BASIS,IP>(
"weighted_basis",numcells,card,num_quad);
1725 basis_coordinates_ref = af.
buildStaticArray<Scalar,BASIS,Dim>(
"basis_coordinates_ref",card,dim);
1726 basis_coordinates = af.
buildStaticArray<Scalar,Cell,BASIS,Dim>(
"basis_coordinates",numcells,card,dim);
Kokkos::DynRankView< typename InputArray::value_type, PHX::Device > createDynRankView(const InputArray &a, const std::string &name, const DimensionPack...dims)
Wrapper to simplify Panzer use of Sacado ViewFactory.
void evaluateReferenceValues(const PHX::MDField< Scalar, IP, Dim > &cub_points, bool compute_derivatives, bool use_vertex_coordinates)
EElementSpace getElementSpace() const
int cardinality() const
Returns the number of basis coefficients.
ArrayTraits< Scalar, PHX::MDField< Scalar, void, void, void, void, void, void, void, void > >::size_type size_type
PHX::MDField< Scalar, T0 > buildStaticArray(const std::string &str, int d0) const
Teuchos::RCP< const PureBasis > getBasis() const
int dimension() const
Returns the dimension of the basis from the topology.
void applyOrientations(const PHX::MDField< const Scalar, Cell, BASIS > &orientations)
Method to apply orientations to a basis values container.
Teuchos::RCP< const shards::CellTopology > getCellTopology() const
#define TEUCHOS_TEST_FOR_EXCEPT_MSG(throw_exception_test, msg)
void evaluateValues(const PHX::MDField< Scalar, IP, Dim, void, void, void, void, void, void > &cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac, const PHX::MDField< Scalar, Cell, IP, void, void, void, void, void, void > &jac_det, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac_inv, const int in_num_cells=-1)
void evaluateBasisCoordinates(const PHX::MDField< Scalar, Cell, NODE, Dim > &vertex_coordinates, const int in_num_cells=-1)
void evaluateValues_HVol(const PHX::MDField< Scalar, Cell, IP, Dim, void, void, void, void, void > &cub_points, const PHX::MDField< Scalar, Cell, IP, void, void, void, void, void, void > &jac_det, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac_inv, const PHX::MDField< Scalar, Cell, IP > &weighted_measure, const int in_num_cells)
void evaluateValues_HGrad(const PHX::MDField< Scalar, Cell, IP, Dim, void, void, void, void, void > &cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac_inv, const PHX::MDField< Scalar, Cell, IP > &weighted_measure, const int in_num_cells)
void evaluateValues_Const(const PHX::MDField< Scalar, Cell, IP, Dim, void, void, void, void, void > &cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac_inv, const PHX::MDField< Scalar, Cell, IP > &weighted_measure, const int in_num_cells)
PureBasis::EElementSpace getElementSpace() const
Teuchos::RCP< Intrepid2::Basis< PHX::Device::execution_space, double, double > > getIntrepid2Basis() const
void evaluateValues_HDiv(const PHX::MDField< Scalar, Cell, IP, Dim, void, void, void, void, void > &cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac, const PHX::MDField< Scalar, Cell, IP, void, void, void, void, void, void > &jac_det, const PHX::MDField< Scalar, Cell, IP > &weighted_measure, const int in_num_cells)
void setupArrays(const Teuchos::RCP< const panzer::BasisIRLayout > &basis, bool computeDerivatives=true)
Sizes/allocates memory for arrays.
int numCells() const
Returns the number of cells in the data layouts.
Description and data layouts associated with a particular basis.
#define TEUCHOS_ASSERT(assertion_test)
void evaluateValuesCV(const PHX::MDField< Scalar, Cell, IP, Dim, void, void, void, void, void > &cell_cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac, const PHX::MDField< Scalar, Cell, IP, void, void, void, void, void, void > &jac_det, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac_inv)
PHX::MDField< Scalar > buildArray(const std::string &str, int d0) const
void evaluateValues_HCurl(const PHX::MDField< Scalar, Cell, IP, Dim, void, void, void, void, void > &cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac, const PHX::MDField< Scalar, Cell, IP, void, void, void, void, void, void > &jac_det, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac_inv, const PHX::MDField< Scalar, Cell, IP > &weighted_measure, const int in_num_cells)
PHX::MDField< Scalar > ArrayDynamic