VertexCFD  0.0-dev
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
VertexCFD::ClosureModel::ConductionErrorNorms< EvalType, Traits, NumSpaceDim > Class Template Reference

Compute error norms between exact and numerical conduction solutions. More...

#include <VertexCFD_Closure_ConductionErrorNorms.hpp>

Inheritance diagram for VertexCFD::ClosureModel::ConductionErrorNorms< EvalType, Traits, NumSpaceDim >:
Inheritance graph
[legend]
Collaboration diagram for VertexCFD::ClosureModel::ConductionErrorNorms< EvalType, Traits, NumSpaceDim >:
Collaboration graph
[legend]

Public Types

using scalar_type = typename EvalType::ScalarT
 Alias for the scalar type used by the evaluation type.
 

Public Member Functions

 ConductionErrorNorms (const panzer::IntegrationRule &ir)
 Constructor. More...
 
void evaluateFields (typename Traits::EvalData workset) override
 Evaluate the error norm fields over the workset. More...
 
KOKKOS_INLINE_FUNCTION void operator() (const Kokkos::TeamPolicy< PHX::exec_space >::member_type &team) const
 Kokkos functor invoked for each team of threads. More...
 

Public Attributes

PHX::MDField< scalar_type, panzer::Cell, panzer::Point > _L1_error_continuity
 L1 error of the continuity equation (scalar field).
 
Kokkos::Array< PHX::MDField< scalar_type, panzer::Cell, panzer::Point >, num_space_dim_L1_error_momentum
 L1 error of the momentum equations (vector field). More...
 
PHX::MDField< scalar_type, panzer::Cell, panzer::Point > _L1_error_energy
 L1 error of the energy equation (scalar field).
 
PHX::MDField< scalar_type, panzer::Cell, panzer::Point > _L2_error_continuity
 L2 error of the continuity equation (scalar field).
 
Kokkos::Array< PHX::MDField< scalar_type, panzer::Cell, panzer::Point >, num_space_dim_L2_error_momentum
 L2 error of the momentum equations (vector field).
 
PHX::MDField< scalar_type, panzer::Cell, panzer::Point > _L2_error_energy
 L2 error of the energy equation (scalar field).
 
PHX::MDField< scalar_type, panzer::Cell, panzer::Point > _volume
 Cell volume at each integration point (used for weighting).
 

Static Public Attributes

static constexpr int num_space_dim = NumSpaceDim
 Number of spatial dimensions (compile‑time constant).
 

Detailed Description

template<class EvalType, class Traits, int NumSpaceDim>
class VertexCFD::ClosureModel::ConductionErrorNorms< EvalType, Traits, NumSpaceDim >

Compute error norms between exact and numerical conduction solutions.

This evaluator computes the L1 and L2 error norms for the continuity, momentum, and energy equations of a conduction problem. The errors are evaluated at each integration point of the workset and stored in MDFields that can be inspected by downstream diagnostics or unit tests.

Template Parameters
EvalTypeType providing the scalar type (e.g., Residual, Jacobian).
TraitsPHX traits class defining the evaluation data type.
NumSpaceDimSpatial dimension of the problem (e.g., 2 or 3).

Constructor & Destructor Documentation

◆ ConductionErrorNorms()

template<class EvalType , class Traits , int NumSpaceDim>
VertexCFD::ClosureModel::ConductionErrorNorms< EvalType, Traits, NumSpaceDim >::ConductionErrorNorms ( const panzer::IntegrationRule &  ir)

Constructor.

Registers the fields that will be evaluated and the dependent fields required for the error computation.

Parameters
[in]irIntegration rule providing the data layout for fields.

Member Function Documentation

◆ evaluateFields()

template<class EvalType , class Traits , int NumSpaceDim>
void VertexCFD::ClosureModel::ConductionErrorNorms< EvalType, Traits, NumSpaceDim >::evaluateFields ( typename Traits::EvalData  workset)
override

Evaluate the error norm fields over the workset.

This method is called by the PHX framework during the evaluation phase. It launches a Kokkos parallel kernel that computes the L1 and L2 errors for each cell, integration point, and spatial component.

Parameters
[in]worksetEvaluation data containing cell topology and integration point information.

◆ operator()()

template<class EvalType , class Traits , int NumSpaceDim>
KOKKOS_INLINE_FUNCTION void VertexCFD::ClosureModel::ConductionErrorNorms< EvalType, Traits, NumSpaceDim >::operator() ( const Kokkos::TeamPolicy< PHX::exec_space >::member_type &  team) const

Kokkos functor invoked for each team of threads.

The implementation performs the actual error norm calculations.

Parameters
[in]teamTeam policy member representing a group of threads.

Member Data Documentation

◆ _L1_error_momentum

template<class EvalType , class Traits , int NumSpaceDim>
Kokkos::Array<PHX::MDField<scalar_type, panzer::Cell, panzer::Point>, num_space_dim> VertexCFD::ClosureModel::ConductionErrorNorms< EvalType, Traits, NumSpaceDim >::_L1_error_momentum

L1 error of the momentum equations (vector field).

The array size equals the spatial dimension; each entry stores the error component for one coordinate direction.


The documentation for this class was generated from the following files: