Linear form for the TALA/PDA compressibility term in compressible Stokes. More...
#include <inv_rho_grad_rho_dot_u.hpp>
Public Types | |
| using | DstVectorType = linalg::VectorQ1Scalar< ScalarT > |
| using | ScalarType = ScalarT |
Public Member Functions | |
| InvRhoGradRhoDotU (const grid::shell::DistributedDomain &domain, const grid::Grid3DDataVec< ScalarT, 3 > &grid, const grid::Grid2DDataScalar< ScalarT > &radii, const linalg::VectorQ1Scalar< ScalarT > &rho, const linalg::VectorQ1Vec< ScalarT, VelocityVecDim > &velocity, 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} \nabla\rho \cdot \mathbf{u} \, \phi_i \, \mathrm{d}x \). | |
Linear form for the TALA/PDA compressibility term in compressible Stokes.
Given a scalar FE function \(\rho\) (density) and a vectorial FE function \(\mathbf{u}\) (velocity), this linear form evaluates
\[ f_i = \int_\Omega \frac{1}{\rho} \nabla\rho \cdot \mathbf{u} \, \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 term arises in the pressure equation of the Truncated Anelastic Liquid Approximation (TALA) and the Projected Density Approximation (PDA) for compressible Stokes flow in geodynamics. 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}\nabla\rho\cdot\mathbf{u}\) 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::InvRhoGradRhoDotU< ScalarT, VelocityVecDim >::DstVectorType = linalg::VectorQ1Scalar< ScalarT > |
| using terra::fe::wedge::linearforms::shell::InvRhoGradRhoDotU< ScalarT, VelocityVecDim >::ScalarType = ScalarT |
|
inline |
|
inline |
|
inline |
Kokkos kernel: per-cell contribution to \( f_i = \int_E \frac{1}{\rho} \nabla\rho \cdot \mathbf{u} \, \phi_i \, \mathrm{d}x \).