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

📄 psn_2d_mex.m

📁 Finite Volume Poisson PDE Solver
💻 M
字号:
% C MEX-DLL for Matlab.Provides a solution for 2D Poisson equation in matter
%
% SYNTAX:
%   [U,<OUTPARAM>]=psn_2d_mex(INPPARAM, V,<E>)
%
% INPUT ARGUMENTS:
%   INPPARAM - vector of parameters
%   V - matrix of sharge density.
%     Internal Nx*Ny elements contains density,
%      Boudary rows & columns - values of vectors Gamma
%      for mixed boundary conditions
%   E - optional matrix of permittivity valuse e(i,j)
%
% OUTPUT PARAMETERS:
%   U matrix of result potential
%   OUTPARAM - optional output parameters
%
% INPPARAM LIST (indexes in INPPARAM vector follow position in enum):
% enum INPPARAM {
%    INP_NX,        //Number of INTERIOR points in X-dirextion
%    INP_NY,        //Number of INTERIOR points in Y-dirextion
%    INP_LX,        //X-size
%    INP_LY,        //Y-size
%    INP_GRID,      //Grid: 0-standard, 1 - centered
%    INP_METHOD,    //Solving method from PSN_METHODS
%    INP_TOL,       //Tolerance
%    INP_MAXSTEP,   //Max steps
%    INP_CRD,       //Coord type: 0-cartesian, 1-cylindrical
%
%    //Boundary conditions
%    INP_ALPHAX0,
%    INP_ALPHAX1,
%    INP_BETAX0,
%    INP_BETAX1,
%    INP_ALPHAY0,
%    INP_ALPHAY1,
%    INP_BETAY0,
%    INP_BETAY1
% };
%
% OUTPARAM LIST:
% enum OUTPARAM {
%    OUT_ERROR,       //resulting error
%    OUT_NUMSTEP,     //Number of iteration steps
% };
[U,OUTPARAM]=function psn_2d_mex(INPPARAM, V,E)

⌨️ 快捷键说明

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