Skip to content

Instantly share code, notes, and snippets.

View oscmansan's full-sized avatar
🎯
Focusing

Oscar Mañas oscmansan

🎯
Focusing
  • Montréal
View GitHub Profile
function [u] = sol_Laplace_Equation_Axb(f, dom2Inp, param)
%this code is not intended to be efficient.
[ni, nj] = size(f);
%We add the ghost boundaries (for the boundary conditions)
f_ext = zeros(ni+2, nj+2);
f_ext(2:end-1, 2:end-1) = f;
dom2Inp_ext = zeros(ni+2, nj+2);
dom2Inp_ext (2:end-1, 2:end-1) = dom2Inp;