Panzer Version of the Day
Loading...
Searching...
No Matches
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
24namespace panzer {
25
26struct GlobalData;
27
28template<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
60 PHX::MDField<ScalarT,Cell> volumes;
61
62 PHX::MDField<ScalarT,Cell> tmp;
63
64 PHX::MDField<ScalarT,Cell,IP> ones;
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
78 std::size_t ir_index;
79
80 Teuchos::RCP<const Teuchos::Comm<int> > comm;
81
82 Teuchos::RCP<panzer::GlobalData> global_data;
83
84 void postprocess(std::ostream& os);
85
86public:
87 const PHX::FieldTag& getRequiredFieldTag();
88
89}; // end of class GlobalStatistics
90
91
92}
93
94#endif
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
std::vector< PHX::MDField< const ScalarT, Cell, IP > > field_values
void postEvaluate(typename Traits::PostEvalData d)
PHX::MDField< ScalarT, Cell, IP > ones
PHX::MDField< ScalarT, Cell > tmp
Teuchos::RCP< const Teuchos::Comm< int > > comm
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
Teuchos::RCP< panzer::GlobalData > global_data
PHX::MDField< ScalarT, Cell > volumes
const PHX::FieldTag & getRequiredFieldTag()
void preEvaluate(typename Traits::PreEvalData d)
void evaluateFields(typename Traits::EvalData d)