init2dsnapshot_b.m

来自「spectral element method」· M 代码 · 共 19 行

M
19
字号
% indx = Init2dSnapshot_b(NGLL)%% PURPOSE	Use it with 'local storage scheme'% INPUT		NGLL	number of GLL nodes per edge% OUTPUT	indx(:,4) vertices of each GLL cell %			in a reference element%function indx = Init2dSnapshot_b(NGLL)iglob = reshape( (1:NGLL*NGLL)', NGLL,NGLL);indx = zeros((NGLL-1)^2, 4);ip=0;for i=1:NGLL-1,for j=1:NGLL-1,  ip = ip+1;  indx(ip,:) = [iglob(i,j) iglob(i+1,j) iglob(i+1,j+1) iglob(i,j+1)];endend

⌨️ 快捷键说明

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