11 #ifndef PANZER_PROJECT_TO_EDGES_IMPL_HPP
12 #define PANZER_PROJECT_TO_EDGES_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_OrientationTools.hpp"
25 #include "Kokkos_ViewFactory.hpp"
27 #include "Teuchos_FancyOStream.hpp"
29 template<
typename EvalT,
typename Traits>
34 dof_name_ = (p.
get< std::string >(
"DOF Name"));
48 this->addEvaluatedField(result_);
51 this->addDependentField(tangents_);
54 this->addDependentField(vector_values_);
56 this->setName(
"Project To Edges");
60 template<
typename EvalT,
typename Traits>
65 num_edges_ = vector_values_.extent(1);
66 num_dim_ = vector_values_.extent(2);
73 template<
typename EvalT,
typename Traits>
83 const int intDegree = basis_->order();
87 auto vector_values = vector_values_.get_static_view();
88 auto tangents = tangents_.get_static_view();
89 auto num_edges = num_edges_;
90 auto num_dim = num_dim_;
93 Kokkos::parallel_for(
"panzer::ProjectToEdges",policy,KOKKOS_LAMBDA(
const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) {
94 const auto cell = team.league_rank();
95 Kokkos::parallel_for(Kokkos::TeamThreadRange(team,0,num_edges),[&] (
const int p) {
97 for (
int dim = 0; dim < num_dim; ++dim)
98 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)