Loading...
Searching...
No Matches
terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim > Class Template Reference

Matrix-free Galerkin rate operator for the unsteady advection-diffusion equation. More...

#include <centered_rk2_advection_diffusion.hpp>

Public Types

using SrcVectorType = linalg::VectorQ1Scalar< ScalarT >
 
using DstVectorType = linalg::VectorQ1Scalar< ScalarT >
 
using ScalarType = ScalarT
 

Public Member Functions

 Q1CenteredAdvDiffRateOperator (const grid::shell::DistributedDomain &domain, const grid::Grid3DDataVec< ScalarT, 3 > &grid, const grid::Grid2DDataScalar< ScalarT > &radii, const linalg::VectorQ1Vec< ScalarT, VelocityVecDim > &velocity, const ScalarT diffusivity, linalg::OperatorApplyMode operator_apply_mode=linalg::OperatorApplyMode::Replace, linalg::OperatorCommunicationMode operator_communication_mode=linalg::OperatorCommunicationMode::CommunicateAdditively)
 
ScalarT & diffusivity ()
 
const ScalarT & diffusivity () const
 
void apply_impl (const SrcVectorType &src, DstVectorType &dst)
 
void operator() (const int local_subdomain_id, const int x_cell, const int y_cell, const int r_cell) const
 

Detailed Description

template<typename ScalarT, int VelocityVecDim = 3>
class terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >

Matrix-free Galerkin rate operator for the unsteady advection-diffusion equation.

Computes

\[ \mathrm{dst} = -\bigl( K_\text{adv} + K_\text{diff} \bigr)\,\mathrm{src} = -\!\!\int_\Omega \phi_i \,(\mathbf{u}\!\cdot\!\nabla\phi_j)\,\mathrm{d}x \,T_j -\!\!\int_\Omega \kappa\,\nabla\phi_i\!\cdot\!\nabla\phi_j\,\mathrm{d}x \,T_j . \]

In the lumped-mass time-stepping picture this is the (assembled, additively reduced) right-hand side of \( M_\text{lumped}\,\dot{T} = -K T + F \) from which the actual nodal rate \(\dot{T}_i\) is recovered by pointwise division by the lumped mass diagonal.

This is the central building block of the explicit centred Runge-Kutta-2 energy integrator that mirrors TERRA's advect/advance pair (TERRA-group/src/code/energy.f:6-181 and convct.F:207-244). Unlike UnsteadyAdvectionDiffusionSUPG, there is no SUPG stabilisation, no mass term in the bilinear form, no time-step or Dirichlet row treatment in the kernel, and no lumping flag — the operator is purely the stiffness contribution \(K\) with the leading minus sign baked in. Boundary conditions are handled outside, by overwriting Dirichlet nodes after each RK substage, matching TERRA's strategy of zeroing dhdt at top/bottom rows.

The advection term uses the centred Galerkin form \(\int \phi_i (\mathbf{u}\cdot\nabla\phi_j)\) — no upwinding, no limiter. This is the Q1 analogue of TERRA's face-centred update \(\tfrac{1}{2}(T_i + T_j)\cdot\mathbf{u}\!\cdot\!\mathbf{n}\) at energy.f:73.

Member Typedef Documentation

◆ DstVectorType

template<typename ScalarT , int VelocityVecDim = 3>
using terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >::DstVectorType = linalg::VectorQ1Scalar< ScalarT >

◆ ScalarType

template<typename ScalarT , int VelocityVecDim = 3>
using terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >::ScalarType = ScalarT

◆ SrcVectorType

template<typename ScalarT , int VelocityVecDim = 3>
using terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >::SrcVectorType = linalg::VectorQ1Scalar< ScalarT >

Constructor & Destructor Documentation

◆ Q1CenteredAdvDiffRateOperator()

template<typename ScalarT , int VelocityVecDim = 3>
terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >::Q1CenteredAdvDiffRateOperator ( const grid::shell::DistributedDomain domain,
const grid::Grid3DDataVec< ScalarT, 3 > &  grid,
const grid::Grid2DDataScalar< ScalarT > &  radii,
const linalg::VectorQ1Vec< ScalarT, VelocityVecDim > &  velocity,
const ScalarT  diffusivity,
linalg::OperatorApplyMode  operator_apply_mode = linalg::OperatorApplyMode::Replace,
linalg::OperatorCommunicationMode  operator_communication_mode = linalg::OperatorCommunicationMode::CommunicateAdditively 
)
inline

Member Function Documentation

◆ apply_impl()

template<typename ScalarT , int VelocityVecDim = 3>
void terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >::apply_impl ( const SrcVectorType src,
DstVectorType dst 
)
inline

◆ diffusivity() [1/2]

template<typename ScalarT , int VelocityVecDim = 3>
ScalarT & terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >::diffusivity ( )
inline

◆ diffusivity() [2/2]

template<typename ScalarT , int VelocityVecDim = 3>
const ScalarT & terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >::diffusivity ( ) const
inline

◆ operator()()

template<typename ScalarT , int VelocityVecDim = 3>
void terra::fe::wedge::operators::shell::Q1CenteredAdvDiffRateOperator< ScalarT, VelocityVecDim >::operator() ( const int  local_subdomain_id,
const int  x_cell,
const int  y_cell,
const int  r_cell 
) const
inline

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