amg_usersetfd.m

来自「五点差分型多重网格方法:各种插值算子的比较)」· M 代码 · 共 23 行

M
23
字号
%AMG_USERSET_FD sets us up for User Specified Example using FInite
%Difference Discretization

% Ryan McKenzie
% Department of Computational Sciences
% University of Kentucky

amg_globals;

filename = input('\nPlease enter the file name containing your FD matrix.\n(Press Return for the Default):', 's');
if isempty(filename)
    filename = 'anisox_81.txt';
end

fin = fopen (filename,'rt');
dim= fscanf(fin,'%4d',2);
FINEPOINTS = dim(1);
A(1).matrix = fscanf(fin,'%g',[dim(1),dim(2)]); 
fclose(fin);

X_Guess = zeros( dim(2), 1 );

RHS = ones( dim(2), 1 );

⌨️ 快捷键说明

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