Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_ZeroContributedField.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_HPP
12 #define PANZER_ZEROCONTRIBUTEDFIELD_HPP
13 
15 //
16 // Include Files
17 //
19 
20 // Panzer
22 
23 // Phalanx
24 #include "Phalanx_Evaluator_Derived.hpp"
25 #include "Phalanx_MDField.hpp"
26 
27 namespace panzer
28 {
35  template<typename EvalT, typename Traits>
37  :
38  public panzer::EvaluatorWithBaseImpl<Traits>,
39  public PHX::EvaluatorDerived<EvalT, Traits>
40  {
41  public:
42 
53  const std::string& fieldName,
54  PHX::DataLayout& layout);
55 
61  void
63  typename Traits::EvalData d) override;
64 
65  private:
66 
70  using ScalarT = typename EvalT::ScalarT;
71 
76 
77  }; // end of class ZeroContributedField
78 
79 } // end of namespace panzer
80 
81 #endif // PANZER_ZEROCONTRIBUTEDFIELD_HPP
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
PHX::MDField< ScalarT > field_
The field being initialized to zero.
void evaluateFields(typename Traits::EvalData d) override
Evaluate the field.
typename EvalT::ScalarT ScalarT
The scalar data type.
Build a field using a specified data layout, and set it to zero.
ZeroContributedField(const std::string &fieldName, PHX::DataLayout &layout)
Constructor.