|
VertexCFD
0.0-dev
|
Evaluator that adds a volumetric heat source (or sink) to the energy equation for conduction problems. More...
#include <VertexCFD_Closure_ConductionVolumetricSource.hpp>


Public Types | |
| using | scalar_type = typename EvalType::ScalarT |
Public Member Functions | |
| ConductionVolumetricSource (const panzer::IntegrationRule &ir, const Teuchos::ParameterList &closure_params) | |
| Constructor. More... | |
| void | postRegistrationSetup (typename Traits::SetupData sd, PHX::FieldManager< Traits > &fm) override |
| Register fields with the FieldManager after construction. More... | |
| void | evaluateFields (typename Traits::EvalData workset) override |
| Compute the source term at each integration point. More... | |
| KOKKOS_INLINE_FUNCTION void | operator() (const Kokkos::TeamPolicy< PHX::exec_space >::member_type &team) const |
| Kokkos functor for parallel evaluation over teams. More... | |
Public Attributes | |
| PHX::MDField< scalar_type, panzer::Cell, panzer::Point > | _source |
| MDField that holds the evaluated source term. More... | |
Evaluator that adds a volumetric heat source (or sink) to the energy equation for conduction problems.
The source term can be either a constant value or a linear function of the spatial coordinate in the x‑direction. The evaluator is templated on the evaluation type (e.g. Residual, Jacobian) and the Traits class required by the Panzer/Phalanx infrastructure.
The source field is evaluated at each integration point of the supplied integration rule and stored in the MDField _source.
| VertexCFD::ClosureModel::ConductionVolumetricSource< EvalType, Traits >::ConductionVolumetricSource | ( | const panzer::IntegrationRule & | ir, |
| const Teuchos::ParameterList & | closure_params | ||
| ) |
Constructor.
| [in] | ir | Integration rule that defines the cell topology, number of points, and spatial dimension. |
| [in] | closure_params | Parameter list containing the key "Volumetric Heat Source Value" which specifies the magnitude of the source \( q \). |
The constructor extracts the source magnitude from closure_params and initializes internal data structures. No side effects other than member initialization occur.
|
override |
Compute the source term at each integration point.
The source value is either constant (_q) or varies linearly with the x‑coordinate according to the selected HeatSourceType. The result is stored in the MDField _source.
| [in] | workset | Evaluation data containing the current workset information (cell indices, integration points, etc.). |
| KOKKOS_INLINE_FUNCTION void VertexCFD::ClosureModel::ConductionVolumetricSource< EvalType, Traits >::operator() | ( | const Kokkos::TeamPolicy< PHX::exec_space >::member_type & | team | ) | const |
Kokkos functor for parallel evaluation over teams.
This operator is invoked by a Kokkos TeamPolicy to evaluate the source term in parallel. The implementation mirrors evaluateFields but is expressed in a thread‑safe manner.
| [in] | team | Team member provided by Kokkos. |
|
override |
Register fields with the FieldManager after construction.
This method is called by the Panzer infrastructure during the post‑registration phase. It binds the MDField _source to the appropriate data layout and records any dependencies.
| [in] | sd | Field manager setup data. |
| [in] | fm | Reference to the FieldManager. |
| PHX::MDField<scalar_type, panzer::Cell, panzer::Point> VertexCFD::ClosureModel::ConductionVolumetricSource< EvalType, Traits >::_source |
MDField that holds the evaluated source term.
The field has layout <Cell,Point> and type scalar_type. It is populated during evaluateFields (or the Kokkos functor) and can be accessed by downstream evaluators.