Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Unreleased (on current HEAD of the Projection branch)
## Added
- Optionality for mesh2dgen to choose the method of mesh generation `kind`, and the maximum iteration count `iter`. https://github.com/CHLNDDEV/OceanMesh2D/pull/272
- Option `improve_with_reduced_quality` to `meshgen` for allowing for mesh improvements even when quality is decreasing or large number of nodes eliminated, which sometimes is necessary to force the advancement in mesh quality.
- Option `delaunay_elim_on_exit` to `meshgen` to skip the last call to `delaunay_elim` to potentially avoid deleting boundary elements.
- Geoid offset nodal attribute in `Calc_f13` subroutine. https://github.com/CHLNDDEV/OceanMesh2D/pull/251
- Support for writing Self Attraction and Loading (SAL) files in NetCDF for the ADCIRC model. https://github.com/CHLNDDEV/OceanMesh2D/pull/231
## Changed
- Default filename for the dynamicWaterLevelCorrection is now `null` so that it is not evoked by default. https://github.com/CHLNDDEV/OceanMesh2D/pull/272
- Default mesh improvement strategy is `ds` 2.
- Retrieve boundary indices in `msh.get_boundary_of_mesh` method. https://github.com/CHLNDDEV/OceanMesh2D/pull/259
- `msh.offset63` struct and associated write/make routines for dynamicwaterlevel offset functionality. https://github.com/CHLNDDEV/OceanMesh2D/pull/259
Expand All @@ -170,7 +172,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Recursive cleaning issues: infinite loop and preservation of fixed points.
- `msh.interp` method for `K` argument of length 1, and for the test to determine whether the bathymetry grid is irregular. https://github.com/CHLNDDEV/OceanMesh2D/pull/259
- Printing of namelist character strings or numbers. https://github.com/CHLNDDEV/OceanMesh2D/pull/261
- `Make_offset63.m` time interval computation. https://github.com/CHLNDDEV/OceanMesh2D/pull/261
- `Make_offset63.m` time interval computation. https://github.com/CHLNDDEV/OceanMesh2D/pull/261 and https://github.com/CHLNDDEV/OceanMesh2D/pull/272
- Removed dependency on statistics toolbox when using the 'nanfill' option in `msh.interp`. https://github.com/CHLNDDEV/OceanMesh2D/pull/269

### [5.0.0] - 2021-07-29
Expand Down
2 changes: 1 addition & 1 deletion utilities/Make_f15.m
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
% dynamicwaterlevelcorrection control
f15dat.controllist(2).type = 'dynamicWaterLevelCorrection';
f15dat.controllist(2).var(1).name = [f15dat.controllist(2).type 'FileName'];
f15dat.controllist(2).var(1).val = 'offset.63';
f15dat.controllist(2).var(1).val = 'null';
f15dat.controllist(2).var(2).name = [f15dat.controllist(2).type 'Multiplier'];
f15dat.controllist(2).var(2).val = 1.0;
f15dat.controllist(2).var(3).name = [f15dat.controllist(2).type 'RampStart'];
Expand Down
2 changes: 1 addition & 1 deletion utilities/Make_offset63.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
obj.offset63.num_times = length(time_vector);
obj.offset63.time_interval = round(...
seconds(time_vector(end) - time_vector(1))/ ...
(length(time_vector)-1)...
max(length(time_vector)-1,1)...
);
obj.offset63.default_val = 0;
obj.offset63.offset_nodes = offset_nodes;
Expand Down
20 changes: 16 additions & 4 deletions utilities/mesh2dgen.m
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
function mfp = mesh2dgen( polygon, fh )
% mfp = mesh2dgen( polygon, fh )
function mfp = mesh2dgen( polygon, fh, kind, iter)
% mfp = mesh2dgen( polygon, fh, kind, iter)
% Generates a mesh using mesh2d based on a nan-delimited polygon on wgs84
% lat-lon coordinates and the oceanmesh2D edgefx class, fh
% We make the assumption that floodplain domain is relatively small so that
% projection is not that important..
% kind: 'delaunay' (default) or 'delfront' method for mesh generation
% iter: maximum allowable iterations (default is 100)
%
% This section of the code used `mesh2d` by DR. Darren Engwirda
% https://github.com/dengwirda/mesh2d

opts.iter = 100;
opts.kind = 'delaunay';
if nargin < 3 || isempty(kind)
opts.kind = 'delaunay';
else
opts.kind = kind;
end
if nargin < 4 || isempty(iter)
opts.iter = 100;
else
opts.iter = iter;
end
opts.ref1 = 'preserve';

[node,edge] = getnan2(polygon);

if isa(fh,'edgefx')
fh.F.Values = fh.F.Values/111e3;
hfun = @(p)fh.F(p);
Expand Down