1 function [W,rate]=femwind_solve(A,X,U0,params)
2 % assemble sparse system matrix
4 lambda = zeros(prod(nel+1),1); % placeholder solution
5 [K,F,~] = sparse_assembly(A,X,U0,lambda,params);
7 % dirichlet boundary conditions
8 [K,~]=apply_boundary_conditions(K,[],X); % to K - once
9 [~,F]=apply_boundary_conditions([],F,X); % to F - every time
12 % [lambda,it] = sparse_solve(K,F,X,'s');
13 [lambda,it,rate,XC] = sparse_solve(K,F,X,params);
18 [~,~,W] = sparse_assembly(A,X,U0,lambda,params);