Skip to main content

fem_poisson_2d

Function fem_poisson_2d 

Source
pub fn fem_poisson_2d<K, F, G>(
    mesh: &TriangleMesh,
    k: K,
    f: F,
    g: G,
    dirichlet_nodes: &[usize],
) -> Result<Vec<f64>, ErrorsJSL>
where K: Fn(f64, f64) -> f64, F: Fn(f64, f64) -> f64, G: Fn(f64, f64) -> f64,
Expand description

Solves −∇·(k ∇u) = f on the mesh with u = g at dirichlet_nodes (natural zero-flux conditions elsewhere), returning u at every node.