Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_STK_ScatterFields_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_ScatterFields_decl_HPP__
12#define __PANZER_STK_ScatterFields_decl_HPP__
13
14#include "Phalanx_config.hpp"
15#include "Phalanx_MDField.hpp"
16#include "Phalanx_Evaluator_WithBaseImpl.hpp"
17#include "Phalanx_Evaluator_Derived.hpp"
18#include "Phalanx_FieldManager.hpp"
19
20#include "Teuchos_ParameterList.hpp"
21
22#include "Panzer_Dimension.hpp"
23#include "Panzer_Traits.hpp"
25
27
28namespace panzer_stk {
29
36template <typename EvalT,typename TraitsT>
38 public PHX::EvaluatorDerived<EvalT, TraitsT> {
39 typedef typename EvalT::ScalarT ScalarT;
41
42 std::vector< PHX::MDField<const ScalarT,panzer::Cell,panzer::NODE> > scatterFields_;
43 Teuchos::RCP<STK_Interface> mesh_;
44
45 std::vector<double> scaling_;
46
48
57 void initialize(const std::string & scatterName,
58 const Teuchos::RCP<STK_Interface> mesh,
59 const Teuchos::RCP<const panzer::PureBasis> & basis,
60 const std::vector<std::string> & names,
61 const std::vector<double> & scaling);
62
63public:
64
72 ScatterFields(const std::string & scatterName,
73 const Teuchos::RCP<STK_Interface> mesh,
74 const Teuchos::RCP<const panzer::PureBasis> & basis,
75 const std::vector<std::string> & names);
76
85 ScatterFields(const std::string & scatterName,
86 const Teuchos::RCP<STK_Interface> mesh,
87 const Teuchos::RCP<const panzer::PureBasis> & basis,
88 const std::vector<std::string> & names,
89 const std::vector<double> & scaling);
90
92 void postRegistrationSetup(typename TraitsT::SetupData d,
94
96 void evaluateFields(typename TraitsT::EvalData d);
97};
98
99}
100
101// **************************************************************
102#endif
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
stk::mesh::Field< double > SolutionFieldType
std::vector< PHX::MDField< const ScalarT, panzer::Cell, panzer::NODE > > scatterFields_
void initialize(const std::string &scatterName, const Teuchos::RCP< STK_Interface > mesh, const Teuchos::RCP< const panzer::PureBasis > &basis, const std::vector< std::string > &names, const std::vector< double > &scaling)
Shared setup logic for both constructors: sets up dependent fields and per-field scaling.
void evaluateFields(typename TraitsT::EvalData d)
Writes this workset's (scaled) field values to the STK mesh per the class description.
Teuchos::RCP< STK_Interface > mesh_
void postRegistrationSetup(typename TraitsT::SetupData d, PHX::FieldManager< TraitsT > &fm)
Looks up the STK field pointers needed by evaluateFields(). Called once before the first evaluation.
panzer_stk::STK_Interface::SolutionFieldType VariableField