Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_GlobalStatistics_decl.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_GLOBAL_STATISTICS_DECL_HPP
12 #define PANZER_GLOBAL_STATISTICS_DECL_HPP
13 
14 #include <iostream>
15 #include <string>
16 #include "Panzer_Dimension.hpp"
17 #include "Phalanx_Evaluator_Macros.hpp"
18 #include "Phalanx_MDField.hpp"
19 #include "Kokkos_DynRankView.hpp"
20 #include "Teuchos_Comm.hpp"
21 
23 
24 namespace panzer {
25 
26 struct GlobalData;
27 
28 template<typename EvalT, typename Traits>
30  :
31  public panzer::EvaluatorWithBaseImpl<Traits>,
32  public PHX::EvaluatorDerived<EvalT, Traits>
33 {
34  public:
35 
37  const Teuchos::ParameterList& p);
38 
39  void
41  typename Traits::SetupData d,
43 
44  void
46  typename Traits::EvalData d);
47 
48  void
50  typename Traits::PreEvalData d);
51 
52  void
54  typename Traits::PostEvalData d);
55 
56  private:
57 
58  using ScalarT = typename EvalT::ScalarT;
59 
61 
63 
65 
66  std::vector<PHX::MDField<const ScalarT,Cell,IP> > field_values;
67 
69  std::vector<ScalarT> averages;
70  std::vector<ScalarT> maxs;
71  std::vector<ScalarT> mins;
73  std::vector<ScalarT> global_averages;
74  std::vector<ScalarT> global_maxs;
75  std::vector<ScalarT> global_mins;
76 
77  int ir_order;
78  std::size_t ir_index;
79 
81 
83 
84  void postprocess(std::ostream& os);
85 
86 public:
88 
89 }; // end of class GlobalStatistics
90 
91 
92 }
93 
94 #endif
const PHX::FieldTag & getRequiredFieldTag()
void evaluateFields(typename Traits::EvalData d)
Teuchos::RCP< const Teuchos::Comm< int > > comm
Teuchos::RCP< panzer::GlobalData > global_data
GlobalStatistics(const Teuchos::ParameterList &p)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
void preEvaluate(typename Traits::PreEvalData d)
PHX::MDField< ScalarT, Cell > volumes
void postEvaluate(typename Traits::PostEvalData d)
PHX::MDField< ScalarT, Cell > tmp
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
PHX::MDField< ScalarT, Cell, IP > ones
std::vector< PHX::MDField< const ScalarT, Cell, IP > > field_values