43 #ifndef __Panzer_FieldSpy_impl_hpp__
44 #define __Panzer_FieldSpy_impl_hpp__
48 #include "Phalanx_DataLayout_MDALayout.hpp"
55 template <
typename EvalT,
typename Traits>
62 dummyField =
rcp(
new PHX::Tag<ScalarT>(
"Field Spy: " + name,
rcp(
new PHX::MDALayout<panzer::Dummy>(0))));
63 this->addEvaluatedField(*dummyField);
65 source = PHX::MDField<const ScalarT,Cell,Point>(name, data_layout);
66 this->addDependentField(source);
68 std::string n =
"Field Spy";
73 template <
typename EvalT,
typename Traits>
76 std::cout <<
"SPY: Name = \"" << source.fieldTag().identifier() <<
"\" at t = " << workset.
time <<
"\n";
77 for (index_t cell=0;cell<workset.
num_cells;++cell) {
79 for (
int point = 0; point < source.extent_int(1); ++point) {
80 std::cout << Sacado::ScalarValue<ScalarT>::eval(source(cell,point)) <<
" ";
82 std::cout << std::endl;
void evaluateFields(typename Traits::EvalData d)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
FieldSpy(const std::string &name, const Teuchos::RCP< PHX::DataLayout > &data_layout)