Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_ResponseScatterEvaluator_ExtremeValue.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_ResponseScatterEvaluator_ExtremeValue_hpp__
12 #define __Panzer_ResponseScatterEvaluator_ExtremeValue_hpp__
13 
14 #include <iostream>
15 #include <string>
16 
17 #include "PanzerDiscFE_config.hpp"
18 #include "Panzer_Dimension.hpp"
19 #include "Panzer_CellData.hpp"
21 #include "Panzer_GlobalIndexer.hpp"
22 
23 #include "Phalanx_Evaluator_Macros.hpp"
24 #include "Phalanx_MDField.hpp"
25 
27 
28 namespace panzer {
29 
31 public:
33 
35  panzer::Traits::EvalData workset,
37  Teuchos::ArrayRCP<double> & dgdx) const = 0;
38 };
39 
40 template <typename LO,typename GO>
42 public:
44  : globalIndexer_(globalIndexer) { }
45 
47  panzer::Traits::EvalData workset,
49  Teuchos::ArrayRCP<double> & dgdx) const;
50 private:
51 
53 };
54 
58 template<typename EvalT, typename Traits>
60  public PHX::EvaluatorDerived<EvalT, Traits> {
61 public:
62 
64  ResponseScatterEvaluator_ExtremeValue(const std::string & name,const CellData & cd,
65  bool useMax,
66  const Teuchos::RCP<ExtremeValueScatterBase> & functionalScatter);
67  ResponseScatterEvaluator_ExtremeValue(const std::string & extremeName,const std::string & responseName,const CellData & cd,
68  bool useMax,
69  const Teuchos::RCP<ExtremeValueScatterBase> & functionalScatter);
70 
71  void evaluateFields(typename Traits::EvalData d);
72 
73  void preEvaluate(typename Traits::PreEvalData d);
74 
75 private:
76  typedef typename EvalT::ScalarT ScalarT;
77 
78  std::string responseName_;
80 
84  bool useMax_;
85 };
86 
87 template <typename LO,typename GO>
90  panzer::Traits::EvalData /* workset */,
91  WorksetDetailsAccessor& /* wda */,
92  Teuchos::ArrayRCP<double> & /* dgdx */) const
93 {
94  TEUCHOS_ASSERT(false);
95 }
96 
97 }
98 
99 #endif
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
void scatterDerivative(const PHX::MDField< const panzer::Traits::Jacobian::ScalarT, panzer::Cell > &cellExtremeValue, panzer::Traits::EvalData workset, WorksetDetailsAccessor &wda, Teuchos::ArrayRCP< double > &dgdx) const
ResponseScatterEvaluator_ExtremeValue(const std::string &name, const CellData &cd, bool useMax, const Teuchos::RCP< ExtremeValueScatterBase > &functionalScatter)
A constructor with concrete arguments instead of a parameter list.
Data for determining cell topology and dimensionality.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
virtual void scatterDerivative(const PHX::MDField< const panzer::Traits::Jacobian::ScalarT, panzer::Cell > &cellExtremeValue, panzer::Traits::EvalData workset, WorksetDetailsAccessor &wda, Teuchos::ArrayRCP< double > &dgdx) const =0
ExtremeValueScatter(const Teuchos::RCP< const panzer::GlobalIndexer > &globalIndexer)
#define TEUCHOS_ASSERT(assertion_test)