Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_ScalarToVector_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_TO_VECTOR_DECL_HPP
12#define PANZER_EVALUATOR_SCALAR_TO_VECTOR_DECL_HPP
13
14#include <vector>
15#include "Phalanx_Evaluator_WithBaseImpl.hpp"
17#include "Phalanx_MDField.hpp"
18#include "Phalanx_KokkosViewOfViews.hpp"
19
20namespace panzer {
21
23template<typename EvalT, typename Traits>
25{
26public:
27 using ScalarT = typename EvalT::ScalarT;
28
29 ScalarToVector(const Teuchos::ParameterList& p);
30
31 ScalarToVector(const std::vector<PHX::Tag<ScalarT>> & input,
32 const PHX::FieldTag & output);
33
36
37 void evaluateFields(typename Traits::EvalData d);
38
39private:
40
41 PHX::MDField<ScalarT,Cell,Point,Dim> vector_field_;
42 std::vector<PHX::MDField<const ScalarT,Cell,Point>> scalar_fields_;
43 using InnerView = typename PHX::MDField<const ScalarT,Cell,Point>::array_type;
44 PHX::ViewOfViews<1,InnerView> scalar_fields_vov_;
45};
46
47}
48
49#endif
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Copies a set of scalar fields into a single vector field.
typename PHX::MDField< const ScalarT, Cell, Point >::array_type InnerView
void evaluateFields(typename Traits::EvalData d)
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
PHX::ViewOfViews< 1, InnerView > scalar_fields_vov_
PHX::MDField< ScalarT, Cell, Point, Dim > vector_field_
std::vector< PHX::MDField< const ScalarT, Cell, Point > > scalar_fields_