1 |
gforget |
1.1 |
function [a]=exch_T_N(b,varargin); |
2 |
gforget |
1.2 |
%object : add halo region data; exchange data between faces. |
3 |
|
|
%input: b is a gcmfaces object |
4 |
|
|
%optional: N (1 by default) is the halo region width |
5 |
|
|
%output: a is the augmented gcmfaces object |
6 |
|
|
% |
7 |
|
|
%notes: |
8 |
|
|
% - This routine adds N points at the edge of each face, which |
9 |
|
|
% are obtained from the neighboring faces edge points; those are necessary to |
10 |
|
|
% operations such as neighbor averaging, or computing gradients over a face. |
11 |
|
|
% - Applying this routine recursively will likely lead to errors. |
12 |
|
|
% - The connectivity between faces depends on the grid topology and needs |
13 |
|
|
% to be implemented by hand for any new grid topology (see gcmfaces_exch). |
14 |
gforget |
1.1 |
|
15 |
|
|
if strcmp(b.gridType,'llc'); |
16 |
|
|
a=exch_T_N_llc(b,varargin{:}); |
17 |
|
|
elseif strcmp(b.gridType,'cube'); |
18 |
|
|
a=exch_T_N_cube(b,varargin{:}); |
19 |
|
|
elseif strcmp(b.gridType,'llpc'); |
20 |
|
|
a=exch_T_N_llpc(b,varargin{:}); |
21 |
|
|
elseif strcmp(b.gridType,'ll'); |
22 |
|
|
a=exch_T_N_ll(b,varargin{:}); |
23 |
|
|
else; |
24 |
|
|
error(['exch_T_N not implemented for ' b.gridType '!?']); |
25 |
|
|
end; |
26 |
|
|
|