⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 residual.m

📁 MDPSAS工具箱是马里兰大学开发的
💻 M
字号:
function A = residual(A)% residual.m Nonlinear equation model object residual update.%% INPUT/OUTPUT PARAMETERS%        A : an object derived from the neqmodel class%% Copyright (c) by Raymond A. Adomaitis, 1998-2003unpack(A)% update parameter d in momobj with variable d (of continuity% object A), then evaluatemomobj = set(momobj,'param',d,'d');momobj = equation(momobj);unpack(momobj)vx = a*Bvx + vxBC;vy = b*Bvy;% Interior residualsdebug = 0;if debug   figure(4)   subplot(2,2,1)   plot(vx), title('vx')   subplot(2,2,2)   plot(Dx*vx), title('Dx*vx')   subplot(2,2,3)   plot(Dy2*vy), title('Dy2*vy')   subplot(2,2,4)   plot(Dx*vx + Dy2*vy), title('Dx*vx + Dy2*vy')   endRp = wip( Dx*vx + Dy2*vy, Bp );% Rp(1,1) = d(1,1)-0; % fix a pressure field value for a unique solution.mean(mean(abs(Rp)));% No boundary condition residualsA = set(A,'resid',{Rp});A = set(A,'param',momobj,'momobj');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -