11#ifndef PANZER_COORDINATESEVALUTOR_IMPL_HPP
12#define PANZER_COORDINATESEVALUTOR_IMPL_HPP
17template<
typename EvalT,
typename Traits>
20 const Teuchos::ParameterList& p) :
21 dimension(p.get<int>(
"Dimension")),
22 coordinate( p.get<
std::string>(
"Field Name"),
23 p.get<
Teuchos::RCP<
PHX::DataLayout> >(
"Data Layout") )
27 std::string n =
"CoordinatesEvaluator: " +
coordinate.fieldTag().name();
32template<
typename EvalT,
typename Traits>
39 this->utils.setFieldData(coordinate,fm);
43template<
typename EvalT,
typename Traits>
49 auto coords = this->wda(d).cell_node_coordinates.get_static_view();
50 auto coordinate_v = coordinate.get_static_view();
51 auto l_dimension = dimension;
54 Kokkos::parallel_for(d.
num_cells, KOKKOS_LAMBDA (
int i) {
55 for(
int j=0;j<coords.extent_int(1);j++)
56 coordinate_v(i,j) = coords(i,j,l_dimension);
void evaluateFields(typename Traits::EvalData d)
Copies the selected spatial dimension of this workset's cell node coordinates into the field.
CoordinatesEvaluator(const Teuchos::ParameterList &p)
Construct from a ParameterList specifying the field name, data layout, and which spatial dimension to...
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
Sets up the field data handle used by evaluateFields(). Called once before the first evaluation.
PHX::MDField< ScalarT, Cell, BASIS > coordinate
int num_cells
DEPRECATED - use: numCells()
User-defined data passed to PHX::Evaluator::postRegistrationSetup() during the one-time setup phase.