### Added function description to distance_to_coast and distance_along_BC

parent 8696e74d
Pipeline #135 skipped
 function Mobj=distance_along_BC(Mobj,BCnodes) function Mobj=distance_along_BC(Mobj,BCnodes,conf) % Calculates the distance from coast along the open boundary nodes % % Mobj=distance_along_BC(Mobj,BCnodes,conf) % % DESCRIPTION: % Calculates distance from coast along open boundary nodes and % store them in a matlab mesh object % % INPUT % Mobj = Mesh object structure variable % BCnodes = indices of nodes located at the boundary % conf = configuration structure variable with the % directory where the HJB_Solver_Package is installed % % OUTPUT: % Mobj = matlab structure containing distance data % % EXAMPLE USAGE % Mobj=distance_along_BC(Mobj,BCnodes,conf) % This function needs the HJB_solver package by Shawn Walker and can be downloaded from Matlab central % http://www.mathworks.com/matlabcentral/fileexchange/24827-hamilton-jacobi-solver-on-unstructured-triangular-grids % Author(s): % Ricardo Torres (Plymouth Marine Laboratory) % % Revision history % % 2015-11-20 First version % %============================================================================== dump = dbstack; subname = dump.name; clear dump global ftbverbose; if ftbverbose fprintf('\nbegin : %s \n', subname) end CD=pwd; % setup HPJ solver to calculate the distance function for the SMS mesh [~,~,~,bnd] = connectivity([Mobj.x,Mobj.y],Mobj.tri); ... ... @@ -20,7 +58,7 @@ myTM.NegMask=false(size(bnd)); myBdy.Nodes=coast_ind(:); myBdy.Data=zeros(size(myBdy.Nodes)); % cd /users/modellers/rito/matlab/HJB_Solver_Package/HJB_Solver_Package cd (conf.HJB_Solver_Package) % % SEmex = SolveEikonalmex(myTM,myBdy,myParam,myMetric); ... ...
 function Mobj=distance_to_coast(Mobj) function Mobj=distance_to_coast(Mobj,conf) % Calculates the distance from the coast in all mesh nodes % % Mobj=distance_to_coast(Mobj,conf) % % DESCRIPTION: % Calculates distance from coast within the domain mesh and % stores it in a matlab mesh object % % INPUT % Mobj = Mesh object structure variable % conf = configuration structure variable with the % directory where the HJB_Solver_Package is installed % % OUTPUT: % Mobj = matlab structure containing distance data % % EXAMPLE USAGE % Mobj=distance_to_coast(Mobj,conf) % This function needs the HJB_solver package by Shawn Walker and can be downloaded from Matlab central % http://www.mathworks.com/matlabcentral/fileexchange/24827-hamilton-jacobi-solver-on-unstructured-triangular-grids % Author(s): % Ricardo Torres (Plymouth Marine Laboratory) % % Revision history % % 2015-11-20 First version % %============================================================================== dump = dbstack; subname = dump.name; clear dump global ftbverbose; if ftbverbose fprintf('\nbegin : %s \n', subname) end CD=pwd; % setup HPJ solver to calculate the distance function for the SMS mesh [~,~,~,bnd] = connectivity([Mobj.x,Mobj.y],Mobj.tri); ... ... @@ -22,7 +59,7 @@ myTM.NegMask=false(size(bnd)); myBdy.Nodes=coast_ind(:); myBdy.Data=zeros(size(myBdy.Nodes)); % cd /users/modellers/rito/matlab/HJB_Solver_Package/HJB_Solver_Package cd (conf.HJB_Solver_Package) % % SEmex = SolveEikonalmex(myTM,myBdy,myParam,myMetric); ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!