43 #ifndef PANZER_PROJECT_TO_EDGES_IMPL_HPP
44 #define PANZER_PROJECT_TO_EDGES_IMPL_HPP
46 #include "Teuchos_Assert.hpp"
47 #include "Phalanx_DataLayout.hpp"
49 #include "Intrepid2_Cubature.hpp"
50 #include "Intrepid2_DefaultCubatureFactory.hpp"
51 #include "Intrepid2_FunctionSpaceTools.hpp"
52 #include "Intrepid2_OrientationTools.hpp"
57 #include "Kokkos_ViewFactory.hpp"
59 #include "Teuchos_FancyOStream.hpp"
61 template<
typename EvalT,
typename Traits>
66 dof_name_ = (p.
get< std::string >(
"DOF Name"));
80 this->addEvaluatedField(result_);
83 this->addDependentField(tangents_);
86 this->addDependentField(vector_values_);
88 this->setName(
"Project To Edges");
92 template<
typename EvalT,
typename Traits>
97 num_edges_ = vector_values_.extent(1);
98 num_dim_ = vector_values_.extent(2);
105 template<
typename EvalT,
typename Traits>
115 const int intDegree = basis_->order();
119 auto vector_values = vector_values_.get_static_view();
120 auto tangents = tangents_.get_static_view();
121 auto num_edges = num_edges_;
122 auto num_dim = num_dim_;
125 Kokkos::parallel_for(
"panzer::ProjectToEdges",policy,KOKKOS_LAMBDA(
const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) {
126 const auto cell = team.league_rank();
127 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,num_edges),[&] (
const int p) {
129 for (
int dim = 0; dim < num_dim; ++dim)
130 result(cell,p) += vector_values(cell,p,dim) * tangents(cell,p,dim);
int num_cells
DEPRECATED - use: numCells()
ProjectToEdges(const Teuchos::ParameterList &p)
T & get(const std::string &name, T def_value)
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &vm)
Kokkos::TeamPolicy< TeamPolicyProperties...> teamPolicy(const int &league_size)
Returns a TeamPolicy for hierarchic parallelism.
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.
void evaluateFields(typename Traits::EvalData d)
KOKKOS_FORCEINLINE_FUNCTION array_type get_static_view()
bool isType(const std::string &name) const
static HP & inst()
Private ctor.
#define TEUCHOS_ASSERT(assertion_test)