43 #ifndef PANZER_PointValues_Evaluator_IMPL_HPP
44 #define PANZER_PointValues_Evaluator_IMPL_HPP
54 template<
typename EvalT,
typename Traits>
66 initialize(pointRule,userArray.
ptr(),Teuchos::null);
70 template <
typename EvalT,
typename TRAITST>
72 const Kokkos::DynRankView<double,PHX::Device> & userArray)
76 initialize(pointRule,Teuchos::ptrFromRef(userArray),Teuchos::null);
80 template <
typename EvalT,
typename TRAITST>
82 const PHX::MDField<double, panzer::IP, panzer::Dim> & userArray)
86 initialize(pointRule,Teuchos::ptrFromRef(userArray),Teuchos::null);
90 template <
typename EvalT,
typename TRAITST>
97 initialize(pointRule,userArray,pureBasis);
101 template <
typename EvalT,
typename TRAITST>
102 template <
typename ArrayT>
109 if(userArray!=Teuchos::null && basis==Teuchos::null)
110 useBasisValuesRefArray =
false;
111 else if(userArray==Teuchos::null && basis!=Teuchos::null)
112 useBasisValuesRefArray =
true;
119 if(userArray!=Teuchos::null) {
123 refPointArray = md_af.buildStaticArray<double,
NODE,Dim>(
"refPointArray",userArray->extent(0),userArray->extent(1));
125 for(
int i=0;i<userArray->extent_int(0);i++)
126 for(
int j=0;j<userArray->extent_int(1);j++)
127 refPointArray(i,j) = (*userArray)(i,j);
135 this->addEvaluatedField(pointValues.coords_ref);
136 this->addEvaluatedField(pointValues.node_coordinates);
137 this->addEvaluatedField(pointValues.jac);
138 this->addEvaluatedField(pointValues.jac_inv);
139 this->addEvaluatedField(pointValues.jac_det);
140 this->addEvaluatedField(pointValues.point_coords);
142 std::string n =
"PointValues_Evaluator: " + pointRule->
getName();
147 template<
typename EvalT,
typename Traits>
155 this->utils.setFieldData(pointValues.coords_ref,fm);
156 this->utils.setFieldData(pointValues.node_coordinates,fm);
157 this->utils.setFieldData(pointValues.jac,fm);
158 this->utils.setFieldData(pointValues.jac_inv,fm);
159 this->utils.setFieldData(pointValues.jac_det,fm);
160 this->utils.setFieldData(pointValues.point_coords,fm);
162 if(useBasisValuesRefArray) {
172 template<
typename EvalT,
typename Traits>
178 if(useBasisValuesRefArray) {
182 pointValues.
evaluateValues(this->wda(workset).cell_vertex_coordinates,
188 pointValues.evaluateValues(this->wda(workset).cell_vertex_coordinates,refPointArray,
PointValues_Evaluator(const Teuchos::ParameterList &p)
T & get(const std::string &name, T def_value)
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
const std::string & getName() const
void setupArrays(const Teuchos::RCP< const panzer::PointRule > &pr)
Sizes/allocates memory for arrays.
void evaluateValues(const PHX::MDField< Scalar, IP, Dim, void, void, void, void, void, void > &cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac, const PHX::MDField< Scalar, Cell, IP, void, void, void, void, void, void > &jac_det, const PHX::MDField< Scalar, Cell, IP, Dim, Dim, void, void, void, void > &jac_inv, const int in_num_cells=-1)
void initialize(const Teuchos::RCP< const panzer::PointRule > &pointRule, const Teuchos::Ptr< const ArrayT > &userArray, const Teuchos::RCP< const panzer::PureBasis > &pureBasis)
Initialization method to unify the constructors.
void evaluateFields(typename Traits::EvalData d)
std::vector< std::string >::size_type getPureBasisIndex(std::string basis_name, const panzer::Workset &workset, WorksetDetailsAccessor &wda)
Returns the index in the workset bases for a particular PureBasis name.
Array_BasisDim basis_coordinates_ref
BASIS NODE
Spatial Dimension Tag.
#define TEUCHOS_ASSERT(assertion_test)
Teuchos::RCP< const std::vector< panzer::Workset > > worksets_