Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_ZeroContributedField_impl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef PANZER_ZEROCONTRIBUTEDFIELD_IMPL_HPP
12 #define PANZER_ZEROCONTRIBUTEDFIELD_IMPL_HPP
13 
14 namespace panzer
15 {
17  //
18  // Constructor
19  //
21  template<typename EvalT, typename Traits>
24  const std::string& fieldName,
25  PHX::DataLayout& layout)
26  {
27  using PHX::MDField;
28  using Teuchos::rcpFromRef;
29  field_ = MDField<ScalarT>(fieldName, rcpFromRef(layout));
30  this->addEvaluatedField(field_);
31  this->setName("ZeroContributedField: " + field_.fieldTag().identifier());
32  } // end of Constructor
33 
35  //
36  // evaluateFields()
37  //
39  template<typename EvalT, typename Traits>
40  void
43  typename Traits::EvalData /* d */)
44  {
45  field_.deep_copy(ScalarT(0.0));
46  } // end of evaluateFields()
47 
48 } // end of namespace panzer
49 
50 #endif // PANZER_ZEROCONTRIBUTEDFIELD_IMPL_HPP
void evaluateFields(typename Traits::EvalData d) override
Evaluate the field.
typename EvalT::ScalarT ScalarT
The scalar data type.
ZeroContributedField(const std::string &fieldName, PHX::DataLayout &layout)
Constructor.