Loading...
Searching...
No Matches
terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT > Class Template Reference

#include <advection_diffusion.hpp>

Public Types

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

Public Member Functions

 UnsteadyAdvectionDiffusion (const grid::shell::DistributedDomain &domain, const grid::Grid3DDataVec< ScalarT, 3 > &grid, const grid::Grid2DDataScalar< ScalarT > &radii, const grid::Grid4DDataVec< ScalarT, 3 > &cell_centers, const grid::Grid4DDataScalar< grid::shell::ShellBoundaryFlag > &boundary_mask, const linalg::VectorQ1Vec< ScalarT, num_velocity_components > &velocity, const ScalarT diffusivity, const ScalarT dt, const bool subtract_divergence=true)
 
ScalarT & dt ()
 
const ScalarT & dt () const
 
void compute_rhs (const SrcVectorType &T_old, DstVectorType &rhs, const grid::Grid4DDataScalar< ScalarT > &source={})
 Compute the implicit-step right-hand side \(b = M\,T^n + \Delta t\,M\,f\).
 
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
 

Member Typedef Documentation

◆ DstVectorType

template<typename ScalarT >
using terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::DstVectorType = linalg::VectorFVScalar< ScalarT >

◆ ScalarType

template<typename ScalarT >
using terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::ScalarType = ScalarT

◆ SrcVectorType

template<typename ScalarT >
using terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::SrcVectorType = linalg::VectorFVScalar< ScalarT >

Constructor & Destructor Documentation

◆ UnsteadyAdvectionDiffusion()

template<typename ScalarT >
terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::UnsteadyAdvectionDiffusion ( const grid::shell::DistributedDomain domain,
const grid::Grid3DDataVec< ScalarT, 3 > &  grid,
const grid::Grid2DDataScalar< ScalarT > &  radii,
const grid::Grid4DDataVec< ScalarT, 3 > &  cell_centers,
const grid::Grid4DDataScalar< grid::shell::ShellBoundaryFlag > &  boundary_mask,
const linalg::VectorQ1Vec< ScalarT, num_velocity_components > &  velocity,
const ScalarT  diffusivity,
const ScalarT  dt,
const bool  subtract_divergence = true 
)
inline

Member Function Documentation

◆ apply_impl()

template<typename ScalarT >
void terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::apply_impl ( const SrcVectorType src,
DstVectorType dst 
)
inline

◆ compute_rhs()

template<typename ScalarT >
void terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::compute_rhs ( const SrcVectorType T_old,
DstVectorType rhs,
const grid::Grid4DDataScalar< ScalarT > &  source = {} 
)
inline

Compute the implicit-step right-hand side \(b = M\,T^n + \Delta t\,M\,f\).

For the semi-implicit FCT loop the linear system to solve is \((M + \Delta t\,A)\,T^L = M\,T^n\) (no source), or \((M + \Delta t\,A)\,T^L = M\,T^n + \Delta t\,M\,f\) with a source term. This method forms the right-hand side using the same Felippa 3×2 quadrature as Mass::apply_impl, so no separate Mass operator is needed when a source is present.

Parameters
T_oldCurrent scalar field \(T^n\).
rhs[out] Receives \(M\,T^n\) (or \(M\,T^n + \Delta t\,M\,f\)).
sourceOptional volumetric source term \(f\) [T/time] (default: none).

◆ dt() [1/2]

template<typename ScalarT >
ScalarT & terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::dt ( )
inline

◆ dt() [2/2]

template<typename ScalarT >
const ScalarT & terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::dt ( ) const
inline

◆ operator()()

template<typename ScalarT >
void terra::fv::hex::operators::UnsteadyAdvectionDiffusion< ScalarT >::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: