Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tolerance added in mp_geo_load #24

Merged
merged 1 commit into from
Jan 10, 2025
Merged
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
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