pub struct FvVectorMatrix {
pub mesh: Arc<FvMesh>,
pub ldu: LduMatrix,
pub source: Field<Vector3>,
}Expand description
Implicit vector equation A·U = b for a VolVectorField.
Mirrors Foam::fvVectorMatrix (fvMatrix<vector>).
The LDU coefficients are scalar — they multiply the entire velocity
vector equally in all three directions. The source vector is a
Field<Vector3>. Solving decomposes into three independent scalar
Gauss-Seidel solves (one per component).
Fields§
§mesh: Arc<FvMesh>§ldu: LduMatrix§source: Field<Vector3>Implementations§
Source§impl FvVectorMatrix
impl FvVectorMatrix
pub fn new(mesh: Arc<FvMesh>) -> Self
pub fn add_to_diag(&mut self, coeff: &Field<f64>)
pub fn add_to_source(&mut self, term: &Field<Vector3>)
Sourcepub fn set_reference(&mut self, cell: usize, value: Vector3)
pub fn set_reference(&mut self, cell: usize, value: Vector3)
Pin one cell’s velocity to a fixed value (reference cell for closed domains).
Sourcepub fn a_field(&self) -> VolScalarField
pub fn a_field(&self) -> VolScalarField
Diagonal coefficient per cell: A[c] = diag[c].
Used in PISO: rAU = 1 / UEqn.a_field().
Sourcepub fn h_field(&self, u: &VolVectorField) -> VolVectorField
pub fn h_field(&self, u: &VolVectorField) -> VolVectorField
Off-diagonal + source residual: H[c] = source[c] − Σ off-diag · U.
For a zero field x this returns source[c] directly.
Used in PISO: HbyA = rAU * UEqn.h_field(U).
Sourcepub fn solve(
&self,
name: &str,
settings: SolverSettings,
) -> (VolVectorField, SolverPerformance)
pub fn solve( &self, name: &str, settings: SolverSettings, ) -> (VolVectorField, SolverPerformance)
Solve each component (x, y, z) as an independent scalar Gauss-Seidel problem.
Trait Implementations§
Source§impl Add for FvVectorMatrix
impl Add for FvVectorMatrix
Source§impl AddAssign for FvVectorMatrix
impl AddAssign for FvVectorMatrix
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for FvVectorMatrix
impl Clone for FvVectorMatrix
Source§fn clone(&self) -> FvVectorMatrix
fn clone(&self) -> FvVectorMatrix
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FvVectorMatrix
impl Debug for FvVectorMatrix
Source§impl Neg for FvVectorMatrix
impl Neg for FvVectorMatrix
Source§impl Sub for FvVectorMatrix
impl Sub for FvVectorMatrix
Source§impl SubAssign for FvVectorMatrix
impl SubAssign for FvVectorMatrix
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreAuto Trait Implementations§
impl Freeze for FvVectorMatrix
impl RefUnwindSafe for FvVectorMatrix
impl Send for FvVectorMatrix
impl Sync for FvVectorMatrix
impl Unpin for FvVectorMatrix
impl UnsafeUnpin for FvVectorMatrix
impl UnwindSafe for FvVectorMatrix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more