1 #ifndef VERTEXCFD_BOUNDARYSTATE_ADIABATICWALL_IMPL_HPP
2 #define VERTEXCFD_BOUNDARYSTATE_ADIABATICWALL_IMPL_HPP
4 #include <Panzer_HierarchicParallelism.hpp>
10 namespace BoundaryCondition
13 template<
class EvalType,
class Traits>
15 : _boundary_temperature(
"BOUNDARY_temperature", ir.dl_scalar)
16 , _boundary_grad_temperature(
"BOUNDARY_GRAD_temperature", ir.dl_vector)
17 , _temperature(
"temperature", ir.dl_scalar)
18 , _grad_temperature(
"GRAD_temperature", ir.dl_vector)
19 , _normals(
"Side Normal", ir.dl_vector)
26 this->addDependentField(_temperature);
27 this->addDependentField(_grad_temperature);
28 this->addDependentField(_normals);
31 this->setName(
"Boundary State Adiabatic Wall");
35 template<
class EvalType,
class Traits>
37 typename Traits::EvalData workset)
39 auto policy = panzer::HP::inst().teamPolicy<
scalar_type, PHX::Device>(
41 Kokkos::parallel_for(this->getName(), policy, *
this);
45 template<
class EvalType,
class Traits>
47 const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team)
const
49 const int cell = team.league_rank();
50 const int num_point = _boundary_temperature.extent(1);
51 const int num_grad_dim = _boundary_grad_temperature.extent(2);
54 Kokkos::TeamThreadRange(team, 0, num_point), [&](
const int point) {
55 _boundary_temperature(cell, point) = _temperature(cell, point);
57 for (
int d = 0; d < num_grad_dim; ++d)
59 _boundary_grad_temperature(cell, point, d)
60 = _grad_temperature(cell, point, d);
61 for (
int dim = 0; dim < num_grad_dim; ++dim)
63 _boundary_grad_temperature(cell, point, d)
64 -= (_grad_temperature(cell, point, dim)
65 * _normals(cell, point, dim))
66 * _normals(cell, point, d);
77 #endif // VERTEXCFD_BOUNDARYSTATE_ADIABATICWALL_IMPL_HPP