Skip to content

Commit

Permalink
Merge pull request #97 from CHLNDDEV/Small_addition
Browse files Browse the repository at this point in the history
Small changes
  • Loading branch information
WPringle authored Jul 27, 2020
2 parents a253b92 + 52e71d2 commit e692c49
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions @msh/private/GridData.m
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
if sum(isnan(b)) > 0
localcoord = obj.p(K,:);
KI = knnsearch(localcoord(~isnan(b),:),localcoord(isnan(b),:));
bb = b(~isnan(b),:);
bb = b(~isnan(b));
b(isnan(b)) = bb(KI); clear bb localcoord
end
end
Expand All @@ -370,13 +370,13 @@
if ~isempty(find(isnan(bx),1))
localcoord = obj.p(K,:);
KI = knnsearch(localcoord(~isnan(bx),:),localcoord(isnan(bx),:));
bb = bx(~isnan(bx),:);
bb = bx(~isnan(bx));
bx(isnan(bx)) = bb(KI); clear bb localcoord
end
if ~isempty(find(isnan(by),1))
localcoord = obj.p(K,:);
KI = knnsearch(localcoord(~isnan(by),:),localcoord(isnan(by),:));
bb = by(~isnan(by),:);
bb = by(~isnan(by));
by(isnan(by)) = bb(KI); clear bb localcoord
end
end
Expand Down
4 changes: 3 additions & 1 deletion @msh/private/writefort15.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@
fprintf( fid, '%g \t \t ! RNDY \n', f15dat.rndy ) ;

% DRAMP
fprintf( fid, '%d \t \t ! DRAMP \n', f15dat.dramp ) ;
L = length(f15dat.dramp);
dfmt = repmat('%g ',1, L);
fprintf( fid, [dfmt ' \t \t ! DRAMP \n'], f15dat.dramp ) ;

% A00, B00, C00
fprintf( fid, '%g %g %g \t ! A00, B00, C00 \n', f15dat.a00b00c00 ) ;
Expand Down
4 changes: 4 additions & 0 deletions utilities/Calc_f13.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
% 'Re' ('initial_river_elevation')
% 'Ad' ('advection_state')
% 'Sb' ('subgrid_barrier')
% 'Es' ('elemental_slope_limiter')
%
% 3) then either:
% 'inpoly' followed by...
Expand Down Expand Up @@ -55,6 +56,9 @@
elseif strcmpi(attribute,'Sb')
attrname = 'subgrid_barrier';
default_val = 99999;
elseif strcmpi(attribute,'Es')
attrname = 'elemental_slope_limiter';
default_val = -1e-3;
else
error(['Attribute ' attribute ' not currently supported'])
end
Expand Down

0 comments on commit e692c49

Please sign in to comment.