43 #ifndef __Panzer_DOF_Functors_hpp__
44 #define __Panzer_DOF_Functors_hpp__
46 #include "Phalanx_MDField.hpp"
47 #include "Phalanx_KokkosDeviceTypes.hpp"
54 namespace dof_functors {
56 template <
typename ScalarT,
typename Array,
int spaceDim>
67 using scratch_view = Kokkos::View<ScalarT* ,typename PHX::DevLayout<ScalarT>::type,
typename PHX::exec_space::scratch_memory_space,Kokkos::MemoryUnmanaged>;
70 PHX::View<ScalarT***> in_dof_ip,
72 bool in_use_shared_memory =
false)
80 KOKKOS_INLINE_FUNCTION
81 void operator()(
const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team)
const
83 const int cell = team.league_rank();
86 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numPoints), [&] (
const int& pt) {
87 for (
int d=0; d<spaceDim; ++d) {
103 if (Sacado::IsADType<ScalarT>::value) {
112 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numFields), [&] (
const int& dof) {
118 for (
int dim=0; dim < spaceDim; ++dim) {
120 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numPoints), [&] (
const int& pt) {
121 point_values(pt) = 0.0;
126 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numPoints), [&] (
const int& pt) {
127 point_values(pt) += dof_values(dof) *
basis(cell,dof,pt,dim);
132 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,
numPoints), [&] (
const int& pt) {
133 dof_ip(cell,pt,dim) = point_values(pt);
146 if (Sacado::IsADType<ScalarT>::value)
155 template <
typename ScalarT,
typename Array>
168 PHX::MDField<ScalarT,Cell,Point> in_dof_ip,
175 KOKKOS_INLINE_FUNCTION
189 template <
typename ScalarT,
typename Array,
int spaceDim>
192 PHX::MDField<ScalarT,Cell,Point,Dim>
dof_ip;
203 PHX::MDField<ScalarT,Cell,Point,Dim> in_dof_ip,
204 Kokkos::View<const int*,PHX::Device> in_offsets,
211 KOKKOS_INLINE_FUNCTION
214 typedef Sacado::ScalarValue<ScalarT> Value;
217 for (
int d=0; d<spaceDim; d++) {
235 template <
typename ScalarT,
typename Array>
249 PHX::MDField<ScalarT,Cell,Point> in_dof_ip,
250 Kokkos::View<const int*,PHX::Device> in_offsets,
257 KOKKOS_INLINE_FUNCTION
260 typedef Sacado::ScalarValue<ScalarT> Value;
KOKKOS_INLINE_FUNCTION void operator()(const unsigned int cell) const
KOKKOS_INLINE_FUNCTION void operator()(const unsigned int cell) const
PHX::View< const ScalarT ** > dof_basis
Kokkos::View< ScalarT *,typename PHX::DevLayout< ScalarT >::type, typename PHX::exec_space::scratch_memory_space, Kokkos::MemoryUnmanaged > scratch_view
PHX::Device execution_space
const bool use_shared_memory
size_t team_shmem_size(int) const
EvaluateDOFFastSens_Vector(PHX::MDField< const ScalarT, Cell, Point > in_dof_basis, PHX::MDField< ScalarT, Cell, Point, Dim > in_dof_ip, Kokkos::View< const int *, PHX::Device > in_offsets, Array in_basis)
PHX::MDField< const ScalarT, Cell, Point > dof_basis
Kokkos::View< const int *, PHX::Device > offsets
PHX::MDField< const ScalarT, Cell, Point > dof_basis
KOKKOS_INLINE_FUNCTION void operator()(const unsigned int cell) const
PHX::MDField< ScalarT, Cell, Point > dof_ip
PHX::MDField< ScalarT, Cell, Point, Dim > dof_ip
PHX::Device execution_space
EvaluateDOFFastSens_Scalar(PHX::MDField< const ScalarT, Cell, Point > in_dof_basis, PHX::MDField< ScalarT, Cell, Point > in_dof_ip, Kokkos::View< const int *, PHX::Device > in_offsets, Array in_basis)
EvaluateDOFWithSens_Scalar(PHX::MDField< const ScalarT, Cell, Point > in_dof_basis, PHX::MDField< ScalarT, Cell, Point > in_dof_ip, Array in_basis)
KOKKOS_INLINE_FUNCTION void operator()(const Kokkos::TeamPolicy< PHX::exec_space >::member_type &team) const
PHX::Device execution_space
PHX::MDField< const ScalarT, Cell, Point > dof_basis
PHX::View< ScalarT *** > dof_ip
EvaluateDOFWithSens_Vector(PHX::View< const ScalarT ** > in_dof_basis, PHX::View< ScalarT *** > in_dof_ip, Array in_basis, bool in_use_shared_memory=false)
Kokkos::View< const int *, PHX::Device > offsets
PHX::MDField< ScalarT, Cell, Point > dof_ip