pub struct DiffussionSolverTimeDependent {
    pub boundary_conditions: [f64; 2],
    pub(crate) stiffness_matrix: Array2<f64>,
    pub initial_conditions: Vec<f64>,
    pub(crate) mass_matrix: Array2<f64>,
    pub integration_step: usize,
    pub(crate) state: Array1<f64>,
    pub mu: f64,
    pub b: f64,
}
Expand description

General Information

A diffusion solver with time-dependence abstracts the equation: “u_t - μu_xx + bu_x = 0” and contains boundary conditions, initial conditions, mesh, “stiffness_matrix” and “μ”.

Fields

  • boundary_conditions - Boundary conditions (Only dirichlet is supported for now, Neumann is being worked on)
  • stiffness_matrix - Matrix of elements that is multiplied by time
  • initial_conditions - Every internal point needs an initial condition to advance the solution in time
  • mass_matrix - A matrix that pertains only to elements that are not multiplied by time
  • integration_step - Amount of terms to sum over to make the integral
  • state - The state of every point at time t
  • mu - First ot two needed constants
  • b - Second of two needed constants

Fields§

§boundary_conditions: [f64; 2]§stiffness_matrix: Array2<f64>§initial_conditions: Vec<f64>§mass_matrix: Array2<f64>§integration_step: usize§state: Array1<f64>§mu: f64§b: f64

Implementations§

Creates new instance checking initial conditions are the size they should be.

General Information

Compĺete integration of linear basis to obtain mass matrix and stiffness matrix. Corners of every element have special values to attone for boundary conditions being constant. Matrices serve to solve the resulting problem: M(u_ti+1) = M(u_ti) + S(delta_t * u_ti) where M is mass matrix and S is stiffness matrix.

Parameters
  • mu - First of two terms to solve equation
  • b - Second of two terms to solve equation
  • mesh - Vector of f64 representing a mesh
  • gauss_step - Amount of nodes to compute for integration.

Trait Implementations§

Formats the value using the given formatter. Read more
Specific implementation

Calculate a vector b on left-side of equation. Then solve problem Ax = b for x.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.