Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_Integrator_Scalar_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_EVALUATOR_SCALAR_DECL_HPP
12#define PANZER_EVALUATOR_SCALAR_DECL_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
37template<typename EvalT, typename Traits>
39 :
40 public panzer::EvaluatorWithBaseImpl<Traits>,
41 public PHX::EvaluatorDerived<EvalT, Traits>
42{
43 public:
44
47 const Teuchos::ParameterList& p);
48
50 void
52 typename Traits::SetupData d,
54
56 void
58 typename Traits::EvalData d);
59
60 private:
61
62 using ScalarT = typename EvalT::ScalarT;
63
64 PHX::MDField<ScalarT> integral; // result
65
66 PHX::MDField<const ScalarT,Cell,IP> scalar; // function to be integrated
67
68 typename PHX::View<PHX::UnmanagedView<const ScalarT**>* >::host_mirror_type field_multipliers_h;
69 PHX::View<PHX::UnmanagedView<const ScalarT**>* > field_multipliers;
70
71 std::size_t num_qp;
72 std::size_t quad_index;
74
75 double multiplier;
76
77 Kokkos::DynRankView<ScalarT,typename PHX::DevLayout<ScalarT>::type,PHX::Device> tmp;
78
79public:
80 // for testing purposes
82 const PHX::FieldTag & getFieldTag() const
83 { return integral.fieldTag(); }
84
85private:
87 Teuchos::RCP<Teuchos::ParameterList> getValidParameters() const;
88
89}; // end of class Integrator_Scalar
90
91
92}
93
94#endif
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
const PHX::FieldTag & getFieldTag() const
Returns the FieldTag of the integral output field. For testing purposes.
PHX::MDField< const ScalarT, Cell, IP > scalar
PHX::View< PHX::UnmanagedView< constScalarT ** > * >::host_mirror_type field_multipliers_h
Teuchos::RCP< Teuchos::ParameterList > getValidParameters() const
Returns the ParameterList of valid parameters/defaults for this evaluator's constructor.
PHX::View< PHX::UnmanagedView< const ScalarT ** > * > field_multipliers
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
Looks up the quadrature index/order and integration weights needed by evaluateFields()....
Kokkos::DynRankView< ScalarT, typename PHX::DevLayout< ScalarT >::type, PHX::Device > tmp
void evaluateFields(typename Traits::EvalData d)
Computes the "Integral Name" field for this workset per the class description.
User-defined data passed to PHX::Evaluator::postRegistrationSetup() during the one-time setup phase.