43 #ifndef PANZER_CONSTANT_FLUX_IMPL_HPP
44 #define PANZER_CONSTANT_FLUX_IMPL_HPP
49 template<
typename EvalT,
typename Traits>
53 flux( p.get<std::string>(
"Flux Field Name"),
54 p.get< Teuchos::
RCP<PHX::DataLayout> >(
"Data Layout") )
59 values.push_back(Teuchos::getValue<double>(i->second));
61 this->addEvaluatedField(
flux);
63 std::string n =
"Constant: " +
flux.fieldTag().name();
68 template<
typename EvalT,
typename Traits>
76 this->utils.setFieldData(flux,fm);
78 TEUCHOS_ASSERT(static_cast<std::size_t>(flux.extent(2)) == values.size());
80 for (
int cell = 0; cell < flux.extent_int(0); ++cell)
81 for (
int ip = 0; ip < flux.extent_int(1); ++ip)
82 for (
int dim = 0; dim < flux.extent_int(2); ++dim)
83 flux(cell,ip,dim) = values[dim];
87 template<
typename EvalT,
typename Traits>
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
std::vector< ScalarT > values
ConstIterator end() const
ConstantFlux(const Teuchos::ParameterList &p)
params_t::ConstIterator ConstIterator
ConstIterator begin() const
ParameterList & sublist(const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
#define TEUCHOS_ASSERT(assertion_test)
PHX::MDField< ScalarT > flux
void evaluateFields(typename Traits::EvalData d)