From e02b3195442000dd935a334bdac2775f9419fffc Mon Sep 17 00:00:00 2001 From: = Date: Mon, 6 Jan 2025 10:27:59 +0100 Subject: [PATCH] tolerance added in mp_geo_load --- geopdes/inst/multipatch/mp_geo_load.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/geopdes/inst/multipatch/mp_geo_load.m b/geopdes/inst/multipatch/mp_geo_load.m index 30059abe..7a9d14da 100644 --- a/geopdes/inst/multipatch/mp_geo_load.m +++ b/geopdes/inst/multipatch/mp_geo_load.m @@ -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 : % @@ -65,7 +65,10 @@ % along with Octave; see the file COPYING. If not, see % . -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')) @@ -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 @@ -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