Skip to content

Commit

Permalink
tolerance added in mp_geo_load
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelWiesheu committed Jan 6, 2025
1 parent 2d2e1cc commit e02b319
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions geopdes/inst/multipatch/mp_geo_load.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% MP_GEO_LOAD: create a multipatch geometry structure and the interfaces structure from a file.
%
% [geometry, boundaries, interfaces, subdomains, boundary_interfaces] = mp_geo_load (input)
% [geometry, boundaries, interfaces, subdomains, boundary_interfaces] = mp_geo_load (input, tolerance)
%
% INPUT :
%
Expand Down Expand Up @@ -65,7 +65,10 @@
% along with Octave; see the file COPYING. If not, see
% <http://www.gnu.org/licenses/>.

function [geometry, boundaries, interfaces, subdomains, boundary_interfaces] = mp_geo_load (in)
function [geometry, boundaries, interfaces, subdomains, boundary_interfaces] = mp_geo_load (in, tol)
if nargin < 2
tol = 1e-13;
end

if (ischar (in))
if (strcmpi (in(end-3:end), '.mat'))
Expand Down Expand Up @@ -138,7 +141,7 @@
geometry(iptc) = geo_load (in(iptc));
end
warning ('geopdes:nrbmultipatch', 'Automatically generating the interface and boundary information with nrbmultipatch')
[interfaces, boundaries] = nrbmultipatch (in);
[interfaces, boundaries] = nrbmultipatch (in, tol);
subdomains(1).name = 'SUBDOMAIN 1';
subdomains(1).patches = 1:numel(in);
else
Expand Down Expand Up @@ -193,7 +196,7 @@
for iptc = 1:numel(patch_numbers)
bnd_nurbs(iptc) = geometry(patch_numbers(iptc)).boundary(side_numbers(iptc)).nurbs;
end
boundary_interfaces = nrbmultipatch (bnd_nurbs);
boundary_interfaces = nrbmultipatch (bnd_nurbs, tol);
else
boundary_interfaces = [];
end
Expand Down

0 comments on commit e02b319

Please sign in to comment.