Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_STK_ScatterCellAvgQuantity_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_STK_ScatterCellAvgQuantity_decl_HPP__
12#define __PANZER_STK_ScatterCellAvgQuantity_decl_HPP__
13
14#include "Phalanx_config.hpp"
15#include "Phalanx_Evaluator_Macros.hpp"
16#include "Phalanx_MDField.hpp"
17
18#include "Teuchos_ParameterList.hpp"
19
20#include "Panzer_Dimension.hpp"
21#include "Panzer_Traits.hpp"
22
24
26
27namespace panzer_stk {
28
41template<typename EvalT, typename Traits>
43 :
44 public panzer::EvaluatorWithBaseImpl<Traits>,
45 public PHX::EvaluatorDerived<EvalT, Traits>
46{
47 public:
48
51 const Teuchos::ParameterList& p);
52
54 void
56 typename Traits::SetupData d,
58
60 void
62 typename Traits::EvalData d);
63
64 private:
65
66 using ScalarT = typename EvalT::ScalarT;
67 typedef panzer_stk::STK_Interface::SolutionFieldType VariableField; // this is weird, but the correct thing
68
69 std::size_t numValues_;
70
71 // map of variable-name to scale-factors to be applied upon output. if
72 // this is empty then no variable scaling will be performed. this
73 // should be passed in as an object via the teuchos parameter list in
74 // the ctor with the parameter name "Variable Scale Factors Map".
75 Teuchos::RCP<std::map<std::string,double>> varScaleFactors_;
76
77 std::vector< PHX::MDField<const ScalarT,panzer::Cell,panzer::Point> > scatterFields_;
78 Teuchos::RCP<STK_Interface> mesh_;
79
80 std::vector<VariableField*> stkFields_;
81
82}; // end of class ScatterCellAvgQuantity
83
84
85}
86
87// **************************************************************
88#endif
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
stk::mesh::Field< double > SolutionFieldType
void evaluateFields(typename Traits::EvalData d)
Averages this workset's field values over each cell's integration points and writes the (optionally s...
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
Looks up the STK field pointers needed by evaluateFields(). Called once before the first evaluation.
panzer_stk::STK_Interface::SolutionFieldType VariableField
Teuchos::RCP< std::map< std::string, double > > varScaleFactors_
std::vector< PHX::MDField< const ScalarT, panzer::Cell, panzer::Point > > scatterFields_