Trait electro::fem::FiniteElementMethod
[−]
[src]
pub trait FiniteElementMethod<T, U> where
T: NumCast + Float + Any,
U: Float, { fn generate_elements(&self) -> Vec<TriEl<T, U>>; fn global_coef_matrix(&self) -> Matrix<T>; fn calc_potentials(&self) -> Vec<T>; }
Finite element method functions. Limited to triangular elements at the moment.
Required Methods
fn generate_elements(&self) -> Vec<TriEl<T, U>>
Computes the triangular elements from the points provided. Elements are roughly ordered from left to right by adjacent pairs. Thus, in two rows of points on a grid, there will be twice as many elements as there are points in a row.
fn global_coef_matrix(&self) -> Matrix<T>
Assembles the global coefficient matrix from the element equations and coefficient vectors.
fn calc_potentials(&self) -> Vec<T>
Iteratively calculates the potentials until convergence. Assumes potentials at 0 are floating (but perhaps should not?)