Module block_tensor

Module block_tensor 

Source
Expand description

Block tensor type for GMRES with block matrices.

This module provides BlockTensor, a collection of tensors organized in a block structure. It implements TensorLike for the vector space operations required by GMRES, allowing block matrix linear equations Ax = b to be solved using the existing GMRES implementation.

§Example

use tensor4all_core::block_tensor::BlockTensor;
use tensor4all_core::krylov::{gmres, GmresOptions};

// Create 2x1 block vectors
let b = BlockTensor::new(vec![b1, b2], (2, 1));
let x0 = BlockTensor::new(vec![zero1, zero2], (2, 1));

// Define block matrix operator
let apply_a = |x: &BlockTensor<T>| { /* ... */ };

let result = gmres(apply_a, &b, &x0, &GmresOptions::default())?;

Structs§

BlockTensor
A collection of tensors organized in a block structure.