Linear form for the PDA temporal compressibility term in compressible Stokes. More...
#include <inv_rho_drho_dt.hpp>
Public Types | |
| using | DstVectorType = linalg::VectorQ1Scalar< ScalarT > |
| using | ScalarType = ScalarT |
Public Member Functions | |
| InvRhoDrhoDt (const grid::shell::DistributedDomain &domain, const grid::Grid3DDataVec< ScalarT, 3 > &grid, const grid::Grid2DDataScalar< ScalarT > &radii, const linalg::VectorQ1Scalar< ScalarT > &rho, const linalg::VectorQ1Scalar< ScalarT > &drho_dt, const linalg::OperatorApplyMode operator_apply_mode=linalg::OperatorApplyMode::Replace, const linalg::OperatorCommunicationMode operator_communication_mode=linalg::OperatorCommunicationMode::CommunicateAdditively) | |
| void | apply_impl (DstVectorType &dst) |
| void | operator() (const int local_subdomain_id, const int x_cell, const int y_cell, const int r_cell) const |
| Kokkos kernel: per-cell contribution to \( f_i = \int_E \frac{1}{\rho} \dot\rho \, \phi_i \, \mathrm{d}x \). | |
Linear form for the PDA temporal compressibility term in compressible Stokes.
Given scalar FE functions \(\rho\) (density) and \(\dot\rho\) (its previously computed time derivative), this linear form evaluates
\[ f_i = \int_\Omega \frac{1}{\rho} \dot\rho \, \phi_i \, \mathrm{d}x \]
into a scalar finite element coefficient vector, where \(\phi_i\) are the scalar Q1 test functions on the spherical shell mesh.
This is the temporal part of the right-hand side of the mass conservation equation in the Projected Density Approximation (PDA) for compressible Stokes flow. The time derivative \(\dot\rho\) is expected to be pre-computed (e.g. via a first- or second-order BDF scheme) and stored as a scalar FE coefficient vector before calling apply. See the Stokes documentation for the full context.
Divergence block computes \(-(q, \mathrm{div}\, u)\), so the mass conservation equation \(-(q, \mathrm{div}\, u) = f_p\) requires \(f_p = +\frac{1}{\rho}\dot\rho\) term (positive sign).Concept. This class satisfies terra::linalg::LinearFormLike. Evaluation writes the assembled coefficient vector into dst via linalg::apply:
The default OperatorApplyMode::Replace zeroes dst before accumulation. Pass OperatorApplyMode::Add to add into an existing vector instead.
| using terra::fe::wedge::linearforms::shell::InvRhoDrhoDt< ScalarT >::DstVectorType = linalg::VectorQ1Scalar< ScalarT > |
| using terra::fe::wedge::linearforms::shell::InvRhoDrhoDt< ScalarT >::ScalarType = ScalarT |
|
inline |
|
inline |
|
inline |
Kokkos kernel: per-cell contribution to \( f_i = \int_E \frac{1}{\rho} \dot\rho \, \phi_i \, \mathrm{d}x \).