43 #ifndef __Panzer_Integerator_BasisTimesVector_impl_hpp__ 44 #define __Panzer_Integerator_BasisTimesVector_impl_hpp__ 46 #include "Intrepid2_FunctionSpaceTools.hpp" 51 #include "Phalanx_KokkosDeviceTypes.hpp" 64 p.validateParameters(*valid_params);
71 "Integrator_BasisTimesVector: Basis of type \"" <<
basis->
name() <<
"\" is not " 74 "Integrator_BasisTimesVector: Basis of type \"" <<
basis->
name() <<
"\" does not " 75 "require orientation. This seems very strange, so I'm failing.");
83 if (p.isType<
Teuchos::RCP<
const std::vector<std::string> > >(
"Field Multipliers")) {
84 const std::vector<std::string>& field_multiplier_names =
89 kokkos_field_multipliers = Kokkos::View<Kokkos::View<ScalarT**>* >(
"BasisTimesVector::KokkosFieldMultipliers", field_multiplier_names.size());
91 for (std::vector<std::string>::const_iterator name =
92 field_multiplier_names.begin();
93 name != field_multiplier_names.end(); ++name) {
101 std::string n =
"Integrator_BasisTimesVector: " +
residual.fieldTag().name();
108 this->utils.setFieldData(
residual,fm);
129 template<
typename EvalT,
typename TRAITS>
130 template<
int NUM_FIELD_MULT>
131 KOKKOS_INLINE_FUNCTION
137 for (
int lbf = 0; lbf < nbf; lbf++)
141 if ( NUM_FIELD_MULT == 0 ){
142 for (
int qp = 0; qp < nqp; ++qp) {
143 for (
int d = 0; d < ndim; ++d) {
145 for (
int lbf = 0; lbf < nbf; lbf++)
149 }
else if ( NUM_FIELD_MULT == 1 ){
150 for (
int qp = 0; qp < nqp; ++qp) {
151 for (
int d = 0; d < ndim; ++d) {
153 for (
int lbf = 0; lbf < nbf; lbf++)
158 for (
int qp = 0; qp < nqp; ++qp) {
159 for (
int i = 0; i < nfm; ++i)
161 for (
int d = 0; d < ndim; ++d) {
163 for (
int lbf = 0; lbf < nbf; lbf++)
176 Kokkos::parallel_for(Kokkos::RangePolicy<
FieldMultTag<0> >(0, workset.num_cells),*
this);
178 Kokkos::parallel_for(Kokkos::RangePolicy<
FieldMultTag<1> >(0, workset.num_cells),*
this);
180 Kokkos::parallel_for(Kokkos::RangePolicy<
FieldMultTag<-1> >(0, workset.num_cells),*
this);
184 template<
typename EvalT,
typename TRAITS>
189 p->
set<std::string>(
"Residual Name",
"?");
190 p->
set<std::string>(
"Value Name",
"?");
191 p->
set<std::string>(
"Test Field Name",
"?");
196 p->
set<
double>(
"Multiplier", 1.0);
198 p->
set(
"Field Multipliers", fms);
PHX::MDField< ScalarT > residual
Evaluates a Dirichlet BC residual corresponding to a field value.
std::vector< std::string >::size_type getBasisIndex(std::string basis_name, panzer::Workset &workset, WorksetDetailsAccessor &wda)
Returns the index in the workset bases for a particular BasisIRLayout name.
std::string name() const
A unique key that is the combination of the basis type and basis order.
PHX::MDField< ScalarT, Cell > tmp
Kokkos::View< Kokkos::View< ScalarT **> *> kokkos_field_multipliers
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
PHX::MDField< ScalarT, Cell, IP, Dim > vectorField
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void operator()(const FieldMultTag< NUM_FIELD_MULT > &, const std::size_t &cell) const
bool isVectorBasis() const
bool requiresOrientations() const
Teuchos::RCP< Teuchos::ParameterList > getValidParameters() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
PHX::MDField< double, Cell, BASIS, IP, Dim > weighted_basis_vector
Teuchos::RCP< PHX::DataLayout > dl_scalar
Data layout for scalar fields.
PHX_EVALUATOR_CTOR(BasisValues_Evaluator, p)
PHX_EVALUATE_FIELDS(BasisValues_Evaluator, workset)
Teuchos::RCP< const panzer::PureBasis > basis
Interpolates basis DOF values to IP DOF values.
std::vector< PHX::MDField< const ScalarT, Cell, IP > > field_multipliers
PHX_POST_REGISTRATION_SETUP(BasisValues_Evaluator, sd, fm)