Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_CellExtreme.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_CellExtreme_hpp__
12#define __Panzer_CellExtreme_hpp__
13
14#include <string>
15#include "Panzer_Dimension.hpp"
16#include "Phalanx_Evaluator_Macros.hpp"
17#include "Phalanx_MDField.hpp"
18#include "Kokkos_DynRankView.hpp"
19
21
22namespace panzer {
23
39template<typename EvalT, typename Traits>
41 :
42 public panzer::EvaluatorWithBaseImpl<Traits>,
43 public PHX::EvaluatorDerived<EvalT, Traits>
44{
45 public:
46
49 const Teuchos::ParameterList& p);
50
52 void
54 typename Traits::SetupData d,
56
58 void
60 typename Traits::EvalData d);
61
62 private:
63
64 using ScalarT = typename EvalT::ScalarT;
65
66 PHX::MDField<ScalarT> extreme; // result
67
68 PHX::MDField<const ScalarT,Cell,IP> scalar; // function to be integrated
69
70 std::vector<PHX::MDField<const ScalarT,Cell,IP> > field_multipliers;
71 double multiplier;
72
73 std::size_t num_qp;
74 std::size_t quad_index;
76
77 bool use_max; // true ... if false then this is a "min"
78
79public:
80 // for testing purposes
82 const PHX::FieldTag & getFieldTag() const
83 { return extreme.fieldTag(); }
84
85private:
87 Teuchos::RCP<Teuchos::ParameterList> getValidParameters() const;
88
89}; // end of class CellExtreme
90
91
92}
93
94#endif
PHX::MDField< ScalarT > extreme
const PHX::FieldTag & getFieldTag() const
Returns the FieldTag of the extreme-value output field. Used only for unit testing.
Teuchos::RCP< Teuchos::ParameterList > getValidParameters() const
Returns the ParameterList of valid parameters/defaults for this evaluator's constructor.
typename EvalT::ScalarT ScalarT
std::vector< PHX::MDField< const ScalarT, Cell, IP > > field_multipliers
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
Looks up the quadrature index/order needed by evaluateFields(). Called once before the first evaluati...
PHX::MDField< const ScalarT, Cell, IP > scalar
void evaluateFields(typename Traits::EvalData d)
Computes the "Extreme Name" field for this workset per the class description.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
User-defined data passed to PHX::Evaluator::postRegistrationSetup() during the one-time setup phase.