11 #ifndef PANZER_PROJECT_TO_FACES_IMPL_HPP 
   12 #define PANZER_PROJECT_TO_FACES_IMPL_HPP 
   14 #include "Teuchos_Assert.hpp" 
   15 #include "Phalanx_DataLayout.hpp" 
   17 #include "Intrepid2_Cubature.hpp" 
   18 #include "Intrepid2_DefaultCubatureFactory.hpp" 
   19 #include "Intrepid2_FunctionSpaceTools.hpp" 
   20 #include "Intrepid2_Kernels.hpp" 
   21 #include "Intrepid2_CellTools.hpp" 
   22 #include "Intrepid2_OrientationTools.hpp" 
   28 #include "Kokkos_ViewFactory.hpp" 
   30 #include "Teuchos_FancyOStream.hpp" 
   34 template<
typename EvalT,
typename Traits>
 
   38   dof_name_ = (p.
get< std::string >(
"DOF Name"));
 
   52   this->addEvaluatedField(result_);
 
   55   this->addDependentField(normals_);
 
   58   this->addDependentField(vector_values_);
 
   60   this->setName(
"Project To Faces");
 
   64 template<
typename EvalT,
typename Traits>
 
   69   num_faces_  = result_.extent(1);
 
   70   num_dim_  = vector_values_.extent(2);
 
   77 template<
typename EvalT,
typename Traits>
 
   88   const int intDegree = basis_->order();
 
   92   auto vector_values = vector_values_.get_static_view();
 
   93   auto normals = normals_.get_static_view();
 
   94   auto num_faces = num_faces_;
 
   95   auto num_dim = num_dim_;
 
   98   Kokkos::parallel_for(
"panzer::ProjectToFaces",policy,KOKKOS_LAMBDA(
const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) {
 
   99     const auto cell = team.league_rank();
 
  100     Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,num_faces),[&] (
const int p) {
 
  102       for (
int dim = 0; dim < num_dim; ++dim)
 
  103         result(cell,p) += vector_values(cell,p,dim) * normals(cell,p,dim);
 
int num_cells
DEPRECATED - use: numCells() 
void evaluateFields(typename Traits::EvalData d)
T & get(const std::string &name, T def_value)
Kokkos::TeamPolicy< TeamPolicyProperties...> teamPolicy(const int &league_size)
Returns a TeamPolicy for hierarchic parallelism. 
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &vm)
PHX::MDField< ScalarT, panzer::Cell, panzer::IP > result
A field that will be used to build up the result of the integral we're performing. 
KOKKOS_FORCEINLINE_FUNCTION array_type get_static_view()
ProjectToFaces(const Teuchos::ParameterList &p)
bool isType(const std::string &name) const 
static HP & inst()
Private ctor. 
#define TEUCHOS_ASSERT(assertion_test)