You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created a new function for msh that simplifies the steps to re-mesh a polygonal region and insert it back perfectly into the parent mesh.
To be inserted into msh.m
function [m_remeshed]=remesh_patch(obj, poly, efdx, const_resolution)
% Remeshes the region inside the polygon poly
% Uses the existing mesh resolution patterns to re-mesh the
% patch by default but if user specifies const_resolution (in meters),
% then it will use a uniform resolution in the patch.
% efdx is the background grid resolution. Should be finer than
% the intended minimum element size to correctly capture
% element sizes.
if nargin < 3
const_resolution = -999;
end
subdomain = extract_subdomain(obj,poly{1});
poly = get_poly(subdomain);
[ef,efx,efy]=reconstructEdgefx(subdomain,efdx,const_resolution);
fh = griddedInterpolant(efx,efy,ef);
hfun = @(p)fh(p);
subdomain_new = mesh2dgen(poly,hfun);
m_w_hole = extract_subdomain(obj,poly{1},"keep_inverse",1);
m_remeshed = plus(subdomain_new, m_w_hole,...
'match',{'djc',0.0,'ds',0,'db',0,'con',5,'mqa',1e-4,'sc_maxit',0});
end
The text was updated successfully, but these errors were encountered:
Created a new function for
msh
that simplifies the steps to re-mesh a polygonal region and insert it back perfectly into the parent mesh.To be inserted into
msh.m
The text was updated successfully, but these errors were encountered: