.claude/skills/chebop-eigenvalue-problems/SKILL.md
Compute eigenvalues and eigenfunctions for linear differential operators, integral operators, and generalized eigenvalue systems using the overloaded eigs command. Handle systems of coupled ODEs using block operators. Use when solving spectral problems for differential equations, finding eigenmodes of operators, or working with coupled variable systems.
npx skillsauth add ShaneLogic/SolarLab chebop-eigenvalue-problemsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Compute eigenvalues and eigenfunctions for linear operators.
[V, D] = eigs(L, k)
% Define operator: u'' = λu
L = chebop(-1, 1);
L.op = @(x,u) diff(u, 2);
L.bc = 'dirichlet'; % u(-1)=u(1)=0
% Compute 6 eigenvalues
[V, D] = eigs(L, 6);
% Plot eigenfunctions
plot(V)
legend('Mode 1', 'Mode 2', 'Mode 3', 'Mode 4', 'Mode 5', 'Mode 6')
Solve Au = λBu for two operators.
% Define two linear chebops
A = chebop(-1, 1);
B = chebop(-1, 1);
% Attach ALL boundary conditions to operator A
A.op = @(x,u) diff(u, 2);
A.bc = 'dirichlet';
B.op = @(x,u) u;
% B has no boundary conditions
% Compute generalized eigenvalues
[V, D] = eigs(A, B, k);
Attach all boundary conditions to operator A, not B.
L = chebop(-pi, pi);
L.op = @(x,u) diff(u, 2);
L.bc = 'periodic'; % Set periodic boundary conditions
[V, D] = eigs(L, k);
Handle coupled variables using block operators.
% System: u' = v, v' = -u
L = chebop(0, 2*pi);
% Define operator acting on [u; v]
L.op = @(x, u, v) [diff(u) - v; diff(v) + u];
% Boundary conditions
L.lbc = @(u, v) [u - 1; v]; % u(0)=1, v(0)=0
% Solve boundary value problem
U = L \ 0;
% Extract individual variables
u = U(:,1);
v = U(:,2);
% Plot both variables
plot(U)
legend('u', 'v')
% Define block operator for eigenvalue problem
L = chebop(0, 2*pi);
L.op = @(x, u, v) [diff(u) - v; diff(v) + u];
L.bc = 'periodic';
% Compute eigenvalues
[V, D] = eigs(L, k);
% V is quasimatrix with 2 columns per eigenmode
% First column: u component
% Second column: v component
% Visualize operator structure
spy(L)
% Shows global vs local dependencies in the operator
development
Understand and comply with Driftfusion software licensing terms, including the open-source AGPL v3.0 frontend and proprietary MATLAB pdepe solver backend. Use when using, modifying, or distributing Driftfusion code.
development
Initialize the Driftfusion simulation environment and create parameter objects. Use this skill when starting a new MATLAB session or setting up device properties for simulation.
development
Define device layer structure, configure spatial and time meshes, and build device structures with interface grading. Use this skill when setting up the physical geometry and discretization of a simulation device.
research
Analyze simulation solutions, calculate physical quantities, and generate plots. Use this skill when processing completed simulations, extracting currents/densities, or visualizing results.