No BSD License
-
Jburgers(t,u,epsilon,Dx,Dy,Dx...
Jacobian of 2D Burgers' Equation
-
burgers(t,u,epsilon,Dx,Dy,Dxx...
2D Burgers' Equation
-
coarserefine2d(f,intrv,theta,...
2-D adaptive residual subsampling method for radial basis function
-
dorefine2d(ibox,select,firstg...
Box refinement process
-
ibox=initboxes2d(n,z)
Initial coarse discretization on z x z
-
initcond(x,ctr,R)
function for initial condition
-
mq2d(x,xc,c)
2-D multiquadric radial basis function
-
predictor(xx,x,u,lambda,c)
Use RBF to interpolate values at new set points
-
adaptburgers2d_mol.m
-
View all files
from
2D adaptive residual subsampling for Radial Basis Functions
by Alfa Heryudono
This program solves initial-boundary value problems particularly 2D Burgers' equation adaptively
|
| dorefine2d(ibox,select,firstgenresidbox) |
function [ibox,newidx] = dorefine2d(ibox,select,firstgenresidbox)
% Box refinement process
N = length(ibox); N0 = N;
for i = find(select(:)).'
% Coords of proposed box midpoints.
dx = 0.5*ibox(i).dimen;
if ibox(i).isboundary == false
p = repmat(ibox(i).midpt,4,1) + 0.5*[1 1;-1 1;-1 -1;1 -1]*diag(dx);
elseif ibox(i).isboundary == true
dimen = ibox(i).dimen;
if dimen(2) == 0
p = repmat(ibox(i).midpt,2,1) + 0.5*[1 1;-1 1]*diag(dx);
elseif dimen(1) == 0
p = repmat(ibox(i).midpt,2,1) + 0.5*[1 1;1 -1]*diag(dx);
end
end
n = size(p,1);
p = num2cell(p,2);
[ibox(N+(1:n)).midpt] = deal(p{:});
[ibox(N+(1:n)).dimen] = deal(dx);
[ibox(N+(1:n)).isboundary] = deal(ibox(i).isboundary);
[ibox(N+(1:n)).child] = deal([]);
[ibox(N+(1:n)).Nchild] = deal(0);
[ibox(N+(1:n)).depth] = deal(1+ibox(i).depth);
ibox(i).child = N+(1:n);
ibox(i).Nchild = n;
switch firstgenresidbox
case 0
ibox(i).depth = 2+ibox(i).depth;
end
N = N+n;
end
newidx = (N0+1:length(ibox))';
|
|
Contact us at files@mathworks.com